This tag and its children can be replaced by one <TextView/> and a compound drawable
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" > <ImageView
android:src="@drawable/ic_launcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@drawable/ic_launcher"/> <TextView
android:id="@+id/list_item_textview"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:paddingLeft="20dp"/> </LinearLayout>
如果图片是直接引用drawable中的图片资源,可以直接在TextView中定义,
可直接替换为:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" > <TextView
android:id="@+id/list_item_textview"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:drawableLeft="@drawable/ic_launcher"
android:drawablePadding="20dp"/> </LinearLayout>
This tag and its children can be replaced by one <TextView/> and a compound drawable的更多相关文章
- eclipse提示:This tag and its children can be replaced by one <TextView/> and a compound drawable
今天在学习android开发的时候,写了这样的一段代码: <?xml version="1.0" encoding="utf-8"?> <Li ...
- android xml文件中出现如下提醒:This tag and its children can be replaced by one <TextView/> and a compound drawable
第一个感叹号 是跟你说 让你把Imageview 和textview 结合起来 只用 textview textview有个属性叫 android:drawable...(top/bottom/.. ...
- Android little error records
1:在清单文件(Manifest)中加入权限时要注意,如下例: <uses-permission android:name="android.permission.CHANGE_NET ...
- TextView & EditText
TextView 1.下划线 textView.getPaint().setFlags(Paint. UNDERLINE_TEXT_FLAG ); //下划线 2.单独做第一步,文字会出现锯齿,要加下 ...
- Android常见布局问题
原文链接:http://www.cnblogs.com/Birdmafly/p/3809802.html 好久没写博了,因为最近在忙着做一个app,实在是没有时间.现在快完工了.想着还是把这个布局问题 ...
- Android tips tool 发现的性能问题(转载翻译)
先翻译刚好在研究到的一段,其余的无限期待续. 1.ObsoleteLayoutParam不起作用的标签 Invalid layout param in a LinearLayout: layout_c ...
- [置顶] Android开发笔记(成长轨迹)
分类: 开发学习笔记2013-06-21 09:44 26043人阅读 评论(5) 收藏 Android开发笔记 1.控制台输出:called unimplemented OpenGL ES API ...
- andorid lint
(一)Lint简介 Android SDK提供了一个代码扫描工具,称为lint.可以帮助您轻松地识别并纠正问题与结构质量的代码,不必执行应用程序或编写任何测试用例.每个问题检测到该工具报告的一个描述消 ...
- eclipse lint工具介绍
一.基本介绍 作为移动应用开发者,我们总希望发布的apk文件越小越好,不希望资源文件目录中没有用到的图片等资源也被打包进apk,不希望应用中使用了高于minSdk的api,也不希望AndroidMan ...
随机推荐
- mysql常用操作语句(转)
mysql -u root -p mysql -h localhost -u root -p database_name 2.列出数据库: show databases; 3.选择数据库: use ...
- JAVA枚举
枚举类型的使用: 定义一个枚举变量: enum Day{ MOD,TUE,WED,THR,FRI; }; 可以直接输出枚举变量的字符串形式和利用switch输出,在JDK1.6及之前switch只识别 ...
- 如何清理photoshop cs6 被升级的烦人的adobe creative cloud组件
安装photoshop cs6(虽然目前已经退出到cc 2015,不过因激活成熟度等,我还是偏向于使用cs6,够用!),默认安装adobe application manager. 不过如果不小心单独 ...
- HashCode
如果一个类的对象要用做hashMap的key,那么一定要注意覆盖该类的equals和hashCode方法. equals()是基类Object的方法,用于判断对象是否有相同地址及是否为同一对象 pub ...
- 使用Rsync进行文件的同步与备份
Rsync是Linux下非常不错的文件同步备份工具,安全性高.备份迅速.支持增量备,功能强大且高效. 服务端配置 Rsync服务的配置文件/etc/rsyncd.conf,示例配置(带用户名密码配置) ...
- Using User-Named Triggers in Oracle Forms
A user-named trigger is a trigger defined in a form by the developer. User-Named triggers do not aut ...
- 配置eclipse集成开发环境_编译_调试
1. 因为eclipse是基于Java运行,所以在运行Eclipse之前,需要安装Java SE,对于Java SE,需要Java SE6 JRE系列的版本,可以在这个位置下载: Java SE 6只 ...
- DSO激活时,生成主数据SID时报错:原因,主数据允许小写字母没有勾上
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- Flex 文本控件实现自定义复制粘贴
由于添加了自定义右键菜单,导致Textinput控件默认的右键复制粘贴功能被屏蔽了.最后通过JS脚本实现这个功能,参考代码如下 <?xml version="1.0" enc ...
- ERROR 1018 (HY000): Can't read dir of './test/' (errno: 13)
不能查看mysql中数据库的表. 一.查看 mysql> desc test; ERROR 1046 (3D000): No database selected mysql> use te ...