Transferred from: http://blog.sina.com.cn/s/blog_4c451e0e010133ab.html
Setting up full screen consists of two parts: Full screen and activity full screen. Window full screen refers to hiding the top of the system to show the time, battery, signal and other information of the title bar, activity full screen refers to the hidden program's title bar. We can do this by modifying the Androidmanifest.xml file.
1, window full screen Fullscreen.java code as follows:
PackageWzhnsc.test.style;Importandroid.app.Activity;ImportAndroid.os.Bundle;ImportAndroid.view.Window;ImportAndroid.view.WindowManager; Public classFullscreenextendsActivity {@Override Public voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); //do not display the title bar of the programrequestwindowfeature (Window.feature_no_title); //do not display the system's title barGetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, windowmanager.la Youtparams.flag_fullscreen); Setcontentview (R.layout.main); }}View Code
2. Modify Androidmanifest.xml We can modify the property values of activity or application to implement. Specific can be set according to their own circumstances, the difference is as follows:
1) Activity: Full screen only for current activity.
2) Application: All the activity will be full screen. Androidmanifest.xml content is as follows: <?xml version= "1.0″encoding=" utf-8″?>
<manifest xmlns:android= "Http://schemas.android.com/apk/res/android"
Package= "Wzhnsc.test.style"
Android:versioncode= "1″
Android:versionname= "1.0″>
<application
android:icon= "@drawable/icon"
Android:label= "@string/app_name"
Android:theme= "@android: Style/theme.notitlebar.fullscreen" >
<activity android:name= ". Fullscreen"
Android:label= "@string/app_name"
Android:theme= "@android: Style/theme.notitlebar.fullscreen" >
<intent-filter>
<action android:name= "Android.intent.action.MAIN"/>
<category android:name= "Android.intent.category.LAUNCHER"/>
</intent-filter>
</activity> </application>
<USES-SDK android:minsdkversion= "1″/></manifest>
[Android] Android Settings Window fullscreen