0
Good, can someone tell me how to set a limit to the number of clicks on a button, and when you reach that limit, prevent the button from being clicked again?
Here it is:
public void N1(View v) {
EditText editTextView = (EditText) findViewById(R.id.editTextView);
TextView tvN1 = (TextView) findViewById(R.id.textViewNumero1);
editTextView.append(tvN1.getText().toString());}
This button works like a keyboard key, when clicked it shows the character in editText. I wanted it to be mandatory to press the button first before going through the next phase, but to prevent the button from being clicked more than once...
Thank you if you can help me
Thank you very much, but by the way, you know how I can count the times you click a button?
– Eduardo Brito
@Eduardobrito using a variable that increments within the code of
click
and not forgetting to keep and restore the state ofActivity
– Isac