Answers for "change button text when clicked android studio"

0

change button text when clicked android studio

@Override
public void onClick(View v) {
    if(v.getId() == R.id.yourbuttonid) {
        btn.setText("X");
    }else if(v.getId() == R.id.yourbuttonid2){
        btn2.setText("X");
    }
}
Posted by: Guest on October-07-2021

Code answers related to "change button text when clicked android studio"

Browse Popular Code Answers by Language