Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package com.helloworld;
  2.  
  3. import android.app.Activity;
  4. import android.app.AlertDialog;
  5. import android.os.Bundle;
  6. import android.content.DialogInterface;
  7.  
  8.  
  9. public class minverden extends Activity {
  10.  
  11.  
  12. public void onCreate(Bundle savedInstanceState) {
  13. super.onCreate(savedInstanceState);
  14.  
  15. AlertDialog alertDialog = new AlertDialog.Builder(this).create();
  16. alertDialog.setTitle("Reset...");
  17. alertDialog.setMessage("Are you sure?");
  18. alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
  19. public void onClick(DialogInterface dialog, int which) {
  20. // here you can add functions
  21. }
  22. });
  23. alertDialog.setIcon(R.drawable.icon);
  24. alertDialog.show();
  25.  
  26.  
  27.  
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement