先看下图片
这个LinearLayout有二个子view是ImageView和TextView, 也看到在LinearLayout标签有个黄色的下划线,提示是
This tag and its children can be replaced by one <TextView/> and a compound drawable
这个标签的可以通过子view TextView通过使用android:drawableLeft.、android:drawableRight等属性指定!
或者使用代码setCompoundDrawables(left, top, right, bottom);left,top,right,bottom,都是Drawable类型,这就是设置TextView的左 上 右 下的图片.