Code Snippet to display Alert Dialog,
Builder dialog = new AlertDialog.Builder(this);
dialog.setTitle("----Title---");
dialog.setMessage("Message to be displayed");
dialog.setPositiveButton("ok", new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface arg0, int arg1) {
// Operation to be performed on clicking
}
});
dialog.show();
No comments:
Post a Comment