I had a same problem. I think the order is somewhat important.(I don't understand why the order matters, though. maybe a bug?)
Have a look at the default button and change the order like this. http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/drawable/button_inset.xml On Nov 19, 11:25 pm, Jags <[email protected]> wrote: > having done that, I figured out I only need my buttons be focussed on > touch not by center or 5way nav buttons, is there a way to do that ? > > On Nov 19, 8:13 pm, Jags <[email protected]> wrote: > > > it seems it is not working with imagebuttons but working with buttons > > >http://groups.google.com/group/android-developers/browse_thread/threa... > > > Jagat > > > On Nov 19, 5:49 pm, Jags <[email protected]> wrote: > > > > <?xml version="1.0" encoding="utf-8"?> > > > <selector xmlns:android="http://schemas.android.com/apk/res/android"> > > > <item android:drawable="@drawable/image1" /> <!-- default --> > > > <item android:state_pressed="true" android:drawable="@drawable/ > > > image2" /> <!-- pressed --> > > > <item android:state_focused="true" android:drawable="@drawable/ > > > image3" /> <!-- focused --> > > > </selector> > > > > i wrote this in btnattr.xml file in drawale. > > > > and in my main.xml i wrote > > > <ImageButton android:id="@+id/ImageButton09" > > > android:layout_width="80px" > > > android:layout_height="80px" > > > android:src="@drawable/btnattr" > > > android:scaleType="fitXY" > > > android:layout_marginLeft="20dip" > > > android:layout_marginTop="20dip" > > > android:background="@android:color/ > > > transparent"></ImageButton> > > > > when the application is run, the image1 is displayed, expected. > > > > but when i press the button image2 is not displayed ! where am I going > > > wrong ? > > > > Thanks for helping > > > > regards > > > Jagat -- 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

