美文网首页
Android开发最佳实践

Android开发最佳实践

作者: 道阻且长_行则将至 | 来源:发表于2019-06-21 15:13 被阅读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

相关文章

网友评论

      本文标题:Android开发最佳实践

      本文链接:https://www.haomeiwen.com/subject/gtbnbqtx.html