efontana

Untitled

Sep 15th, 2011
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. AlertDialog.Builder builder = new AlertDialog.Builder(this);
  2. builder.setMessage("Are you sure you want to exit?")
  3. .setCancelable(false)
  4. .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
  5. public void onClick(DialogInterface dialog, int id) {
  6. CustomTabActivity.this.finish();
  7. }
  8. })
  9. .setNegativeButton("No", new DialogInterface.OnClickListener() {
  10. public void onClick(DialogInterface dialog, int id) {
  11. dialog.cancel();
  12. }
  13. });
  14. AlertDialog alert = builder.create();
  15. alert.show();
Advertisement
Add Comment
Please, Sign In to add comment