What i have: I have a calculator layout, with many buttons. And each button has two images.
One for Pressed state ,
Second for Pressed Released State
These images work accordingly when the button is pressed and released but these all graphics has made my widget size big.
What i want: i want to used only one image for the button and then apply a alpha (Transparency) on the pressed button in such a way that when it is pressed, it grows some dark in color. In this way i can used less graphics for my widget and size will automatically decrease.
I want to implement all this in a XML file..either as a style or etc.
Plz explain with some example.
Thanks in advance.
Use android built-in color transparent: