SystemUI流程

目录

SystemUI类图

SystemUI流程一:SystemUI启动流程

SystemUI流程二:StatusBar创建流程

SystemUI流程三:系统Notification实现流程

附:应用Notification实现流程


        源码基于 Android 12。

        SystemUI 是 Android 的系统界面,在 Andorid 系统源码中,系统内置 app 一般放在 package/apps下,例如 settings,camera,Phone,Message 等等。而在 framework/base/package 下,它们也是系统的 app,SystemUI 就在此目录下。SystemUI 是系统应用,由 SystemServer 进程进行启动,入口 Application 为SystemUIApplication。常用UI组件有如下几个:

  • 状态栏 StatusBar
  • 通知栏 NotificationPanel
  • 导航栏 NavigationBar
  • 最近任务 Recent
  • 键盘锁 Keyguard
  • 快捷按键栏 QSPanel

SystemUI类图

SystemUI流程一:SystemUI启动流程

SystemUI流程二:StatusBar创建流程

SystemUI流程三:系统Notification实现流程

  • 根布局:super_status_bar.xml;
  • 顶上状态栏: status_bar.xml, 通过CollapsedStatusBarFragment.java加载,PhoneStatusBarView(FrameLayout,)是里面的父控件,对应 R.id.status_bar_container ;
  • 下拉状态栏:(包括通知为status_bar_expanded.xml),最外层布局NotificationPanelView。

通知显示过程:

  1. super_status_bar.xml
  2. status_bar.xml
  3. super_notification_shade.xml
  4. status_bar_expanded.xml
  5. NotificationPanelView
  6. NotificationsQuickSettingsContainer
  7. NotificationStackScrollLayout

        以上从 SystemUI 大概类图,以及自身启动流程开始,到 StatusBar 创建流程,再到系统 Notification 实现流程,一步步去理解 SystemUI 的相关流程。

附:应用Notification实现流程

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值