Questions about setting full screen invalidation in Android Program Development

Source: Internet
Author: User

First, we will introduce two full screen setting methods:

Method 1: Modify the Android: Theme attribute in the application node of androidmanifest. xml.

Android: theme ="@ Android: style/theme. notitlebar. fullscreen"

Method 2:

Before calling setcontentview in the oncreate method, add

This. requestwindowfeature (window. feature_no_title); // go to the title bar

Getwindow (). setflags (windowmanager. layoutparams. flag_fullscreen, windowmanager. layoutparams. flag_fullscreen); // remove the status bar above the activity

This method has many introductions on the network. After running it, I found that full screen functionality is not useful. After careful viewing, I found that I chose 4.0.3 when creating a project in eclipse, the simulator selects 4.0.3 when creating the AVD... "The Android version shown in is 4.0.4). It seems that the Simulator version is higher than the project version. It is strange that the AVD was deleted and re-created. In this case, I chose 4.2.2, the result function is easy to use. The specific cause is unknown. Leave it for future research. Here we will write down the problem and solution to share with you!

Conclusion: The SDK version used in the project is higher than that used in the android simulator (preferably a little higher). This problem can be solved !!!

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.