Android --- 状态栏, 标题栏, 导航栏,系统栏,应用栏介绍

在这里插入图片描述

如上图,可以看到,有状态栏(status bar)、标题栏(action bar, toolbar)、导航栏(navigation bar) 等,

一般来说,APP实现沉浸式有三种需求:沉浸式状态栏,隐藏导航栏,APP全屏

  • 沉浸式状态栏,是指状态栏与标题栏颜色相匹配,
  • 隐藏导航栏,是指将导航栏隐藏,去掉下面的黑条。
  • APP全屏,是指将状态栏与导航栏都隐藏,例如很多游戏界面,都是APP全屏。
    (参考: https://blog.csdn.net/qiyei2009/article/details/74435809)

下面的内容摘抄自 Android 官网:

system bars (that is, the status and the navigation bars)
(参考:https://developer.android.google.cn/training/system-ui/dim)

as a general rule, you should design your app to hide the status bar whenever you hide the navigation bar.

Dim the system bars:
The advantage of this approach is that the bars are still present but their details are obscured, thus creating an immersive experience without sacrificing easy access to the bars.
(参考:https://developer.android.google.cn/training/system-ui/dim#java)
对应 View.SYSTEM_UI_FLAG_LOW_PROFILE

You should never show the action bar without the status bar.
对应 View.SYSTEM_UI_FLAG_FULLSCREEN

Hide the Navigation Bar:
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION

其他文章:
https://blog.csdn.net/guolin_blog/article/details/51763825

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值