Do's and Don'ts for Android development
2024-08-24 20:32:38
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 are 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
更多请关注原文:https://github.com/benniaobuguai/android-best-practices#use-gradle-and-its-recommended-project-structure
最新文章
- SharePoint Permission Extension
- Unix系统小知识(转)
- axis 理解
- Deepin下phpunit安装,以及执行过程中所遇到的问题
- [ZZ]Sign Up for the First-Ever Appium Roadshow on August 20th in New York City
- PHP 用文件流方式展示图片
- cocos2dx 文件处理
- 70个经典的 Shell 脚本面试问题
- iptables实用教程(一):基本概念和原理
- Linux中fdisk硬盘分区方法
- sdut 2878 圆圈
- ECMAScript中所有的函数的参数都是按值传递的
- SpringBoot整合RabbitMQ-整合演示
- Analysis Services 中的服务器属性配置
- Ubuntu Firefox HTML5
- linux就该这么学,第十一天了
- P4574 [CQOI2013]二进制A+B
- .NET(C#)使用Serialize、Deserialize序列和反序列化XML文档
- JAVA 传递
- 不错的Spring学习笔记(转)