/ Published in: Java

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//set up (normal) and down (pressed) states for a button Drawable imageUp = null; Drawable imageDown = null; //set Drawable images here StateListDrawable stateListDrawable = new StateListDrawable(); stateListDrawable.addState(new int[] {android.R.attr.state_pressed},imageDown); stateListDrawable.addState(StateSet.WILD_CARD, imageUp); theButton.setBackgroundDrawable(stateListDrawable);
Comments
