Open a. androidmanifest.xml file, locate the application node
Android:allowbackup= "true" android:icon= "@drawable/ic_launcher" android:label= "@string/app_name" Android:theme= "@ Style/apptheme ">
Change to the following code, you can go to the head title bar
Android:allowbackup= "true" android:icon= "@drawable/ic_launcher" android:label= "@string/app_name"
Change to the following code, you can go to the head title bar and full screen display
Android:allowbackup= "true" android:icon= "@drawable/ic_launcher" android:label= "@string/app_name" Android:theme= "@android: Style/theme.notitlebar.fullscreen" >
Methods that are resolved in Java code:
public class mainactivity extends activity{@Override protected< /span> void OnCreate (Bundle savedinstancestate { super .oncreate (Savedinstancestate) ; // This part must be called before Setcontentview () // remove the window title // load layout
The Java code shown in full screen is as follows:
ImportAndroid.os.Bundle;ImportAndroid.view.Window;ImportAndroid.view.WindowManager;Importandroid.app.Activity; Public classMainactivityextendsactivity{@Overrideprotected voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); //This section must be called before Setcontentview ()//Remove Window Captionrequestwindowfeature (Window.feature_no_title); //Hide the status bar and display it in full screen//The first type:GetWindow (). Addflags (WindowManager.LayoutParams.FLAG_FULLSCREEN); //The second type: (Two ways effect)//GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN,//WindowManager.LayoutParams.FLAG_FULLSCREEN); //Loading LayoutsSetcontentview (R.layout.activity_main); }}
The Android simulator removes header headers