Modification of the time format of Android 13.0 SystemUI drop-down status bar (1)

1 Overview

In the customized development of 13.0 products, the time format of the system drop-down status bar of the native systemui is a certain month, a certain day, a certain day of the week. This format is modified according to the needs of the product to a certain format of the year, month, day, week, certain hour and minute. This requires modifying the display time
. The format can be updated according to this format when updating the time. Next, let’s see how to implement this function.

2. Core class of modification of time format of SystemUI drop-down status bar (1)

frameworks\base\packages\SystemUI\res\layout\quick_qs_status_icons.xml
frameworks\base\packages\SystemUI\res-keyguard\values\donottranslate.xml
frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\policy\DateView.java

3. Core function analysis and implementation of SystemUI drop-down status bar time format modification (1)


In the system systemui, its layout structure is actually relatively complex. It manages various services, navigation bar, status bar, recent list, drop-down menu, shutdown interface, etc. Among them, the navigation bar and status bar, and the recent list are used more. This is also what this blog post will focus on. Structurally speaking, both the drop-down menu and the status bar belong to the statusbar. The top-level super_status_bar.xml in the structure tree also belongs to the top-level
super_status_bar. After that, there will be two branches: status_bar_container and status_bar_expanded.
    The status_bar_container branch mainly presents the status bar interface. The status bar is subdivided into the left and right sides. The left is the notification bar, and the right is the status icon display of system functions.
    The status_bar_expanded branch mainly presents the drop-down menu interface.

Guess you like

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