如果不想用系统自带的ActionBar,而你的Activity继承了AppcompatActivity的话,有两种方法:
1,代码实现:ActionBar actionBar=getSupportActionBar();
actionBar.hide();
ActionBar actionBar=getSupportActionBar();
actionBar.hide();
2,style 实现,首先写一个style:
<style name="xxxxx" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:fitsSystemWindows">true</item>
</style>
<style name="xxxxx" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:fitsSystemWindows">true</item>
</style>
xxx是你自定义的名字,然后在manifest文件中对应的Activity中引用该style:
android:theme="@style/xxxxx"