First, remove the title bar
1, in the code to achieve:
Before this method Setcontentview (R.layout.main), join:
Requestwindowfeature (window.feature_no_title);//Cancel title bar
2, in the Androidmanifest.xml to achieve:
Registering activity with the following sentence configuration can be implemented.
If you want the entire app to have no title bar, add it in application:
<application android:icon= "@drawable/icon" android:label= "@string/app_name" android:theme= "@android: Style/theme.notitlebar ">
If you only want an activity to have no title bar, add it in the actibvity:
<activity android:name= ". Activity " android:theme=" @android: Style/theme.notitlebar "></activity>
3. Hide Actionbar
ActionBar ActionBar = Getactionbar (); Actionbar.hide ();
second, full screen : (Remove the Information Bar, to full-screen words to add a face to the title bar to remove, and the code must be written in Setcontentview this method before, otherwise will error)
Method One:
GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Method Two:
modify in config file
Android:theme= "@android: Style/theme.notitlebar.fullscreen"
Method Three:
<application android:icon= "@drawable/icon" android:label= "@string/app_name" android:theme= "@style/ Fullscreem ">
PS: Use the code to remove the title bar, after the app runs, you will see a short title bar and status bar, and then the full screen (this is related to the configuration of the phone, the better the configuration, the faster it disappears), and modify the configuration file is not the case.
Remove title bar and fullscreen