it seems it is not working with imagebuttons but working with buttons

http://groups.google.com/group/android-developers/browse_thread/thread/3b193e2a1a74cb38/fd66c64817e56052?show_docid=fd66c64817e56052&fwc=1

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

Reply via email to