Effects when not in process
The effect you want to achieve
Set a custom theme
<stylename= "Customdialog"Parent= "Android:style/theme.dialog"> <!--background color and degree of transparency - <Itemname= "Android:windowbackground">@android: Color/transparent</Item> <!--whether there is a title - <Itemname= "Android:windownotitle">True</Item> <!--is it on the activity ? - <Itemname= "Android:windowisfloating">True</Item> <!--is blurred - <Itemname= "android:backgrounddimenabled">True</Item> <Itemname= "Android:windowframe">@null</Item> </style>
Referencing topics
Public Mydialog (Context context) { Super(context, r.style.customdialog); = context; Initview (); }
Set up full screen display
Private void Initview () { setcontentview (r.layout.dialog_my);//Set Custom layout GetWindow (). setlayout ( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); }
Android dialog Full Screen display