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 <jag...@gmail.com> 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 <jag...@gmail.com> 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 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