An open API service indexing awesome lists of open source software.

https://github.com/zaprogrammer/what-i-learned-android

This repo is a list of what I learn periodically about Android, so I want to share it with others.
https://github.com/zaprogrammer/what-i-learned-android

Last synced: 5 months ago
JSON representation

This repo is a list of what I learn periodically about Android, so I want to share it with others.

Awesome Lists containing this project

README

          

What I Learned - Android
---

As we move on developing software, we learn new skills and customize our IDE we love (or forced to work with sometimes) upon our needs to facilitate the daily development life.

This repo will focus on Android development gathering my knowledge and the new stuff I learn to be a reference to me and open-sourced for anyone to help also.


Android Studio


What if you have to move to a new machine or want to backup your settings/setup of AS that you have been installing for a quite time?

There are many ways to do so:




  • Automatic: Using JB plugin Settings Repository, but unfortunately, it is not stable and has a lot of bad reviews and low rating.


  • Semi-Manual: Export/Import them from the AS menu: File > Export Settings…, then move the exported jar file to your new machine, then File > Import Settings…


  • Manual: You can reference to this article to do it totally manual.


AS From scratch:

Below is my list of plugin and tweaks to the AS to help me develop faster and more consistently:





Res



Enable the use of support library for vector drawables



Using vector drawables instead of PNGs in you app results in smaller apk file. But vector drawables was introduced in API 21, so to support it backward to API 7, enable support library for vector drawables to make use of them in your app as follows:



  1. In build.gradle (app level), add:


vectorDrawables.useSupportLibrary = true



  1. Use app:srcCompat in the image tag in all your layout files:


app:srcCompat="@drawable/YOUR_RESOURCE_NAME"



  1. You’ll also need to add the namespace to the root of the layout (like android and tools namespaces):


xmlns:app="http://schemas.android.com/apk/res-auto"