Hi there, I am currently trying to customize ImageButton to show different draweables as background of the Button while keeping the image set via the src attribute.
That's my custom_button.xml: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/round_list_item" /> <!-- pressed --> <item android:state_focused="true" android:drawable="@drawable/round_list_item" /> <!-- focused --> <item android:drawable="@drawable/transparent" /> <!-- default -- > </selector> And this is the actual definition of the ImageButton: <ImageButton android:background="@drawable/custom_button" android:src="@drawable/attach_icon" android:id="@+id/test_button" android:layout_height="35dip" android:layout_width="35dip"></ ImageButton> Unfortunately all I get is the background from the selector xml (whichs is btw working as expected) but not the image I have set via the src attribute. So basically all I want is to replace the standard state background drawables while keeping the ability to set a foreground/content image. Am I doing something wrong here? Greetings, maui -- 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