Implementation of the customization function of clock display style on Android 11.0 systemui lock screen page

1 Introduction

  In the customized development of the 11.0 system ROM and the related development of systemui, the time and date function will be displayed on the lock screen page after the boot is completed. Due to
development The demand of the product requires the time to display the morning and afternoon of the day of the week. Next, it is necessary to analyze the relevant layout of the lock screen display time and date, and then implement the relevant functions
The rendering is as shown in the figure:


2. The core class that implements the customization function of the clock display style of the systemui lock screen page

frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
frameworks/base/packages/SystemUI/res/values/donottranslate.xml

3. Analysis and implementation of the core functions of customizing the clock display style of the systemui lock screen page

SystemUI, as the basic UI component of the entire system, occupies a very important position in the entire Android system.
KeyguardSliceProvider: Provides lock screen Slice ClockOptionsProvider: Provides clock preview for selector program PeopleProvider: Returns the given shortcut
In Android R, the SystemUI module also uses the new features of Slice, which are mainly displayed in the date, do not disturb icon and alarm clock under the time on the lock screen a> The provider KeyguardSliceProvider corresponds to the provider in the source code KeyguardSlic
In the lock screen clock layout of SystemUI, the core management part of the lock screen time layout control KeyguardSliceView is mainly in KeyguardSliceProvider.

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/134912363