I have a customized ListView
that each row of the list is composed by an ImageView
and two TextView
\'s. I want to change the text\'s c
Create a new StateListDrawable like you did before but with black as default color and white when pressed.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:color="@color/black" />
<item android:state_focused="true" android:color="@color/black" />
<item android:state_pressed="true" android:color="@color/black" />
<item android:color="@color/white" />
</selector>
Now for in the TextView change the text color to the new drawable:
android:textColor="@color/list_item_text"
More on StateListDrawables: http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList