Android开发最佳实践

2019-06-21  本文已影响0人  道阻且长_行则将至

Android 开发最佳实践

使用Android Studio

使用 String.xml

创建模块化的UI布局,方便复用

包含xxxhdpi资源

应用图标放在mipmap-folder文件夹

为debug和release划分不同的资源文件夹

image

尽量使用shapes和selectors

避免深层次的布局

尽量使用Gradle引入依赖

使用Retrofit管理网络请求

使用RxJava

使用Glide/Fresco

使用Parcellable序列化

控制好异步任务的生命周期

IO操作不要放到UI线程

使用Style复用UI属性

大量连接String时使用StringBuilder

Return返回空对象而不是null

添加StartActivity方法,减少重复

参考链接

Android development best practices we follow at Innofied

Android 开发最佳实践

Android最佳实践指南

Android性能最佳实践:APK瘦身计划

Best Practices for User Experience & UI

Android Development Best Practices

Best coding practices, tips and more for Android

Build a Responsive UI with ConstraintLayout

Best Practices in Android Development

上一篇 下一篇

猜你喜欢

热点阅读