Do's and Don'ts for Android development
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
Do's and Don'ts for Android development的更多相关文章
- Android development tools line_endings hacking
/******************************************************************** * Android development tools li ...
- Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment:
Administrator@DESKTOP-EHCTIOR MINGW64 /d/react-native-eyepetizer (master) $ react-native run-android ...
- [Android]Eclipse 安装 ADT[Android Development Tooling] 失败的两种解决办法
原因 最近想在新装的 Win7 里搭建一下 Android 的开发环境,虽然现在有 Android Studio 了,不过还是习惯 Eclipse 一点.众所周知的原因,Eclipse 直接安装 AD ...
- ADT Android Development Tools
ADT(Android Development Tools)在Eclipse编译IDE环境中,需安装ADT(Android Developer Tools)Plug-in,这是Android在Ecli ...
- Solutions for common Android development problems with the Eclipse IDE- Tutorial
Table of Contents 1. Solving typical Android development problems 1.1. Clean Project 1.2. android.co ...
- Websites for more Android development information
There is a vibrant, helpful Android developer community on the Web. Here are a numberof useful websi ...
- Android开发 Unity3D基础 Android Development
开发环境 Window 7 Unity3D 3.3.0 MB525 defy Android 2.1-update1 本次学习: 1.认识Unity 2.Unity3D环境搭建与Android软件生成 ...
- ADT-bundle(Android Development Tools)环境配置
Android开发环境有两套比较主流的:ADT-bundle和Android Studio,前者是Eclipse插件的形式进行开发,后者是Android的官方IDE. ADT环境的配置与调试:(1)安 ...
- Android Development Tools 发生checkAndLoadTargetData错误
之前使用时没有出现任何问题的,我把D:\IDE\ADT\adt-bundle-windows-x86_64-20140321\eclipse目录下面的 eclipse.exe重名名为adt.exe并设 ...
随机推荐
- Java基础知识强化之IO流笔记20:FileOutputStream写出数据实现换行和追加写入
1. 如何实现数据的换行? (1) package com.himi.fileoutputstream; import java.io.FileNotFoundException; import j ...
- Windows下Android Studio长时间停留在Building "Project Name" Gradle project info画面的解决方法
问题描述: 创建好一个Android项目后,Android Studio长时间停留在Building [Project Name] Gradle project info画面不动. 原因: 此时And ...
- Python操作MySQL -即pymysql/SQLAlchemy用法
本节介绍Python对于MySQL的一些操作用法 模块1:pymysql(等同于MySQLdb) 说明:pymysql与MySQLdb模块的使用基本相同,学会pymysql,使用MySQLdb也就不是 ...
- ASP.NET菜鸟之路之Application小例子
背景 我是一个ASP.NET菜鸟,暂时开始学习ASP.NET,在此记录下我个人敲的代码,没有多少参考价值,请看到的盆友们为我点个赞支持我一下,多谢了. Session介绍 Application对象用 ...
- LINUX系统安装MYSQL命令,纯手打
1.下载安装包 wget http://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz 2. ...
- Light OJ 1104 第六周F题
F - 概率(经典问题) Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Descri ...
- dict两种遍历方法
采用for...in...遍历: >>> for i in dd: ... print("%s:%s"%(i,dd[i])) ... :chen :hang :w ...
- 使用C#的自定义事件
public class CarDealer { public Action<string> NewCarInfo; //使用系统定义的泛型委托 public void NewCarCom ...
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalabl ...
- struts2整合spring的思路
struts2整合spring有有两种策略: >sping容器负责管理控制器Action,并利用依赖注入为控制器注入业务逻辑组件. >利用spring的自动装配,Action将自动会从Sp ...