Beispiel #1
0
        // Display that there's not enough questions to play the game and redirect to the `ListQuestionsActivity`.
        private void ShowNotEnoughQuestionsAlert()
        {
            AlertDialog notEnoughQuestionsAlert = new AlertDialog.Builder(this).Create();

            notEnoughQuestionsAlert.SetCanceledOnTouchOutside(false);
            notEnoughQuestionsAlert.SetMessage(string.Format("Sorry, you don't have enough questions to play this game! Please add at least {0} using the 'MANAGE QUESTIONS' section", minNumberOfQuestions));
            notEnoughQuestionsAlert.SetButton("Okay", (sender, args) => { StartActivity(typeof(ListQuestionsActivity)); Finish(); });
            notEnoughQuestionsAlert.Show();
        }