android布局文件中android:icon="?attr/menuIconCamera"找不到对应图标路径
如
<item android:id="@+id/camera"
android:title="Camera"
android:icon="?attr/menuIconCamera"
android:showAsAction="ifRoom" />
其中图标不是通常用的@drawable/ic_menu_camera_holo_light,而用?attr/menuIconCamera代替,而找到menuIconCamera,却没有图标对应
<resources>
<declare-styleable name="AppTheme">
<attr name="menuIconCamera" format="reference" />
<attr name="menuIconToggle" format="reference" />
</declare-styleable>
SDK中对此一段描述:
For example, here's how you can reference an attribute to set the text color to match the "primary" text color of the system theme: <EditText id="text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="?android:textColorSecondary"
android:text="@string/hello_world" />
Here, the android:textColor attribute specifies the name of a style attribute in the current theme. Android now uses the value applied to the android:textColorSecondary style attribute as the value for android:textColor in this widget. Because the system resource tool knows that an attribute resource is expected in this context, you do not need to explicitly state the type (which would be ?android:attr/textColorSecondary)—you can exclude the attr type.(在这里,android:textColor属性指定一个样式的名称属性在当前主题。Android现在使用的值应用于Android:textColorSecondary样式属性的值为Android:textColor在这个小部件。因为系统资源工具知道一个属性资源预计将在这种情况下,您不需要显式地声明类型(这将是? android:attr / textColorSecondary)-你可以排除attr类型。)
其实要找到menuIconCamera对应图标可以在styles.xml中找到
<item name="menuIconCamera">@drawable/ic_menu_camera_holo_light</item>
android布局文件中android:icon="?attr/menuIconCamera"找不到对应图标路径的更多相关文章
- android 布局文件中xmlns:android="http://schemas.android.com/apk/res/android"
http://blog.163.com/benben_long/blog/static/199458243201411394624170/ xmlns:android="http://sch ...
- android xml 布局文件中 android:ems="10"
宽度为10个字符的宽度 xml中 android:ems属性 ,作为EditText 默认生成 的属性,其含义是需要编辑的 字符串长度 .设置为10时,最多编辑 10个em ,一个em单位是 两个in ...
- Android查缺补漏(View篇)--布局文件中的“@+id”和“@id”有什么区别?
Android布局文件中的"@+id"和"@id"有什么区别? +id表示为控件指定一个id(新增一个id),如: <cn.codingblock.vie ...
- Android 自定义View及其在布局文件中的使用示例
前言: 尽管Android已经为我们提供了一套丰富的控件,如:Button,ImageView,TextView,EditText等众多控件,但是,有时候在项目开发过程中,还是需要开发者自定义一些需要 ...
- Android 自定义View及其在布局文件中的使用示例(三):结合Android 4.4.2_r1源码分析onMeasure过程
转载请注明出处 http://www.cnblogs.com/crashmaker/p/3549365.html From crash_coder linguowu linguowu0622@gami ...
- Android 自定义View及其在布局文件中的使用示例(二)
转载请注明出处 http://www.cnblogs.com/crashmaker/p/3530213.html From crash_coder linguowu linguowu0622@gami ...
- Android中布局文件中使用onClick属性
安卓开发中,布局文件中的控件有一个属性,是onClick,例如: <Button android:id="@+id/button1" ...
- android布局layout中的一些属性
1.可以使某些资源文件或UI组件可重用 <include layout="@layout/other"/> 2.定义一个文本编辑框,使用绝对定位 android: ...
- Xamarin Android布局文件没有智能提示
Xamarin Android布局文件没有智能提示 在Visual Studio 2015中,Android项目的Main.axml文件没有智能提示,不便于布局文件的编写.解决办法:(1)从Xamar ...
随机推荐
- samba server install
要求: create vnc service for win7 access it via vnc viewer. 1TB disk for this Centos PC is used as Sam ...
- QQ在线客服设置
QQ在线客服设置 1.客户在添加QQ在线客服后,需要让用户在线不需要添加为好友就能在线对话,一般默认设置下会显示"您需要添加对方为好友+才能给对方发送会话消息",具体解决方法如下: ...
- java分割字符串
经验分享: 1.分隔符为“.”(无输出),“|”(不能得到正确结果)转义字符时,“*”,“+”时出错抛出异常,都必须在前面加必须得加"\\",如split(\\|); 2.如果用& ...
- Jquery,javascript 的处理机制
$(document).ready(function () { function get() {// $.ajax({// type: "Post& ...
- Understanding ASP.NET MVC Filters and Attributes
这篇文章把Asp.net MVC的filter介绍的很详细,值得收藏. http://www.dotnet-tricks.com/Tutorial/mvc/b11a280114-Understandi ...
- Linux 学习笔记(一) 入门
Shell 显示Shell类型 $ps 切换Shell $[Shell 名称] ex. $tcsh 快捷键 Ctrl + Z:挂起,可用jobs查看到,fg恢复运行 Ctrl + W:删除单词 Ct ...
- .net与mono的那些事
米格尔·德伊卡萨在.NET的文档于2000年10月发布时就马上对.NET产生了兴趣.在查看字节码解释器后,他发现对于元数据(metadata)没有相应的说明文档.2001年2月,德伊卡萨在.NET邮件 ...
- 基于jquery的图片轮播 (IE8以上)
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- 算法:POJ1008 Maya Calendar
此题非常水,不做说明. package practice; import java.io.BufferedInputStream; import java.util.Scanner; /** * @a ...
- httpclient瓶颈
问题现象: 1.系统异常,应用拒绝访问. 2.web容器线程爆满 问题分析: 1.数据库正常 2.日志信息没有异常 问题思考: 1.应用访问量突破顶峰. 2.应用在某处存在瓶颈 发现问题: 需要了解线 ...