理清android中values, values-v11, value-v14之间的关系
来源:互联网 发布:手机淘宝轮播图尺寸 编辑:程序博客网 时间:2024/04/29 14:11
http://blog.csdn.net/luofeixiongsix/article/details/48438093(1)这三个folder是否是父子关系?答案:不是,这个三个folder以匹配的方式进行工作。values-14:针对API>=14以上的,API小于14,根本就用不到它。value-11: 针对API在11以上和13以上的,如果values-14存在的话。如果values-14不存在,则API 11以上都要使用该文件夹。另外API在11一下则无法使用该文件夹。values: 是缺省的文件夹且最后被匹配的,它包含在value是-11和values-14中没有包含的API水平。一般缺省都使用这个文件夹。(2)是不是只需要在V11和V14指定特殊的,其他的全放在values就可以了?答案:是
在国外的网站上找到这么一段话 (http://stackoverflow.com/questions/16624317/styles-and-themes-on-values-values-v11-and-values-v14-folders):
More generally, my question is, are these 3 folders working as parent and child?
Those folders work with a "most specific" matching system meaning it will match the closest(lower) API level values
folder:
values-v14
targets APIs >=14
(it will not be selected at all for versions below14
)values-v11
targets APIs between(and including)11
and13
ifvalues-v14
is present otherwise it will match every version starting with11
and above((it will not be selected at all for versions below11
))values
is the default folder and it will be the last to be matched, covering other APIs levels not covered by anothervalues-xx
folder. You should always(as with all resources folders) have this folder in your app
If it is indeed the way it is working, does it make sense then to setup the maximum of styles in the parent folder values and add only specific ones in v11 or v14?
Yes, this is how the Android project template is built(when you use Create new project...
), it actually tells you to use the values-xx
folders for customization(different look, use of newer styles, attributes):
<!-- in the styles.xml from the v-14 values folder: --> <!-- API 14 theme customizations can go here. -->'
- 理清android中values, values-v11, value-v14之间的关系
- 理清android中values, values-v11, value-v14之间的关系
- 理清android中values, values-v11, value-v14之间的关系
- Android 项目中values-v11 values-v14
- values-v11 values-v14
- 兔子-Android 项目中values-v11 values-v14
- android values-v11和values-v14文件夹是干啥的?
- android values-v11和values-v14文件夹是干啥的?
- android res文件夹下面的 values-v11 、 values-v14
- values-v11和values-v14的作用
- Android 项目中values-v11 values-v14这两个文件夹中的style.xml是干嘛的?
- values v11 v14
- Android 布局文件中的values-v11,values-v14,values-v19代表的含义
- Android基础——values-v11 values-v14
- Android 项目中values-v11 values-v14这两个文件夹中的style.xml作用
- Android布局文件Values、Values-v11关系
- 创建Android新工程时,丢失MainActivity.java文件,丢失R.java文件,values/values-v11/values-v14 styles.xml文件出错
- android 程序中res/values-v14/styles.xml报错的解决办法
- Hadoop Yarn事件处理框架源码分析
- JAVA并发编程
- Sass&Compass快速入门总结
- Trapping Rain Water LeetCode JavaScript JS
- alternatives 命令
- 理清android中values, values-v11, value-v14之间的关系
- listview 报java.lang.IllegalStateException异常的原因之一
- Java之重载,隐藏,静态绑定,动态绑定
- ecshop重新导入数据库,管理员和密码正确登录失败
- 基于Caffe的CNN剪枝
- Android 解决ViewPager设置高度为wrap_content无效的方法 MyViewPager
- require.js的一次简单尝试
- vs引用错误不提示代码出错
- Windows下安装并设置Redis