1
2
3
4
5
6
7
8
9
10
//@ drawable folder a XML named textview_click_color.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:color="@android:color/white"></item>
<item android:state_focused="true" android:color="@android:color/white"></item>
<item android:state_pressed="true" android:color="#FF8000"></item>
<item android:color="#FFFFFF"></item>
</selector>
1
2
3
4
//@ activity XML
<textview android:id="@+id/link_to_register" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:text="forgot your login?" android:textcolor="@drawable/textview_click_color" android:clickable="true" android:onclick="link_Clicked" android:textsize="20sp"></textview>
origin - http://www.pipiscrew.com/?p=642 android-make-a-textview-clickable-change-color-on-click