失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > Android 状态栏 标题栏 导航栏 系统栏 应用栏的区别和解释

Android 状态栏 标题栏 导航栏 系统栏 应用栏的区别和解释

时间:2023-07-13 13:32:54

相关推荐

Android 状态栏  标题栏  导航栏 系统栏 应用栏的区别和解释

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

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

(参考:/lu1024188315/article/details/74692844)

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

沉浸式状态栏,是指状态栏与标题栏颜色相匹配,隐藏导航栏,是指将导航栏隐藏,去掉下面的黑条。APP全屏,是指将状态栏与导航栏都隐藏,例如很多游戏界面,都是APP全屏。

(参考: /qiyei/article/details/74435809)

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

system bars (that is, the status and the navigation bars)

(参考:https://developer./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./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

其他文章:

/guolin_blog/article/details/51763825

如果觉得《Android 状态栏 标题栏 导航栏 系统栏 应用栏的区别和解释》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。