1,res/drawable下建立一个textview_style.xml文件用来定义textview的两种风格
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"><item android:state_pressed="true" android:drawable="@color/blue" />
<item android:drawable="@color/transparent_background" />
</selector>
2,res/values下建立colcors.xml文件,定义color的值,
<resources><color name="transparent_background">#ffffffff</color>
<color name="blue">#ff87cefa</color>
</resources>
3,