Create a sub folder in res
called color
. Use that folder to create new color selectors.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="pressed_color"/>
<item android:color="default_color"/>
</selector>
From there, use the TextView:textColor
attribute and apply the selector.
android:textColor="@color/your_selector"
Edit
First, remove the line android:drawSelectorOnTop="true"
from your ListView
. This is the reason the item in your ListView
is being covered up. Next, create a custom selector for your row background that uses a transparent color when the item is touched. This way, your list selector will be shown in place of the background of the item.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/transparent" android:state_pressed="true"/>
<item android:drawable="your_default_color"/>
</selector>
Apply this selector to using the android:background
attribute.