1.前言
1.1概述
在9.0的系统产品开发中,对于systemui的状态栏的定制化功能也是越来越多的,比如通知图标,显示的时钟时间等等功能,系统原生的systemui的状态栏时间是只显示时分的,但是产品项目开发需要要求状态栏时间显示时分秒等等的ui,所以需要看状态栏的时间显示格式,修改时间格式就可以了
2.实现功能核心类
2.1SystemUI状态栏时间显示秒的核心类
frameworks/base/packages/SystemUI/res/layout/status_bar.xml
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
3.SystemUI状态栏时间显示秒的核心功能分析和实现
在systemui的原生系统中,在状态栏的xml文件就是staus_bar.xml文件,所以需要首先看status_bar.xml的文件,然后分析时钟相关的布局文件
<com.android.systemui.statusbar.phone.PhoneStatusBarView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.andro