Http://www.cnblogs.com/zhuguangwei/archive/2011/01/18/1938276.html
First, hide the title bar
Hide title bar
This.requestwindowfeature (Window.feature_no_title);
Second, hide the status bar
Hide the status bar
This.getwindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_ fullscreen);
Third, remove the title bar of all activity interface
Modify Androidmanifest.xml
Add Android:theme= "@android: Style/theme.notitlebar" in the application tag
Iv. removing the titlebar and statusbar from all activity interfaces
Modify Androidmanifest.xml
In the Application tab, add
Android:theme= "@android: Style/theme.notitlebar.fullscreen"
Android dynamic display and hide status bar (notification bar)
1, set in the activity's OnCreate:
GetWindow (). Addflags (WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
GetWindow (). Addflags (WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
2, call when you need to show and hide:
private void Hidestatusbar () {
Windowmanager.layoutparams attrs = GetWindow (). GetAttributes ();
Attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
GetWindow (). SetAttributes (Attrs);
}
private void ShowStatusBar () {
Windowmanager.layoutparams attrs = GetWindow (). GetAttributes ();
Attrs.flags & Amp;= ~windowmanager.layoutparams.flag_fullscreen;
GetWindow (). SetAttributes (Attrs);
}