transferred from: http://blog.csdn.net/fzh0803/article/details/9787615Category: Android_ bit records 2013-08-06 10:33 2005 People reading reviews (0) favorite reports
Theme for dialog in the system is always unable to fill full screen, sometimes in order to screen fit needs full screen, on the StackOverflow know the solution:
@OverridePublic voidOnCreate(BundleSavedinstancestate { super . oncreate (savedinstancestate (r. Layout. Your_layout Getwindow (). (layoutparams. Fill_parent, layoutparams.} /span>
The full screen must be set after SETCONTENTVIW, otherwise it will not take effect.
Also attached is a translucent activity style
<style name= "Transcutestyle" parent= "@android: Style/theme.dialog" >
<item name= "Android:windowframe" > @android:color/transparent</item><!--border--
<item name= "android:windowisfloating" >true</item>< whether the!--appears above activity--
<item name= "android:windowistranslucent" >true</item><!--Translucent--
<item name= "Android:windownotitle" >true</item><!--Untitled--
<item name= "Android:windowbackground" > @android:color/transparent</item>< Background transparent!--
<item name= "Android:backgrounddimamount" >0.3</item>
<item name= "Android:windowanimationstyle" > @null </item>
</style>
StackOverflow original in this: http://stackoverflow.com/questions/1362723/ How-can-i-get-a-dialog-style-activity-window-to-fill-the-screen
Theme for dialog How the activity fills full screen