Created
January 29, 2012 17:33
-
-
Save a-v-ebrahimi/1699759 to your computer and use it in GitHub Desktop.
Show Alert in Android
This file contains hidden or 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 alertDialog = new AlertDialog.Builder(this).create(); | |
| alertDialog.setTitle("Reset..."); | |
| alertDialog.setMessage("Are you sure?"); | |
| alertDialog.setButton("OK", new DialogInterface.OnClickListener() { | |
| public void onClick(DialogInterface dialog, int which) { | |
| // here you can add functions | |
| } | |
| }); | |
| alertDialog.setIcon(R.drawable.icon); | |
| alertDialog.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment