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

  • 状态栏 (status bar):是指手机最顶上,显示中国移动、安全卫士、电量、网速等等,在手机的顶部。下拉就会出现通知栏。
  • 标题栏 (action bar, toolbar):是指一个APP程序最上部的titleBar,从名字就知道它显然就是一个应用程序一个页面的标题了,例如打开QQ消息主页,最上面显示消息那一栏就是标题栏。
  • 导航栏 (navigation bar):是手机最下面的返回,HOME,菜单(menu/recent)三个键。
  • 系统栏 (system bar): 等于状态栏 + 导航栏 (参考:https://developer.android.google.cn/training/system-ui/dim)
  • 应用栏(app bar):应用栏也称操作栏,一般是把标题栏(Toolbar) 设置为应用栏 (参考:https://developer.android.google.cn/training/appbar/)
    (参考:https://blog.csdn.net/lu1024188315/article/details/74692844)

一般来说,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

更多相关文章

  1. Android集成Huawei PUSH(四)——客户端开发
  2. Flutter通过BasicMessageChannel实现Flutter 与Android(安卓)iOS
  3. 修改Android(安卓)Media Scanner的扫描路径
  4. 使用 Android(安卓)实现联网
  5. PhoneGap对比html5写android应用程序【android进化三十八】
  6. Android之父Andy Rubin访谈录
  7. Looper类浅析
  8. 利用Bundle实现Android(安卓)Activity间消息的传递
  9. Android的消息处理机制(从源码分析)

随机推荐

  1. Hello TWaver Android
  2. android 设置透明效果
  3. layout中设置图片自适应大小,并且设置最大
  4. Linearlayout和relativeLayout的属性的一
  5. Android2.2 API 中文文档系列(3) —— Acce
  6. EditView属性大全
  7. Android异步处理三:Handler+Looper+Messag
  8. Android(安卓)SDK Android(安卓)NDK Andr
  9. android中ListView拖动时背景黑色的问题
  10. android 环境搭建