| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Android projects are Java projects, so they must follow the well-known code conventions for the Java programming languages. These are easily available online so look for them and apply them to the projects.
In our projects we use Android Lint with an extension called Lewis to check our code, there we add some rules like:
Minimum of things that must not be uploaded for each Android project:
.gradle
/local.properties
/.idea/
.DS_Store
/build
/capturesIn addition, be careful uploading .iml files, at most projects those files are not necessary and should be added to the .gitignore.
Always keep a correct code format (indentation, spaces, etc) and avoid unused imports using Android Studio's shortcut Command+Option+L (in Mac).
Delete default header, avoid use headers to indicate only the creator of the file and the date. Add a header only if you want to explain the purpose of that file/class.
Use always JavaDoc and avoid warnings.
Widgets id: contextName + name + widgetType (all camel case). For example: "loginNameTextView".
Put every SharedPreference inside the same unique file. Or, at least put those different files inside the same package (could be named “preferences” for example). The same for DB (SQLite, Realm, etc), the package could be named “db” for example.
Use build flavors to work with more than one environment (for example: dev, staging, production).
Use observers only when is strongly necessary and avoid their concatenation.
Use always JUnit, try to test most of algorithmic stuff and be careful testing UI behaviour.
Examples: TinyTask, KillerTask.
| Back | FazBrowse Home | New Git URL |