android 5.0 SystemUI界面

本文详细解析了从SystemServer开始的启动流程,包括SystemUIService、SystemUIApplication.startServicesIfNeeded()方法,以及如何创建状态栏视图的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

从SystemServer开始:

SystemServer-----》SystemUIService-----》SystemUIApplication.startServicesIfNeeded()

startServicesIfNeeded()方法会遍历一个固定数组,分别调用数组中相应的start()方法,其中包括SystemBars.start()方法!

然后SystemBars.start()----》ServiceMonitor.start()

在ServiceMonitor.start()中会通过发送MSG_START_SERVICE消息执行startService()方法,startService()又去回调onNoService(),其实现是在SystemBars里面:SystemBars.onNoService()-----》createStatusBarFromConfig()

在createStatusBarFromConfig里面获得PhoneStatusBar的对象,调用其start()方法;

PhoneStatusBar.start()---》BaseStatusBar.start()----》createAndAddWindows()----》addStatusBarWindow()----》makeStatusBarView()

在makeStatusBarView()中加载了SystemUI的总布局文件super_status_bar.xml,

最外层的是StatusBarWindowView,里面包含了:

BackDropView:

ScrimView:scrim_behind 后遮罩

statusbar 状态栏 PhoneStatusBarView继承PanelBar

brightness_mirror:亮度调节

PanelHolder:包含NotificationPanelView,其继承自PanelView

ScrimView:scrim_in_front 前遮罩


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值