Ubah teks tombol saat mengklik studio Android

@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");
    }
}
Uptight Unicorn