Android沉浸式状态栏
来源:互联网 发布:高仿手表淘宝店 编辑:程序博客网 时间:2024/06/05 19:18
完成沉浸式其实网上有很多的办法
我这里面只提供一种但是我感觉这种方式很自由,
在styles里面
<!-- Base application theme. --><style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorBase</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:windowTranslucentStatus">true</item></style>
在styles里面设置 <item name="android:windowTranslucentStatus">true</item>
在
manifest
里面设置:
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" android:name=".MyApplication" >
在每一个布局里面设置
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:clipToPadding="false">
这样的话就可以实现全屏 状态栏被隐藏掉 但是状态栏里面的东西 像电量啊。。。这些都还存在,这样你自己可以做的东西就多了 可以任意定义就像你自己的布局一样
阅读全文
0 0
- Android 沉浸式状态栏
- android 沉浸式 状态栏
- android 沉浸式状态栏
- android沉浸式状态栏
- Android沉浸式状态栏
- Android 沉浸式状态栏
- android 沉浸式状态栏
- Android沉浸式状态栏
- Android沉浸式状态栏
- Android 沉浸式状态栏
- Android沉浸式状态栏
- android 沉浸式状态栏
- android 沉浸式状态栏
- Android沉浸式状态栏
- android沉浸式状态栏
- Android 沉浸式状态栏
- android沉浸式状态栏
- Android沉浸式状态栏
- webview:"找不到网页" or "page not found"
- oracle中多表联合查询
- Java中使用Dom和Sax两种思想解析XML
- Java实现-两两交换链表中的节点
- LintCode 解题记录17.6.26 ~ 17.7.2
- Android沉浸式状态栏
- 开发优秀书籍目录
- 学技术还是要学扎实
- 线程池
- 文章标题
- Netty之私有协议栈开发
- Enum in C#
- springMVC注解开发时服务器端报错的一种情况以及解决办法
- HUD 2222 AC自动机摸 解法:1.暴力.2.指针型代码.3.数组型代码