当前位置: > 财经>正文

Android 状态栏, 标题栏, 导航栏,系统栏,应用栏的区别和解释 黄金市场功能包括什么和什么两种功能的区别

2023-08-29 01:29:11 互联网 未知 财经

如上图,可以看到,有状态栏(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

版权声明: 本站仅提供信息存储空间服务,旨在传递更多信息,不拥有所有权,不承担相关法律责任,不代表本网赞同其观点和对其真实性负责。如因作品内容、版权和其它问题需要同本网联系的,请发送邮件至 举报,一经查实,本站将立刻删除。