1. In Colors.xml, add two item. Note that the label for these two item is <drawable>, not <color>!
<name="Primary_green" > #8cb800 </drawable>
<name="Gray" > #C2C2C2 </
2. Add Txt_color_green_gray.xml in drawable. android:color < Span style= "color: #ff0000;" > instead of android:d rawable.
<?XML version="1.0"encoding="Utf-8"?>
<SelectorxmlnsAndroid="Http://schemas.android.com/apk/res/android" >
<ItemAndroid: color="@drawable/gray"
android: state_pressed="true"/>
<item Android: color="@drawable/primary_green"
android: state_pressed="false"/>
</selector>
3. Use the Txt_color_green_gray.xml created above in TextView:
<TextView
Android: layout_width="Match_parent"
Android: layout_height="Wrap_content"
Android: clickable="True"
android: Gravity= android:text= android:textcolor= "@drawable/txt_color_green_gray"
android: Textsize=
Color change when you click on Android text