方式一:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//去除显示的标题栏
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
}
方式二:
values中style:
<style name="app" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
</style>