I am struggling with this which apparently is a very simple effect but incredibly haven\'t found any intutitive way for doing it in Android.
I have a ListView and I
Neither of these are possible answers when your ListView is compromised of a layout that has multiple views. You need to set your child views to:
android:duplicateParentState="true"
Now you can use the methods others have described above to declare your TextViews' colors using a selector such as:
android:textColor="@drawable/my_row_selector"
and I'm sure you're aware, but the selector can be as simple as:
As you can see, @color values are allowed. Hope this helps.
Also - android:state_pressed is used in conjunction with the AdapterView.OnItemClickListener.