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 !!!