Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created Mar 27, 2022
Embed
What would you like to do?
【Java Quiz】5 MaterialAlertDialog
new MaterialAlertDialogBuilder(this)
.setTitle(alertTitle)
.setMessage("答え : " + rightAnswer)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
if (quizCount == QUIZ_COUNT) {
// 結果画面へ移動
} else {
quizCount++;
showNextQuiz();
}
}
})
.setCancelable(false)
.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment