Button with BOTH color and background image

android, background, background-image, button, xml

Solution

(Don't) Use an ImageView

Set your set your green button background image as the background, and your transparent png as the src. You can apply a selector to the background just the same as you would to a button also...

EDIT: Actually there is an ImageButton already made for this, you should be using that instead. Slipped my mind.

Problem

Is there any way to set the color and background image for a button? I want a green button with a transparent .png but it seems you can only have one or the other.

Original source