Android 1.5 passed the test
You only need to call setCurrentView (); in the following code.
Http://hi.baidu.com/wishwingliao/blog/item/38feb71c994ae98587d6b6e0.html
/**
* Hide the title bar and call this method before Activity. setCurrentView ();
*/
Private void HideTitle ()
{
RequestWindowFeature (Window. FEATURE_NO_TITLE );
}
/**
* This method is called before Activity. setCurrentView (); To hide the status bar (full screen ).
*/
Private void HideStatusBar ()
{
// Hide the title
RequestWindowFeature (Window. FEATURE_NO_TITLE );
// Define full-screen parameters
Int flag = WindowManager. LayoutParams. FLAG_FULLSCREEN;
// Obtain the window object
Window myWindow = this. getWindow ();
// Set the Flag ID
MyWindow. setFlags (flag, flag );
}
========================================================== ====
Android full screen display
Use in Activity:
GetWindow (). addFlags (WindowManager. LayoutParams. FLAG_FULLSCREEN );
========================================================== ====
Another method is to modify AndroidManifest. xml.
No title bar ----- add android: theme = "@ android: style/Theme. NoTitleBar" to the application tag"
No title bar or status bar ----- add android: theme = "@ android: style/Theme. NoTitleBar. Fullscreen" to the application label"
Under normal circumstances:
Hide the title bar:
Full Screen Display: