Hi! You have to create two background images for you ImageButton... one the regular background and the other the Orange background... then you create an xml like this one
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/ button_pressed" /> <item android:drawable="@drawable/button_unpressed" /> </selector> you name the xml as you want it, and on the ImageButton properties you set the background to the name of the xml file... Hope this helps Best Regards On Mar 26, 10:54 pm, jsdf <[email protected]> wrote: > Hi all, > I've set the background image of a custom ImageButton I am building, > as well as setClickable(true) and setFocusable(true). The button is > able to receive focus when I navigate with DPad/arrow keys in the > emulator, however, it does not flash orange when it has the focus. It > does not appear to change at all when it has the focus, in fact. > When I remove the background image, however, the ImageButtons hold > orange when they have focus. > > What do I need to do to be enable an ImageButton with a custom > background image to flash orange when it has focus? > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

