I'm having a little problem with a quiz application. when the user clicks the button comes the next question. I set a delay of 1 sec. However, if the user clicks 2x on the button within this delay of 1 sec, when they open the next question it will already be clicked.
private void ResetTempo() {
mCountDownTimer.cancel();
mTimeLeft = StartTempo;
try {
new Thread().sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
mCountDownTimer.start();
}
r4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
r4.setEnabled(false);
ResetTempo();
updatePerguntasoma(r.nextInt(mPerguntasomaLenght));
r4.setEnabled(true);