There are three ways to get rid of the title bar in Android, and they have their own characteristics.
1. Implement in Code
- This.requestwindowfeature (window.feature_no_title);//Remove the title bar
Remember: This code should be written in front of Setcontentview ().
2. Implemented in the manifest file (manifest.xml)
<android:icon= "@drawable/icon" android:label= "@string/app_ Name " android:theme=" @android: Style/theme.notitlebar ">
This can be used to set the entire application to no title bar, if only one activity is set to a untitled bar form, as long as the above the third line of code written to a certain activity inside it.
3. Defined in the Style.xml file
1 <?XML version= "1.0" encoding= "UTF-8"?> 2 <Resources> 3 <stylename= "Notitle"> 4 <Itemname= "Android:windownotitle">True</Item> 5 </style> 6 </Resources>
Then the face manifest.xml in the reference, this method is slightly more troublesome.
<android:icon= "@drawable/icon" android:label= "@string/app_ Name " android:theme=" @style/notitle ">
Reprinted from: http://blog.csdn.net/liuzhidong123/article/details/7818531
Remove the title bar from Android