Animated transition between button state

view story

http://stackoverflow.com – I created class wich extends Button and redefined onTouch(catch ACTION_DOWN and ACTION_UP) on button. Also I have two images for a button: one for the normal state, and one for the selected state. I'd like to make smooth transition between selected and normal button states. How can I change selected state background alpha (100 to 0) and normal state background alpha (0 to 100) at the same time? public class AnimateButton extends Button { @Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: break; (HowTos)