hi

i have image close_hover.png in my drawables. its png 35x29 truecolor
with alphachannel

i can use it with image button if i put this to layout xml
<ImageButton android:src="@drawable/close_hover"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

now i create colorstate xml which looks like this

close_c.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android";
android:constantSize="true">
<item
     android:drawable="@drawable/close_hover"
/>
</selector>

and change ImageButton to
<ImageButton android:src="@drawable/close_c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

now image doesn't show, i see button with background and everything,
but there is no image on it

in same application i have 5 more imagebuttons with colorstates with
other images and all work. this is only one which doesn't

i am fighting with this for few days and found no solution, it looks
like black magic to me

any idea what could be wrong?

-- 
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