I have a imagebutton with a image source with transparency, but the background color of the imagebutton is the tipical gray button color.
I want set background = @null and this works fine.
But, when i press this imagebutton i can not see the color that indicates that I am pressing the button.
if i remove background = @null when i pressing the button, change the color for the user know you are pressing.
I read that you can make a xml with 3 images specifying when the button is pressed, when this normal and when it has focus. But I think exists an easier way to do.
Following the above answers, use a selector drawable(for the background, instead of
null) that has the default state set to a transparent color:*selector_with_transparency:*
pressed:
transparent:
and then for the
ImageButton: