You need to define the background as a new XML file containing a list of states.
http://developer.android.com/guide/topics/resources/color-list-resource.html
For example, create a file called background_states.xml in your drawable folder and write something like this:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_selected="true"
android:drawable="@color/white" ></item>
<item
android:state_pressed="true"
android:drawable="@color/white" ></item>
<item
android:drawable="@color/black" />
</selector>
Then define this new file as background in your TextView:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/background_states"
See the link above for more information about the different states.