textView字体颜色根据不同状态显示不同颜色
2013-07-22 10:42
549 查看
XML file saved at
This layout XML will apply the color list to a View:
res/color/button_text.xml:
<?xml version="1.0" encoding="utf-8"?> <selectorxmlns:android="http://schemas.android.com/apk/res/android"> <itemandroid:state_pressed="true" android:color="#ffff0000"/><!-- pressed --> <itemandroid:state_focused="true" android:color="#ff0000ff"/><!-- focused --> <itemandroid:color="#ff000000"/><!-- default --> </selector>
This layout XML will apply the color list to a View:
<Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/button_text" android:textColor="@color/button_text"/>
相关文章推荐
- 【Android】一个TextView显示不同颜色字体
- TextView内容设置显示不同的字体颜色和不同的字体大小
- TextView内容设置显示不同的字体颜色和不同的字体大小
- TextView显示不同颜色字体
- android中TextView分段显示不同颜色,字体,时间
- TextView显示不同颜色字体的实现
- 一个textView中显示两种不同的字体(颜色,大小)
- android 一个TextView中显示不同颜色的字体
- 设置textview显示不同的字体和颜色
- 在一个TextView中字体显示不同颜色
- android中TextView分段显示不同颜色,字体,时间
- 给TextView设置不同状态下的字体颜色
- android中的spannable的使用(TextView分段显示不同颜色,字体,时间 )
- textview中显示不同颜色的字体与显示图片
- android开发中TextView字体显示不同颜色
- TextView显示两种不同的字体颜色
- android中TextView分段显示不同颜色,字体,时间
- android中TextView分段显示不同颜色,字体,时间
- android中TextView分段显示不同颜色,字体,时间
- 在一个textview中显示两种不同颜色的字体