Theme for dialog How the activity fills full screen

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.