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 But
onClick
But
public void methodOnClick(View view){ Button.setBackgroundResource(R.drawable.nameImage); }
i recommend use button inside LinearLayout for adjust to size of Linear.