I cannot seem to get the selector to work - even inside a normal view. is there some trick to getting the selector to work? I have google'd for examples and tutorial and looked at -- http://dev.android.com/reference/android/widget/ImageButton.html, but I cannot get the view to change when I set the focus there. argh...
On Oct 7, 11:32 am, sdphil <phil.pellouch...@gmail.com> wrote: > i am having trouble getting a selector to work inside a button on an > app widget. > > my app widget xml looks like this: > > <ImageButton android:id="@+id/MyImageButton" > android:layout_width="wrap_content" > android:layout_height="fill_parent" > android:src="@drawable/my_selector" > android:background="@color/transparent"/> > > my_selector.xml in my drawable directory looks like this: > > <selector xmlns:android="http://schemas.android.com/apk/res/android"> > <item android:drawable="@drawable/MyNormalButton" /> > <item android:state_focused="true" android:state_pressed="false" > android:drawable="@drawable/MyFocusButton" /> > <item android:state_focused="true" android:state_pressed="true" > android:drawable="@drawable/MyFocusButton" /> > <item android:state_focused="false" android:state_pressed="true" > android:drawable="@drawable/MyFocusButton" /> > </selector> > > the button doesn't change appearance.... > > any ideas? > > tia. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---