NOTE:Android Styles and Themes的一些需要注意的小细节
2013-10-21 12:14
423 查看
1. 继承: 在运用系统自带的风格时只想改变其中一些小的方面,当然,我们可以直接在布局文件中控件的属性里重写这个属性即可。因为在布局文件中定义的属性的优先级>我们在style中定义的属性。
若是继承自己定义的style时可以使用下面格式,继承于CodeFont.但不适用于继承系统自带的style
2. style内容:可以上Android developer查找特定类的XML attributes,还有些属性是不属于任何view,只属于window的.
However, if you apply a style to a View that does not support all of the style properties, the View will apply only those properties that are supported and simply ignore the others.
你所定义的style,并不一定适用于所有的视图,有些属性试图并不支持,这个时候,视图将只会运用它所支持的属性,忽略掉剩下的属性.
3. 应用style:
(Note that the color needs to supplied as a separate resource here because the
注意到
若是继承自己定义的style时可以使用下面格式,继承于CodeFont.但不适用于继承系统自带的style
2. style内容:可以上Android developer查找特定类的XML attributes,还有些属性是不属于任何view,只属于window的.
However, if you apply a style to a View that does not support all of the style properties, the View will apply only those properties that are supported and simply ignore the others.
你所定义的style,并不一定适用于所有的视图,有些属性试图并不支持,这个时候,视图将只会运用它所支持的属性,忽略掉剩下的属性.
3. 应用style:
#b0b0ff
(Note that the color needs to supplied as a separate resource here because the
android:windowBackgroundattribute only supports a reference to another resource; unlike
android:colorBackground, it can not be given a color literal.)
注意到
android:windowBackground只支持对另一资源的引用,这与
android:colorBackground不一样.
相关文章推荐
- Android开发的一些需要注意的细节
- Android开发的一些需要注意的细节
- Android开发的一些需要注意的细节
- 一些细节,需要注意;一些小错,难以察觉(Android SharedPreferences、Thread、Toast、AsyncTask)
- UI 设计师在给 iOS 或 Android 开发者提供资源图的时候需要注意哪些细节?
- Android Styles and Themes
- 作为Linux小白,一些需要注意的小细节
- Android开发入门:样式和主题(Styles and Themes)
- Applying Styles and Themes - 应用Style和Theme - Android官方文档中文翻译
- android--Styles and Themes
- Android .mk文件中需要注意的一些宏
- Java transient关键字使用小结及一些需要注意的细节
- 曾经遇到的一个面试题,快速排序用链表实现,算法和以前的相似,需要注意一些细节处理
- nginx一些需要注意的细节
- Android中文出现乱码时需要注意的一些地方
- Android 用户界面---样式和主题(Styles and Themes)(二)
- Java transient关键字使用小结及一些需要注意的细节
- 新手SqlServer数据库dba需要注意的一些小细节
- Android - Styles and Themes
- C++ 一些需要注意的细节