Created
September 8, 2010 14:21
-
-
Save skatldjs/570193 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlertDialog.Builder builder | |
= new AlertDialog.Builder(this); | |
builder.setMessage(“Are you sure you want to exit?”) | |
.setCancelable(false) | |
.setPositiveButton(“Yes”, | |
new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int id) { | |
MyActivity.this.finish(); | |
}}) | |
.setNegativeButton(“No”, new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int id) { | |
dialog.cancel(); | |
}}); | |
AlertDialog alert = builder.create(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment