Most of the online introduction is implemented in Styles.xml add <item name="Android:windowfullscreen">true</ Item>
This property, but do not work in accordance with the operation, and then try to do their own, the summary method is as follows code
Dialog Dialog =NewDialog ( This, R.style.dialog);d ialog.show (); Layoutinflater Inflater= Layoutinflater.from ( This); View Viewdialog= Inflater.inflate (R.layout.adapter_list,NULL);D isplay Display= This. Getwindowmanager (). Getdefaultdisplay ();intwidth =display.getwidth ();intHeight =display.getheight ();//Setting the width of the dialog to the width of the screenViewgroup.layoutparams Layoutparams =Newviewgroup.layoutparams (width, height);d ialog.setcontentview (Viewdialog, layoutparams);
The main important step is to set the width of the dialog to the width of the screen, so that the dialog can be displayed in full screen.
Android dialog Full Screen display