Android activity fullscreen and does not display title

Source: Internet
Author: User

1. Let the activity be displayed globally to make the system's navigation bar transparent:

(1) You can add the Window property to the activity code:

if (VERSION. Sdk_int >= version_codes. KITKAT) {
GetWindow (). Addflags (WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);//transparent status bar navigation bar
GetWindow (). Addflags (WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}

(2) You can set different item properties in the style:

<StyleName="Theme.timetodo" parent="@android: Style/theme.holo.light" > <!  -- Translucent System Bars--  <item name= "android: Windowtranslucentstatus" >true</item> <item name= "android: windowtranslucentnavigation" >  true</item></style>
Above please note: The layout needs to add:

Android:cliptopadding= "true"
Android:fitssystemwindows= "true" otherwise the layout view will run to the navigation bar

2. Do not display the title of ativity in style inside <item name= "Android:windownotitle" >TRUE</ITEM> and application inside the manifest.xml, quoting Android:theme= "@style/notitle"



Android activity fullscreen and does not display title

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.