Skip to content

Instantly share code, notes, and snippets.

@DavidMellul
Last active March 13, 2018 22:09
Show Gist options
  • Select an option

  • Save DavidMellul/e58ccedb2b0a9aed6c5061fc8ab0bb89 to your computer and use it in GitHub Desktop.

Select an option

Save DavidMellul/e58ccedb2b0a9aed6c5061fc8ab0bb89 to your computer and use it in GitHub Desktop.
alertDialogBuilder
.setMessage("Click yes to exit!")
.setCancelable(false)
.setPositiveButton("Yes",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
// Stuff
}
})
.setNegativeButton("No",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
// Stuff
}
})
.create()
.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment