去掉android的屏幕上的title bar
去掉屏幕上的title bar有3个方法:
1. Java代码实现
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
//...
}
2. 自定义style配置文件
< resources >
< style name ="NoTitle" parent ="android:Theme" >
< item name ="android:windowNoTitle" >true </ item >
</ style >
</ resources >
android:configChanges ="orientation|keyboardHidden"
android:theme ="@style/NoTitle" />
3. 直接在AndroidManifest.xml中进行修改
android:configChanges ="orientation|keyboardHidden"
android:theme ="@android:style/Theme.NoTitleBar" />
android:theme ="@android:style/Theme.NoTitleBar" >
title bar还能够自定义的,请查看文章《自定义Activity标题栏(Title bar)》http://android.blog.51cto.com/268543/636134
本文转自 Icansoft 51CTO博客,原文链接: http://blog.51cto.com/android/635864