Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void yesConfirm(object s, DialogClickEventArgs e)
- {
- Toast.MakeText(this, "Confirmed to proceed!", ToastLength.Short).Show();
- }
- void noConfirm(object s, DialogClickEventArgs e)
- {
- Toast.MakeText(this, "Cancelled!", ToastLength.Short).Show();
- }
- void btnAllow_Click(object sender, EventArgs e)
- {
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.SetMessage("Are you sure?");
- builder.SetCancelable(false);
- builder.SetPositiveButton("yes", yesConfirm);
- builder.SetNegativeButton("no", noConfirm);
- AlertDialog alert = builder.Create();
- alert.Show();
Advertisement
Add Comment
Please, Sign In to add comment