tags:

views:

216

answers:

0

Hi,

I am trying to setup a selector drawable in my asset file like this: * 2 different images for 'on'/'off' mode in rest mode (i.e. it does not has focus) * another 2 different images for 'on'/'off' mode in focus mode (i.e. it has the focus).

In my case, the 'rest' mode works, but the 'focus' mode does not.

Can you please tell me what am I missing in the focus mode? Thank you.

<!-- these 2 images works --->
<item android:state_checked="false" android:drawable="@drawable/off" />
<item android:state_checked="true" android:drawable="@drawable/on" />

<!-- these 2 images does not work -->
<item android:state_focused="true" android:state_checked="false"

android:drawable="@drawable/off_focus" />

<item android:state_focused="true" android:state_checked="true"

android:drawable="@drawable/on_focus" />