Is there a way to specify an alternative background image/color for a Button in the XML file that is going to be applied onClick, or do I have to do a Button.setBackground() in the onClickListener?
Is there a way to specify an alternative background image/color for a Button in
Share
To change the image by using code:
Or, using an XML file:
In
OnClick, just add this code: