0
Doubt about increasing value
Hello everyone! I have recently been learning to program and I have a basic question: I need to create a button in Android Studio, which when touched, increases the value by 1. It's basically a counter. I type this and the app breaks: public void Add(View view){ int shot = 0; shot++; et1.setText(shot); }
2 Respuestas
0
agrega un ActionListener al boton pars que capture ls accion y haga lo que deseas.
0
Emilio, add a ActionListener for increment the value.