Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

change button background drawable in code Close

if(v.getBackground().getConstantState().equals(getResources().getDrawable(R.drawable.bg_btn_black_outline).getConstantState()))
        {
            v.setBackgroundResource(R.drawable.bg_btn_black);
        } else {
            v.setBackgroundResource(R.drawable.bg_btn_black_outline);
        }
 
PREVIOUS NEXT
Tagged: #change #button #background #drawable #code #Close
ADD COMMENT
Topic
Name
2+3 =