This article mainly introduces the Android implementation of the hidden status bar and the title bar of the relevant information, the need for friends can refer to the
To hide the title bar you need to use a predefined style: Android:theme= "@android: Style/theme.notitlebar".
Hide status bar: Android:theme= "@android: Style/theme.notitlebar.fullscreen".
?
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<?xml version= "1.0" encoding= "Utf-8"?> <manifest xmlns:android= "http://schemas.android.com/apk/res/" Android "package=" De.vogella.android.temperature "android:versioncode=" 1 "android:versionname=" 1.0 "> < Application android:icon= "@drawable/icon" android:label= "@string/app_name" > <activity android:name= ". Convert "android:label=" @string/app_name "Android:theme=" @android: Style/theme.notitlebar.fullscreen "> < intent-filter> <action android:name= "Android.intent.action.MAIN"/> <category " Android.intent.category.LAUNCHER "/> </intent-filter> </activity> </application> <uses-sdk android:minsdkversion= "9"/> </manifest> |
?
| 1 2 3 4 5 6 7 8 9 10 11 12 13-14 |
@Override public void OnCreate (Bundle savedinstancestate) {super.oncreate (savedinstancestate);//Hide titlebar of appli cation//must be before setting layout requestwindowfeature (Window.feature_no_title); Hide StatusBar of Android//could also is done later GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); Setcontentview (R.layout.main); Text = (edittext) Findviewbyid (r.id.edittext01); } |
The above mentioned is the entire content of this article, I hope you can enjoy.