Do's and Don ' TS for Android development, by Futurice developers
- Use Gradle and its recommended project structure
- Put passwords and sensitive data in gradle.properties
- Don ' t write your own HTTP client, use volley or OkHttp libraries
- Use the Jackson library to parse JSON data
- Avoid Guava and use only a few libraries due to the 65k method limit
- Use fragments to represent a UI screen
- Use activities just to manage fragments
- Layout xmls is code, organize them well
- Use styles to avoid duplicate attributes in Layout xmls
- Use multiple style files to avoid a single huge one
- Keep your colors.xml short and DRY, just define the palette
- Also Keep Dimens.xml DRY, define generic constants
- Do not make a deep hierarchy of viewgroups
- Avoid client-side processing for webviews, and beware of leaks
- Use Robolectric for unit tests, Robotium for Connected (UI) tests
- Use genymotion as your emulator
- Always use Proguard or Dexguard
Read more about the original: Https://github.com/benniaobuguai/android-best-practices#use-gradle-and-its-recommended-project-structure
Do's and Don ' TS for Android development