use state_selected, not focused. On Sun, Feb 15, 2009 at 12:08 AM, Meryl Silverburgh <silverburgh.me...@gmail.com> wrote: > > 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. > > <?xml version="1.0" encoding="utf-8"?> > <selector xmlns:android="http://schemas.android.com/apk/res/android"> > > <!-- 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" /> > > </selector> > > > >
-- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---