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(MainActivity.this).create(); | |
alertDialog.setTitle("Alert"); | |
alertDialog.setMessage("Alert message to be shown"); | |
alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, "OK", | |
new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { | |
dialog.dismiss(); | |
} | |
}); | |
alertDialog.show(); |