0
After button click it changes variable
I have a variable named ( _text-) I what to detect what button was clicked for example when button_a is clicked it then inserts the letter a at (3, "a") So now the variable _text- = "texat" ( coding in Android studio)
1 Respuesta
0
You can have a char variable, say buttonChar and assign appropriate characters inside every button's onClick() function. You can finally use a switch case with buttonChar as your switch variable and manipulate variable _text.