I want to change the background image of a button when clicked or focused.
This is my code:
Button tiny = (Button)findViewById(R.id.tiny); tiny.setOn
you can implement in a xml file for this as follows:
//means normal
now save this xml file in drawable folder and name it suppos abc.xml and set it as follows
Button tiny = (Button)findViewById(R.id.tiny); tiny.setBackgroundResource(R.drawable.abc);
Hope it will help you. :)