android This tag and its children can be replaced by one <TextView/> and a compound drawable 布局文件提示
2015-10-28 17:43
1081 查看
先看下图片
这个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的左 上 右 下的图片.
这个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的左 上 右 下的图片.
相关文章推荐
- Android根据Button状态(normal,focused,pressed)显示不同背景图片
- android 最简对话框弹出提示
- 【android学习笔记】 android studio 编译调试 错误
- Android如何区别真机和模拟器
- 获取第三方apk的资源文件
- android常识
- Android 获取手机联系人代码
- 安卓开发学习之010 TableLayout详解+计算器实现
- Android笔记—Intent传递序列化HashMap对象
- 常用开源镜像站整理android sdk manager
- 关于Android游戏开发的资料
- android 工程lib 里的目录和文件
- 推荐几个Android开发非常有用的工具(for android studio)
- Android实战技巧之四十二:加速度传感器
- android上加载大图片需要注意的问题
- Android:背景渐变色
- Android 各种Adapter
- 屏幕适配的选择
- MP4文件格式的解析,以及MP4文件的分割算法
- Android如何判断一个应用在运行