Android Activity Full Screen display implementation method _android

Source: Internet
Author: User

This article describes in more detail the Android Activity full screen display implementation method. Share to everyone for your reference. The specific methods are as follows:

Method One:

Using the XML method, in the project's Androidmanifest.xml file, add attributes to the activity element that needs to be full-screen:

Copy Code code as follows:
Android:theme= "@android: Style/theme.notitlebar.fullscreen"

This will enable full screen display of the activity, if you just don't want the title bar, that is, you need to keep the system's own taskbar, then use:

Copy Code code as follows:
Android:theme= "@android: Style/theme.notitlebar"

The advantage is that you don't have to make changes in your code.

Method Two:

Even if you modify it with code

No title bar:

Copy Code code as follows:
Requestwindowfeature (Window.feature_no_title);


Copy Code code as follows:
GetWindow (). SetFlags (Windowmanager.layoutparams.flag_fullscreen,windowmanager.layoutparams.flag_fullscreen);

You can use code to dynamically make the activity full-screen, such as Full-screen screen after double-click.

I hope this article will help you with your Android program.

Related Article

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: 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.