继承AppCompatActivity 移除ActionBar的两种方法
2017-06-12 16:55
411 查看
如果不想用系统自带的ActionBar,而你的Activity继承了AppcompatActivity的话,有两种方法:
1,代码实现:
ActionBar actionBar=getSupportActionBar(); actionBar.hide();
2,style 实现,首先写一个style:
<style name="xxxxx" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:fitsSystemWindows">true</item> </style>
xxx是你自定义的名字,然后在manifest文件中对应的Activity中引用该style:
android:theme="@style/xxxxx"
这样就ok了。
相关文章推荐
- android开发 继承AppCompatActivity类去掉ActionBar
- 两种检测USB设备插入和移除的方法(Ver 2)
- 在 App_Code 文件夹中同时使用两种语言编程的方法
- 实现多线程有两种方法: Thread类继承和Runnable接口实现
- java两种启动线程方法根本不同,Thread继承和实现Runable接口
- js原型继承的两种方法对比介绍
- 两种自动检测USB设备的添加和移除的方法
- 实现多线程有两种方法: Thread类继承和Runnable接口实现
- 分分钟实现梦想 —— 两种快速打造App的方法
- 分分钟实现梦想 —— 两种快速打造App的方法 推荐
- 在App_Code文件夹中同时使用两种语言编程的方法
- (转) 两种自动检测USB设备的添加和移除的方法
- 【APP】yum只下载软件不安装的两种方法
- 实现多线程有两种方法: Thread类继承和Runnable接口实现
- 两种快速打造App的方法
- Hibernate继承关系的实体设计的两种方法
- 两种自动检测USB设备的添加和移除的方法
- JAVA中创建线程对象的两种方法:继承Thread和实现Runable
- js原型继承的两种方法对比介绍
- Android Camera 使用小结。两种方法:一是调用系统camera app,二是自己写camera程序。