Beispiel #1
0
        public void openprompt()
        {
            alertdialog = new AlertDialog.Builder(this).Create();
            EditText txtEnterName = new EditText(this);

            alertdialog.SetTitle("enter your name");
            alertdialog.SetView(txtEnterName);
            alertdialog.SetButton("submit", (s, ev) =>
            {
                objDb = new DataBaseManager();
                objDb.AddLeaderboard(txtEnterName.Text, score);
                //save to leaderboard
                StartActivity(typeof(Scores));
                Finish();
            }

                                  );

            alertdialog.SetButton2("main menu", (s, ev) =>
            {
                Finish();
            }

                                   );
            alertdialog.SetCancelable(false);
            alertdialog.Show();
        }