1、新建:color/*.xml文件
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#ffffff"/>
<item android:state_pressed="false" android:color="#89683B"/>
</selector>
3、目标TextView
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/textview" android:clickable="true"/>
原文链接:https://www.f2er.com/xml/298089.html