Alertdialog the first type: Customizable controls are free to customize
The first step: Customizing the Popup page, creating a new XML page if you do not need activity
Step two: Set a button popup page on the main page(The following is the main code call that is automatically displayed in the Alertdialog as an XML file)
Final Alertdialog Dialog =New Alertdialog.builder (Container.getcontext ()). Create ();//Instantiate a Alertdialog
Dialog.show (); Initialize the Alertdialog
Dialog.getwindow (). Clearflags (Windowmanager.layoutparams.flag_not_focusable | Windowmanager.layoutparams.FLAG_ALT_FOCUSABLE_IM);< Span style= "color: #000080; Font-weight:bold; " >
Dialog.getwindow (). Setsoftinputmode (Windowmanager.layoutparams.soft_input_state_visible); Specifies that the IME is displayed in the window to set the input method visibility
Final Window window = Dialog.getwindow ();//instantiation of a window
Window.setcontentview (r.layout. activity_alert_error_document);//Call custom XML to show in Alertdialog
TextView Txtdocumentnumber = (TextView) Window.findviewbyid (r.id. Txtdocumentnumber);//The control that gets the custom XML
Customizing the use of Alertdialog controls (Androidstudio)