What should I add so that I can toggle between textviews upon each click? It only works for one click. This is probably an easy fix, so thanks in advance!
public void status(View view) {
TextView textView2 = findViewById(R.id.textView2);
if (textView2.getText() == "uhuh") {
textView2.setText("u uh");
} else {
textView2.setText("u huh");
}
}
Aucun commentaire:
Enregistrer un commentaire