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 ...
随机推荐
- KVM虚拟机virsh常用参数
线上虚拟机挂了,常用的命令忘了,记录下 链接:http://www.ibm.com/support/knowledgecenter/zh/linuxonibm/liabp/liabpcommonvir ...
- GridControl
隐藏Drag a column header here to group by that column https://www.devexpress.com/Support/Center/Questi ...
- JQ写下拉列表项目移动(内附效果图和源代码)
效果图如下: 实现功能:点击第一个按钮,让选中的对象从左边移动到右边: 点击第二个按钮,让左边的所有对象移动到右边: 点击第三个按钮,让选中的对象从右边边移动到左边: 点击第四个按钮,让右边的所有 ...
- hihoCoder 1385 : A Simple Job(简单工作)
hihoCoder #1385 : A Simple Job(简单工作) 时间限制:1000ms 单点时限:1000ms 内存限制:256MB Description - 题目描述 Institute ...
- 9----Lua中的面向对象
什么是面向对象? 使用对象.类.继承.封装.消息等基本概念来进行程序设计 面向对象最重要的两个概念就是:对象和类 对象是系统中用来描述客观事物的一个实体,它是构成系统的一个基本单位 一个对象由一组属性 ...
- Windows Internals学习笔记(八)IO系统
参考资料: 1. <Windows Internals> 知识点: ● 当一个进
- 《BI那点儿事》SSRS图表和仪表——雷达图分析三国超一流谋士、统帅数据(图文并茂)
雷达图分析三国超一流谋士.统帅数据,献给广大的三国爱好者们,希望喜欢三国的朋友一起讨论,加深对传奇三国时代的了解 建立数据环境: -- 抽取三国超一流谋士TOP 10数据 DECLARE @t1 TA ...
- 《BI项目笔记》无法解密受保护的 XML 节点“DTS:Password” 解决办法
说明: 无法解密受保护的 XML 节点“DTS:Password”,错误为 0x8009000B“该项不适于在指定状态下使用.”.可能您无权访问此信息.当发生加密错误时会出现此错误.请确保提供正确的密 ...
- js之oop <四>对象管理
对象扩展管理 Object.isExtensible() 检测对象是否可扩展(一般返回true).Object.preventExtensions() 防止对象扩展. var p = {p1:&quo ...
- Android 利用xUtils框架实现对sqllite的增删改查
首先下载xUtils,下载地址:https://github.com/wyouflf/xUtils 把下载好的文件压缩,把里面的jar包拷进项目中如图所示: 这里新建一个User类进行测试增删改查 ...