Reputation: 1043
In my app i'm setting background to each child views in listview. So that listview default focus ( orange color ) is not focusing.
Is there any way to set both ( listview focus & child view background ) ?..
Edit: This is my code:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="schemas.android.com/apk/res/android">;
<item android:state_focused="true"
android:state_pressed="false"
android:drawable="@drawable/img_focused" />
<item android:state_focused="true"
android:state_pressed="true"
android:drawable="@drawable/img_selected" />
<item android:state_focused="false"
android:state_pressed="true"
android:drawable="@drawable/img_selected" />
<item android:drawable="@drawable/img_default" />
</selector>
Upvotes: 0
Views: 1105
Reputation: 21
You can try following states sort order:
<item android:drawable="@drawable/poster_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/poster_focused" android:state_focused="true"/>
Upvotes: 2