0
public void botaoClick(View view) {
Button botaoResposta = (Button) view;
if (botaoResposta.equals(respostaCorreta)) {
acertos = acertos + 1;
pontos = pontos + 10;
Intent intent = new Intent(QuizActivity.this, Questao.class);
startActivity(intent);
Toast.makeText(QuizActivity.this, "ESPETACULAR", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(QuizActivity.this, "QUE PENA,VOCÊ ERROU", Toast.LENGTH_SHORT).show();
acertos = erros + 1;
pontos = pontos + 0;
}
}
}
could give more details ? what is the error/problem you are facing ?
– Alisson Marqui
When I test the code in the emulator the goal and change the screen by clicking on the button of some alternative, but only displays the message "WHAT A PITY YOU MISSED" and does not change the screen.
– Rose
So it means that if is always giving false. This answerCorrects with the correct answer button object ? Probably the error is there
– Alisson Marqui
Thank you. I’ll check.
– Rose