1.代码的形式
在指定的页面添加如下代码:
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题代码,需要放到加载页面前
setContentView(R.layout.activity_main);
2.AndroidManifest.xml 中配置
在这里配置可配置,整个APP都不显示标题栏
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar" ><!-- 去掉标题配置 -->