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 ...
随机推荐
- Dynamics AX 2012 R2 将系统用户账号连接到工作人员记录
要使用AX中的一些特性,需要将User Account和他们的Employee Record连接在一起.最好将所有Employee的User Account,都和他们的Employee Record连 ...
- 芯航线FPGA学习套件之4*4矩阵键盘模块测试手册
芯航线FPGA学习套件之4*4矩阵键盘模块测试手册 本手册以简明扼要的方式介绍芯航线FPGA学习套件提供的矩阵键盘模块的测试方法: 连接开发板,如下所示: 2.将矩阵键盘模块与开发板按如下图所 ...
- 使用Android studio 出现的问题解决
问题一.安装过程中出现的报错Failed to install Intel HAXM 解决:重启电脑,启动BIOS,我的是惠普的,开机时按F10就进去了 切换到Configuration选项,将设置I ...
- 使用Netty收发二进制报文问题记
1.java二进制编解码 byteBuffer.flip() byteBuffer.getInt() 与 byteBuf.getInt(11) 2.粘包拆包问题 LengthFieldBasedFra ...
- javax.servlet.ServletException: com.ibatis.sqlmap.client.SqlMapException: There is no statement named...问题
可能存在3种情况: 1.在xxx.xml文件中有两个标签的id命名相同: 2.DAO实现类方法中没有写对应xxx.xml的id名称: 3.实体映射文件xxx.xml未加入到sqlMap-Config. ...
- python学习之for语句
1.range数字范围 for i in range(5): print (i) 结果显示: 0 1 2 3 4 2.列表显示 ']: print ("current num:", ...
- [问题2014S03] 解答
[问题2014S03] 解答 设 \(A\) 的 \(n\) 个特征值分别为 \(\lambda_1,\lambda_2,\cdots,\lambda_n\), 由条件知它们都是不等于零的实数. 根 ...
- CRM系统简析
寄语: 简单阐述一下对CRM系统应用的理解,此内容参考网上资料所整理. CRM是Customer Relationship Management的缩写,简称客户关系管理. CRM系统可以从三个方面来分 ...
- Fact表的星型结构
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- 任意阶幻方(魔方矩阵)C语言实现
魔方又称幻方.纵横图.九宫图,最早记录于我国古代的洛书.据说夏禹治水时,河南洛阳附近的大河里浮出了一只乌龟,背上有一个很奇怪的图形,古人认为是一种祥瑞,预示着洪水将被夏禹王彻底制服.后人称之为&quo ...