android 布局的性能优化
2015-07-02 18:19
465 查看
1、布局重用<include />
2、减少视图层级<merge />
3、需要时使用<ViewStub />
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/traffic_layout_main" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" > <include layout="@layout/traffic_layout_title" /> <include layout="@layout/traffic_layout_pull_result" /> <include layout="@layout/traffic_layout_pull" />如上用法。
相关文章推荐
- android FileNotFoundException(Is a Directory)解决办法
- Android项目更换开发环境时出现的 java.lang.VerifyError 异常解决办法
- Android 跨进程事件处理(一)——模拟点击、全局截屏
- Android 初始化之Zygote
- Demo---分享45个android实例源码
- Android自动化测试-自动获取cpu和内存信息
- Android获取所有存储卡挂载路径
- View onRestoreInstanceState ClassCastException
- activity背景透明的2种方法
- android开发教程21篇(强烈推荐,几乎每一篇都是精华教程)
- Android Studio 简介及导入jar包和第三方开源库的方法
- android4.0以上,利用耳机接听键实现自动接听,部分手机失败原因+解决方法(比如华为P7)
- android 学习笔记 fill_parent、wrap_content和match_parent的区别
- android之EditText输入错误时该怎样提示用户
- Android unit test中通过颜色比对替代肉眼检查
- Android5.0编译问题:No rule to make target 'external/chromium_org/third_party/angle/.git/index',
- Android特效 五种Toast详解
- Android 编程下 Touch 事件的分发和响应机制
- Android 编程下 Touch 事件的分发和响应机制 分类: Android 2015-07-02 17:35 12人阅读 评论(0) 收藏
- Android TabHost布局