展开全部
方法1:每个Activity都有一个onCreate方法,如下public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.history);
}
在其中加入一下代码即可去除标题栏public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏,一定要在e5a48de588b662616964757a686964616f31333337393633setContentView之前
setContentView(R.layout.history);
}
方法2:在manifest.xml中配置
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
除了没有标题栏以外,开发者还可以自定义标题栏,让应用更加美观