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 ...
随机推荐
- 关于NPOI导入导出
http://www.360doc.com/content/14/0110/16/432969_344152497.shtml NPOI汇入Excel仅支持2007版本以内: [HttpPost] p ...
- MongoDB与内存
来自 http://www.ttlsa.com/mongodb/mongodb-and-memory/# 但凡初次接触MongoDB的人,无不惊讶于它对内存的贪得无厌,至于个中缘由,我先讲讲Linu ...
- [后端人员耍前端系列]AngularJs篇:使用AngularJs打造一个简易权限系统
一.引言 上一篇博文已经向大家介绍了AngularJS核心的一些知识点,在这篇博文将介绍如何把AngularJs应用到实际项目中.本篇博文将使用AngularJS来打造一个简易的权限管理系统.下面不多 ...
- 用JQuery仿造QQ头像裁剪功能
最近工作真心忙碌,几乎没时间写博客.今天趁周末来仿一个QQ头像裁剪功能插件.效果如下: 所有文件都可在我的Github上下载,从头到尾从简到繁按步骤一共分了9个HTML文件,每个步骤文件里的注释都写的 ...
- Linux Shell变量
200 ? "200px" : this.width)!important;} --> 介绍 变量是shell脚本中必不可少的组成部分,在脚本中使用变量不需要提前声明.在ba ...
- [PCB设计] 1、硬件原理图设计规范(一)——基本原则
1.1 目的 原理图设计是产品设计的理论基础,设计一份规范的原理图对设计PCB.跟机.做客户资料具有指导性意义,是做好一款产品的基础.原理图设计基本要求: 规范.清晰.准确.易读. 因此制定此< ...
- 如何在 IIS 上搭建 mercurial server
mercurial server 对于代码管理工具,更多的人可能更熟悉 Git 一些(Git 太火了).其实另外一款分布式代码管理工具也被广泛的使用,它就是 mercurial.多人协作时,最好能够通 ...
- 推荐10个很棒的AngularJS学习指南
AngularJS 是非常棒的JS框架,能够创建功能强大,动态功能的Web app.AngularJS自2009发布以来,已经广泛应用于Web 开发中.但是对想要学习Angular JS 的人而言,只 ...
- 使用Async和Await进行异步编程(C#版 适用于VS2015)
你可以使用异步编程来避免你的应用程序的性能瓶颈并且加强总体的响应.然而,用传统的技术来写异步应用是复杂的,同时编写,调试和维护都很困难. VS2012介绍了简单的方法,那就是异步编程,它在.Net F ...
- Git学习笔记(6)——Bug和Feature分支
本文主要记录了通过Git来调试Bug和添加新的功能,也就是Bug分支和Feature分支,以及分支的推送. Bug分支 通过Git,我们可以为每个Bug建立一个分支,Bug修复后,合并分支,然后将临时 ...