`
dowhathowtodo
  • 浏览: 779348 次
文章分类
社区版块
存档分类
最新评论

This tag and its children can be replaced by one <TextView/> and a compound drawable

 
阅读更多

写了这么一段代码:

    <LinearLayout 
        android:orientation="horizontal"
        android:layout_centerInParent="true"
	    android:layout_height="wrap_content"
	    android:layout_width="wrap_content">
	    <ImageView 
	        android:id="@+id/grid_icon"
	        android:layout_width="wrap_content"
	        android:layout_height="wrap_content"/>
		<TextView
		    android:id="@+id/grid_text"
		    android:layout_height="wrap_content"
		    android:layout_width="wrap_content"
		    android:text="@string/app_name"/>
	</LinearLayout>

eclipse提示:This tag and its children can be replaced by one <TextView/> and a compound drawable


最后发现原来可以直接给TextView加图片.. ,通过setCompoundDrawable 方法, 或者直接在xml中使用android:drawableLeft.、android:drawableRight等属性指定!




分享到:
评论

相关推荐

    tomcat-5.5.23

    available by visiting:&lt;br&gt;&lt;br&gt; http://localhost:8080/&lt;br&gt;&lt;br&gt;(3.3) Further information about configuring and running Tomcat can be found in&lt;br&gt; the documentation included here, as well as on the ...

    VxWorks Netrom实现

    This means you can have access to&lt;br&gt;Ethernet communications speed and function during the development&lt;br&gt;cycle even when Ethernet capability will not be needed in the final&lt;br&gt;product. Vether is ...

    freemarker总结

    [ {“Akey”:”Avalue”},{“Akey1”:”Avalue1”}, {“Bkey”:”Bvalue”},{“Bkey1”:”Bvalue1”}, ] hashes {“you”:”a”,”me”:”b”,”he”:”c”} 注释标志 &lt;#-- 这里是注释 --&gt; 旧版本的freemarker...

    amcharts中文教程(柱状图,饼状图等的中文设置说明)

    If height is &gt; 0, then there can be two angles only: 90 and 270 --&gt; &lt;outline_color&gt;&lt;/outline_color&gt; &lt;!-- 轮廓的颜色[#FFFFFF] (hex color code) --&gt; &lt;outline_alpha&gt;&lt;/outline_alpha&gt; &lt;!-- ...

    Windows Vista for Starters: The Missing Manual

    Windows Vista for Starters: The Missing Manual&lt;br&gt;&lt;br&gt;David Pogue&lt;br&gt;&lt;br&gt;Fast-paced and easy to use, this concise book teaches you the basics of Windows Vista so you can start using this operating ...

    C# 2005数据库编程经典教程 源代码

    Downloadable Code for Beginning C# Databases by Karli Watson&lt;br&gt;Notes updated 25th July 2006&lt;br&gt;&lt;br&gt;The downloadable code for this book is divided up into folders, where one folder is used &lt;br&gt;&lt;br&gt;for...

    crtmpserver源码

    &lt;div id='mediaspace'&gt;This text will be replaced&lt;/div&gt; &lt;script type='text/javascript'&gt; var so = new SWFObject('player.swf','mpl','640','360','9'); so.addParam('allowfullscreen','true'); so.addParam...

    PHP基础教程 是一个比较有价值的PHP新手教程!

    $a and $b :与 $a xor $b :异或 (当$a或$b为true时为true,两者一样时为false) ! $a :非 比较运算符有: $a == $b :相等 $a != $b :不等 $a &lt; $b :小于 $a &lt;= $b :小于等于 $a &gt; $b :大于 $a &gt;= $b :大于...

    git常用命令

    第一次执行会出警告:warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory. 警告处理:需要配置用户信息 git config user....

    替换文本文件中Ant表达式的Ant扩展任务

    kingspider.tools.ant.task.CopyWithReplace by Kingspider ... 该程序为Ant的扩展任务,在拷贝文本格式的文件的同时... tofile="${basedir}/test/replaced/application.xml" encoding="UTF-8"/&gt; &lt;/target&gt; &lt;/project&gt;

    基于extjs的.NET3.5控件Coolite 1.0.0.34580(Preview预览版)

    Renaming all &lt;Body&gt; tags in a project to &lt;Content&gt; can be easily accomplished with a case-sensitive search and replace within Visual Studio. Please search for the following (remove double ...

    FusionCharts图片保存实例-绝对可用

    This text will be replaced by the chart.&lt;/div&gt; &lt;div id="fcexpDiv" align="center"&gt;FusionCharts Export Handler Component&lt;/div&gt; [removed] var myChart = new FusionCharts("FCF_Column2D.swf", ...

    Newfad-Generator:方法论流行语生成器

    Newfad-Generator 方法论流行语生成器 这个项目是为了好玩而制作的,它...-- The following value should be replaced with correct property id. --&gt; &lt; string xss=removed&gt;UA-########-#&lt;/ string&gt;&lt;/ resources&gt;

    google api php client

    This can be done by passing a [PSR-6](http://www.php-fig.org/psr/psr-6/) compatible library to the client: ```php use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; use Cache\...

    2013年九年级英语上册 Module 4 Great inventions Books can't be replaced b

    2013年九年级英语上册 Module 4 Great inventions Books can't be replaced by computers文章背景材料 外研版

    flash标签云 3D效果 PHP插件 by weefselkweekje

    This 'tag' will be replaced by the flash movie when viewing the page. 1. Add the following code anywhere in your theme to display the cloud. `&lt;?php wp_cumulus_insert(); ?&gt;` This can be used to add WP...

    Assembly Language Succinctly Syncfusion 2013

    An assembly language is the language of a CPU but the numbers of the machine code are replaced by easy to remember mnemonics Instead of programming using pure hexadecimal such as 83 C4 04 programmers ...

    Git-2.21.0-64-bit.zip

    refs/worktrees/&lt;wtname&gt;/ hierarchy, which means that worktree names must be a valid refname component. The code now sanitizes the names given to worktrees, to make sure these refs are well-formed. ...

    Building Web Components with TypeScript and Angular 4

    Unlike most web apps, Angular apps are based on components, which means they're composed of interchangeable software elements that can be replaced and re-used. Angular's modularity ensures rapid ...

    PLSQL.Developer v11.0.4.1774 主程序+ v11中文包+keygen

    You can now use comma's in substitution variable lists and checkboxes by specifying 2 comma's: &&lt;name="Exception?" checkbox="raise_application_eror(-20000,, '[#]'), null"&gt; Substitution variable ...

Global site tag (gtag.js) - Google Analytics