标签:
TextView 添加Selector的背景和颜色不能正常运行,原因,textview未设置clickable
<TextView
android:id="@+id/tv_edit"
android:layout_width="63dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_margin="10dp"
android:background="@drawable/background_donwload_edit"
android:gravity="center"
android:text="@string/edit"
android:textColor="@color/kk_download_edit_color"
android:textSize="12sp"
android:clickable="true"
/>
background_donwload_edit.xml文件
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/kk_download_edit_normal" android:state_pressed="false"></item>
<item android:drawable="@drawable/kk_download_edit_pressed" android:state_pressed="true"></item>
</selector>
TextView 添加Selector的背景和颜色不能正常运行
标签:
原文地址:http://blog.csdn.net/leehu1987/article/details/45669329