1、Set android:baselineAligned="false" on this element for better performance

如果LinearLayout被用于嵌套的layout空间计算,它的android:baselineAligned属性应该设置成false,以加速layout计算


2、This tag and its children can be replaced by one <TextView/> and a compound drawable

如果我们想用一个TextView和ImageView的组合,并不需要使用这两个组件,只要对TextView使用一个drawable就行了,例如android:drawableTop="....."


3、Missing contentDescription attribute on image

跟Image有关的空间需要一个描述,要解决这个问题的话加上一个空字符或者@string/App_name即可


4、This LinearLayout layout or its LinearLayout parent is possibly useless

在LinearLayout布局当中嵌套了一个子的LinearLayout布局,而在我的这个整个布局文件中是一最外层的LinearLayout为父控件进行整体布局的,从而造成这段布局代码重复了LinearLayout布局。所以只要把多余的LinearLayout去掉就可以了


5、Nested weights are bad for performance

在布局进行嵌套使用时,父布局与子布局都使用了android:layout_weight,但不是必须使用时,便会出现如题所示的警告信息。

更多相关文章

  1. android之自定义ViewGroup和自动换行的布局的实现
  2. 自定义Android标题栏TitleBar布局
  3. Android入门:HTML布局中Android程序与JAVASCRIPT的交互
  4. Android学习笔记(1) Android 布局管理器 之 LinearLayout
  5. android上滑某个布局固定悬浮
  6. Android中CoordinatorLayout(协调布局)的使用
  7. Android 5.0新控件 AppBarLayout | 嵌套布局 介绍及使用详情
  8. 记录状态栏与布局重合,状态栏颜色问题

随机推荐

  1. handler.post 运用
  2. Android(安卓)VelocityTracker简介
  3. JobService的使用介绍
  4. Android(安卓)UI高级控件之SimpleAdapter
  5. 利用busybox制作android下的ramdisk启动
  6. 自定义TextView实现跑马灯
  7. android学习日记之intent与IPC
  8. TinyTask: 一个Android异步任务处理库
  9. Android----单元测试 (1)
  10. [HTML5]android远程调试工具chrome