Chinaunix
标题:
自定义style:TextAppearance.NotColors与NotColors区别
[打印本页]
作者:
风情123
时间:
2012-08-06 11:12
标题:
自定义style:TextAppearance.NotColors与NotColors区别
本帖最后由 风情123 于 2012-08-06 11:13 编辑
请教下:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="TextViewWithColorButWithOutAppearance">
<item name="android:textColor">#ff0000ff</item>
</style>
<style name="TextAppearance" parent="android:TextAppearance">
</style>
<style name="TextAppearance.WithColor">
<item name="android:textColor">#ffff0000</item>
</style>
<style name="TextAppearance.All">
<item name="android:textColor">#ff00ff00</item>
<item name="android:textSize">20sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColorHint">#ffff0000</item>
<item name="android:textColorLink">#ff0000ff</item>
<item name="android:textColorHighlight">#ff00ff00</item>
</style>
<style name="TextAppearance.Colors">
<item name="android:textColor">#FF000000</item>
<item name="android:textColorHint">#ff0000ff</item>
<item name="android:textColorLink">#ff00ff00</item>
<item name="android:textColorHighlight">#ffff0000</item>
</style>
<style name="TextAppearance.NotColors">
<item name="android:textSize">17px</item>
<item name="android:typeface">sans</item>
<item name="android:textStyle">normal</item>
</style>
<style name="TextAppearance.Style">
<item name="android:textStyle">normal</item>
</style>
</resources>
中将<style name="TextAppearance.NotColors">
改名为
<style name="NotColors">
那么改名前后有什么不同?
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2