There are 3 ways to remove the title bar on the screen:
1.java Code implementation:
1 @Override 2 publicvoid onCreate (Bundle savedinstancestate) {3Super. OnCreate (savedinstancestate ); 4 5 requestwindowfeature (window.feature_no_title); 6 7 Setcontentview (r.layout.main); 8 // ... 9 }
2. Customizing the style configuration file
In the \res\values inside the Style.xml add:
1 <?xmlversion= "1.0" encoding= "Utf-8 "?>2 <Resources>3 <StyleName= "Notitle"Parent= "Android:theme">4 <ItemName= "Android:windownotitle">True</Item>5 </style>6 </Resources>
Then in the Androidmanifest.xml file, add android:theme= "@style/notitle to the node that needs to remove the activity from the title bar as follows:
1 < Activityandroid:name =". Mainactivity "2android:configchanges=" Orientation|keyboardhidden "3 Android:theme= "@style/notitle"/>
3. Make changes directly in the Androidmanifest.xml
It turns out that we can simply call the system without having to customize the style configuration:
1 < Activityandroid:name =". Mainactivity "2android:configchanges=" Orientation|keyboardhidden "3 Android:theme= "@android: Style/theme.notitlebar"/>
If we want to set the entire application to remove the title bar, then set the application:
1 < Applicationandroid:icon = "@drawable/lightbulb" Android:label = "@string/app_name" 2 Android:theme = "@android: Style/theme.notitlebar" >
Android Development removed title bar