Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //thanks to William Tate --- http://stackoverflow.com/questions/5810084/android-alertdialog-single-button
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setMessage("Look at this dialog!")
- .setCancelable(false)
- .setPositiveButton("OK", new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- //do things
- }
- });
- AlertDialog alert = builder.create();
- alert.show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement