This is the code
Alert dialog box. A builder? A builder? =? New? Alert dialog box. Builder (Ben);
builder . seticon(r . drawable . IC);
builder . settitle(" title ");
Builder.setMessage ("prompt text");
builder . setpositivebutton(r . string . BTN _ update,? New? OnClickListener()? {
@ Overlay
Public? Invalid? onClick(DialogInterface? Dialog box, int? Which)? {
//Add button, callback event
}
);
builder . setcancelable(false); //You cannot cancel the popup box by changing the Enter key.
AlertDialog? Dialogue? =? builder . create();
dialog.getWindow()。 setType(WindowManager。 layout params . TYPE _ SYSTEM _ ALERT); //Set the popup box to global.
dialog . setcanceledontouchoutside(false); //losing focus will not disappear
dialog . show();