Skip to content

Instantly share code, notes, and snippets.

@mapreal19-snip
Created April 16, 2013 15:47
Show Gist options
  • Save mapreal19-snip/5397052 to your computer and use it in GitHub Desktop.
Save mapreal19-snip/5397052 to your computer and use it in GitHub Desktop.
ANDROID: AlertDialog
AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
alertDialog.setTitle("New Location");
alertDialog.setMessage("Is this the new location?");
alertDialog.setPositiveButton ("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
returnResult();
}
});
alertDialog.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialogo1, int id) {
//Nothing
}
});
alertDialog.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment