Why The Background Color Does Not Change When I Move Focus Away From A List View?
I have a layout like this: -------------------------------------------------------------------------------------- | Menu | Content
Solution 1:
Your problem is the state you are using. Just change
<itemandroid:drawable="@android:color/black"android:state_selected="true"/>
to
<item
android:state_selected="true"android:state_focused="true"android:drawable="@android:color/black" />
and it should work as intended :-)
As a side note, it is a general practice to put the drawable part after the state values.
Post a Comment for "Why The Background Color Does Not Change When I Move Focus Away From A List View?"