Display method and electronic equipment

By moving status bar icons on electronic devices to make room for displaying interface elements, the inconvenience caused by hidden icons on electronic devices is solved, and the effect of retaining more icons when displaying interface elements is achieved.

CN121680681APending Publication Date: 2026-03-17HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411217224.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

When displaying interface elements, electronic devices often hide most of the status bar icons to highlight the interface elements, making it difficult for users to see the currently open system functions and unprocessed notification messages, causing inconvenience.

Method used

By moving icons in the status bar, especially those not obscured by UI elements, space is made to display UI elements, ensuring that multiple icons, including system icons and notification icons, can still be displayed in the status bar.

Benefits of technology

When displaying interface elements, more status bar icons can be retained, improving users' intuitive perception of system functions and notifications and reducing inconvenience in use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121680681A_ABST
    Figure CN121680681A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of terminals, in particular to a display method and electronic equipment, which can reserve icons in a status bar as many as possible when a first interface element is displayed, and is convenient for a user to use the electronic equipment. The method comprises the steps that a status bar is displayed, and the status bar comprises a plurality of icons and does not comprise interface elements surrounding a through hole; the plurality of icons comprise a first icon located in a first area of the status bar; in response to a first message of an application in the electronic equipment, a first interface element is displayed in the status bar, a first icon is moved from a first area of the status bar to a second area of the status bar to be displayed, and the display position of the first interface element surrounds the through hole; the first message is used for triggering the electronic equipment to display the first interface element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a display method and an electronic device. Background Technology

[0002] Electronic devices such as mobile phones can display messages from applications (apps) within interface elements. These messages can include not only notifications but also app alerts such as recording reminders, travel reminders (e.g., flight or ride-hailing notifications), food delivery notifications, alarm reminders, and call reminders. These interface elements can be rectangular, circular, or rounded rectangles (capsule-shaped) and are typically displayed in the status bar at the top of the phone screen.

[0003] When displaying this interface element, electronic devices typically hide most of the icons currently displayed in the status bar, leaving only a few. While this highlights the interface element, it can cause inconvenience for users. Summary of the Invention

[0004] This application provides a display method and an electronic device that can retain as many icons in the status bar as possible when displaying first interface elements, making it easier for users to use the electronic device.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] A first aspect provides a display method applied to an electronic device, wherein the display screen of the electronic device has a through-hole for housing a camera. The method includes: displaying a status bar, the status bar including multiple icons, excluding an interface element surrounding the through-hole; the multiple icons including a first icon located in a first area of ​​the status bar; responding to a first message from an application in the electronic device, displaying a first interface element in the status bar and moving the first icon from the first area of ​​the status bar to a second area of ​​the status bar, the display position of the first interface element surrounding the through-hole; the first message triggering the electronic device to display the first interface element.

[0007] If the first interface element is displayed directly in the status bar, the icons in the status bar will be obscured. This application addresses this by moving the first icon, ensuring sufficient space in the status bar to display the first interface element without obscuring the icons in the status bar. The first icon can be an icon in the status bar that would be obscured by the first interface element before the first message is received. Alternatively, the first icon can be an icon displayed in the first area that is not obscured by the first interface element. After moving the first icon, the electronic device can shift the remaining icons to ensure sufficient space in the status bar to display the first interface element without obscuring the icons in the status bar.

[0008] In one possible implementation of the first aspect, the plurality of icons also includes a second icon located in a first area of ​​the status bar. The method further includes: in response to a first message from an application on the electronic device, not displaying the second icon in the status bar. After moving the first icon, the electronic device may also not display the second icon, reserving sufficient space for displaying the first interface elements.

[0009] In one possible implementation of the first aspect, the first icon and the second icon are system icons displayed in the first area of ​​the status bar.

[0010] In one possible implementation of the first aspect, the plurality of icons also includes a first preset icon located in a first area of ​​the status bar. The method further includes: in response to a first message from an application in the electronic device, not displaying the first preset icon in the status bar. If the status bar also includes the first preset icon, the electronic device may also not display the first preset icon, reserving sufficient space for displaying the first interface element. The first preset icon may be a battery percentage icon displayed in the first area of ​​the status bar.

[0011] In one possible implementation of the first aspect, the multiple icons also include a third icon located in a second area of ​​the status bar. The method further includes: in response to a first message from an application on the electronic device, not displaying the third icon in the status bar. The electronic device can hide the third icon in the second area and display the first icons in the second area. Thus, by not displaying the third icon, the electronic device can display more first icons when displaying first interface elements. The first icon can be a system icon, and the third icon can be a notification icon.

[0012] Specifically, the third icon can be any of the notification icons displayed in the second area of ​​the status bar. That is, when the first interface element is displayed, the electronic device can hide all notification icons in the second area of ​​the status bar and move the first icon from the first area to the second area. Alternatively, the third icon can be at least one notification icon from all the notification icons displayed in the second area of ​​the status bar. That is, when the first interface element is displayed, the electronic device can hide some of the notification icons in the second area of ​​the status bar and move the first icon from the first area to the second area. Furthermore, if the status bar includes a second icon, the electronic device can also hide the second icon.

[0013] In one possible implementation of the first aspect, the multiple icons also include a second preset icon located in a second area of ​​the status bar, and the method further includes: in response to a first message from an application in the electronic device, not displaying the second preset icon in the status bar. If the status bar also includes the second preset icon, the electronic device may also not display the second preset icon to reserve sufficient space for displaying the first interface elements. The second preset icon may be the carrier name displayed in the second area of ​​the status bar.

[0014] In one possible implementation of the first aspect, the electronic device can identify a first icon in the status bar before the first interface element is displayed in the status bar. Specifically, the electronic device can first identify the icon to be adjusted in the first area of ​​the status bar, which is an icon in the status bar that would be obscured by the first interface element before receiving the first message. Then, the electronic device can identify the first icon from the icons to be adjusted. Wherein, if the status bar does not include a first preset icon, the icon to be adjusted is a first target icon. If the status bar includes a first preset icon, the icon to be adjusted is a third target icon. The first icon is all or part of the first target icon or the third target icon.

[0015] In one possible implementation of the first aspect, the electronic device can recognize a third icon in the status bar before the first interface element is displayed in the status bar. The electronic device can recognize the third icon from the notification icons displayed in the second area of ​​the status bar, where the third icon is a subset of the notification icons displayed in the second area.

[0016] In one possible implementation of the first aspect, the third icon is all the notification icons displayed in the notification icons in the second area.

[0017] In one possible implementation of the first aspect, after identifying the first icon from the icons to be adjusted, the electronic device uses the remaining icons in the icons to be adjusted, excluding the first icon, as the second icon.

[0018] In one possible implementation of the first aspect, when the first area of ​​the status bar does not include a first preset icon, the electronic device identifies the icon to be adjusted based on the size and position information of the first interface element. When the first area of ​​the status bar includes the first preset icon, the electronic device identifies the icon to be adjusted based on the size and position information of the first interface element and the width of the first preset icon. This implementation provides a feasible way to identify the icon to be adjusted in the first area of ​​the status bar.

[0019] In one possible implementation of the first aspect, when the available width of the second area of ​​the status bar is greater than or equal to the total width of the icon to be adjusted, the electronic device uses the icon to be adjusted as the first icon. When the available width of the second area is less than the total width of the icon to be adjusted, the electronic device uses a portion of the icons to be adjusted as the first icon, and uses the remaining icons excluding the first icon as the second icon. This implementation provides a feasible way to identify the first icon from the icons to be adjusted.

[0020] In one possible implementation of the first aspect, the electronic device identifies at least one icon to be displayed from the notification icons displayed in the second area of ​​the status bar, based on the available width of the second area and the width of the icon to be adjusted, and identifies a first icon from the icons to be adjusted. The sum of the width of the at least one icon to be displayed and the width of the first icon is equal to the available width of the second area. This implementation provides a feasible way to identify the first icon from the icons to be adjusted.

[0021] In one possible implementation of the first aspect, the electronic device uses the remaining icons displayed in the second area of ​​the status bar, excluding at least one icon to be displayed, as a third icon. This implementation provides a feasible way to identify the third icon from the notification icons displayed in the second area. The third icon is at least one notification icon among the notification icons displayed in the second area.

[0022] In one possible implementation of the first aspect, when the status bar includes a second preset icon, the electronic device hides the second preset icon and performs a shift operation on the icons in the second area. Therefore, when the second area of ​​the status bar includes the second preset icon, the available width of the second area is the difference between the first width and the second width; when the second area of ​​the status bar does not include the second preset icon, the available width of the second area is the sum of the difference between the first width and the second width and the width of the second preset icon. Here, the first width is the distance from the third preset icon in the status bar displayed before receiving the first message to the first preset position, and the second width is the width of the second area occupied by the first interface element; the first preset position is used to divide the status bar into the first area and the second area. The third preset icon can be, for example, a time icon.

[0023] A second aspect provides a display method applied to an electronic device, the display screen of which has a through-hole for housing a camera. The method includes: displaying a status bar including multiple icons, including a first interface element surrounding the through-hole; the multiple icons including a first icon located in a second area of ​​the status bar; and, in response to a second message from an application in the electronic device, the status bar not displaying the first interface element and moving the first icon from the second area of ​​the status bar to the first area of ​​the status bar for display, the second message triggering the electronic device to not display the first interface element.

[0024] In this application, the electronic device may also respond to a second message from the application by not displaying the first interface element and moving the first icon from the second area of ​​the status bar to the first area of ​​the status bar for display.

[0025] In one possible implementation of the second aspect, the method may further include: displaying a second icon in a first area of ​​the status bar in response to a second message from an application in the electronic device. After the first icon is moved, the electronic device displays the hidden second icon.

[0026] In one possible implementation of the second aspect, the method further includes: displaying a first preset icon in a first area of ​​the status bar in response to a second message from an application in the electronic device. After the first icon is moved, the electronic device displays the hidden first preset icon.

[0027] In one possible implementation of the second aspect, the method further includes: displaying a third icon in the status bar in response to a second message from an application in the electronic device. After the first icon is moved, the electronic device displays the hidden third icon.

[0028] In one possible implementation of the second aspect, the method further includes: displaying a second preset icon and a third icon in a second area of ​​the status bar in response to a second message from an application in the electronic device. After the first icon is moved, the electronic device displays the hidden second preset icon and third icon.

[0029] In one possible implementation of the second aspect, the method further includes: in response to a second message from an application in the electronic device, displaying a second preset icon and a third icon in a second area of ​​the status bar, and displaying the second icon in a first area of ​​the status bar. After the first icon is moved, the electronic device displays the hidden second preset icon, the third icon, and the second icon.

[0030] A third aspect provides an electronic device comprising: a memory, a display screen, and one or more processors; the display screen, the memory, and the processors being coupled; wherein the display screen is used to display an image; the memory is used to store computer program code, the computer program code including computer instructions; and when the computer instructions are executed by the processor, the electronic device performs a method as described in any one of the first and / or second aspects.

[0031] A fourth aspect provides a chip system applicable to an electronic device including memory. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines. The interface circuits are used to receive signals from the aforementioned memory and send the signals to the processors, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs a method as described in the first and / or second aspects and any possible design configuration thereof.

[0032] The fifth aspect provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a method as described in any one of the first and / or second aspects.

[0033] The sixth aspect provides a computer program product including a computer program / instructions that, when executed by a processor, implement the steps of any one of the methods of the first aspect and / or the second aspect.

[0034] In understanding, the beneficial effects that the electronic device of any of the possible designs of the third aspect, the chip system of the fourth aspect, the computer-readable storage medium of the fifth aspect, and the computer program product of the sixth aspect can achieve can be referred to the beneficial effects of the first aspect and any of its possible designs, which will not be repeated here. Attached Figure Description

[0035] Figure 1 A schematic diagram of an interface including a status bar provided for an embodiment of this application;

[0036] Figure 2 A schematic diagram illustrating the changes in icons in the status bar when displaying interface elements, provided for related technologies;

[0037] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0038] Figure 4 A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;

[0039] Figure 5 A schematic diagram of the distribution of interface elements provided in an embodiment of this application;

[0040] Figure 6 A schematic flowchart illustrating a display method provided in an embodiment of this application;

[0041] Figure 7 This is a schematic diagram showing another distribution of interface elements provided in an embodiment of this application;

[0042] Figure 8 A schematic diagram of an interface for displaying first interface elements provided in an embodiment of this application;

[0043] Figure 9 A schematic diagram of another interface for displaying the first interface element provided in an embodiment of this application;

[0044] Figure 10 A flowchart illustrating another display method provided in an embodiment of this application;

[0045] Figure 11 This is a schematic diagram showing another distribution of interface elements provided in an embodiment of this application;

[0046] Figure 12 A schematic diagram of another interface for displaying the first interface element provided in an embodiment of this application;

[0047] Figure 13 A flowchart illustrating another display method provided in an embodiment of this application;

[0048] Figure 14 A schematic diagram of another interface for displaying the first interface element provided in an embodiment of this application;

[0049] Figure 15 A schematic diagram of modules included in an electronic device according to an embodiment of this application;

[0050] Figure 16 A schematic diagram illustrating the interaction flow of an internal module of an electronic device, provided as an embodiment of this application;

[0051] Figure 17 This application provides an example of an interface diagram showing a first interface element not being displayed.

[0052] Figure 18 A schematic diagram illustrating the interaction flow of an internal module of an electronic device, provided as an embodiment of this application;

[0053] Figure 19 This is a schematic diagram of another interface for displaying the first interface element, provided as an embodiment of this application. Detailed Implementation

[0054] Electronic devices such as mobile phones can display messages from applications (APPs) within interface elements. These messages can include not only notifications but also app alerts such as recording reminders, travel reminders (e.g., flight or ride-hailing notifications), food delivery notifications, alarm reminders, and call reminders. The interface element can be rectangular, circular, or a rounded rectangle (capsule-shaped). This element is typically displayed in the status bar at the top of the phone screen. For example, this element could be a dynamic capsule. The dynamic capsule is a capsule-shaped element used to display messages. The following explanation uses the dynamic capsule as an example of an interface element for displaying app messages to illustrate this solution.

[0055] The status bar is usually displayed at the top of the phone screen, such as... Figure 1 The status bar is shown in image 101. The status bar displays icons, including system icons and notification icons. System icons can include carrier icons, system function icons, and a time icon. Carrier icons can include carrier name, carrier service icons, and network signal icons. Carrier services include Voice over Long-Term Evolution (voLTE), Voice over Wi-Fi (voWIFI), and HD calling. Network signal icons indicate the current network status, such as the 5G signal icon. System function icons include Bluetooth, Near Field Communication (NFC), Wi-Fi, eye protection mode, network speed, silent mode, vibration, do not disturb, GPS, alarm clock, headphone, keyboard, and charging icons. After a user enables a system function, the phone can display the corresponding function icon in the status bar. After the phone connects to an external device, it can display the icon of that connected external device in the status bar. For example, after connecting headphones or a keyboard, the phone will display the icon for the headphones or keyboard in the status bar. The notification icon is the icon for the application that sent the notification message; for example, the application icon for the application that sent the notification message. The notification icon can indicate that there are currently received but unprocessed notification messages. After the user processes a notification message, the phone can choose not to display the icon for that notification message. The battery icon indicates the phone's current battery level.

[0056] When a phone displays the "Smart Capsule" icon in the status bar, it typically hides most of the currently displayed icons, leaving only a few to highlight the Smart Capsule. For example, such as... Figure 2 As shown in (a), the status bar displays the carrier name, time icon, SMS icon, NFC icon, Bluetooth icon, vibration icon, network signal icon, battery level icon, and battery percentage icon. When displaying the Agile Capsule, as... Figure 2 As shown in (b), the phone hides the carrier name, SMS icon, NFC icon, Bluetooth icon, vibration icon, and battery percentage icon, only displaying the time icon, network signal icon, and battery level icon. The "Smart Capsule" icon surrounds the opening for the front-facing camera. While this highlights the Smart Capsule, it may cause inconvenience for users. For example, users may not be able to clearly see currently active system functions. Also, users may not be able to clearly see currently received but unprocessed notification messages.

[0057] In some embodiments, such as Figure 2 As shown in (c), the Smart Capsule is not displayed around the opening for the front-facing camera; instead, it is displayed on the left side of the screen. When the Smart Capsule is displayed, most of the icons on the left side of the status bar are hidden, with only the time icon and a notification icon displayed on the left side of the status bar.

[0058] Therefore, embodiments of this application provide a display method and an electronic device, which can retain a large number of icons when the electronic device displays a first interface element such as a "Dynamic Capsule" in the status bar.

[0059] The method provided in this application can be applied to electronic devices with data processing capabilities and displays. These electronic devices may include mobile phones, tablets, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), handheld computers, netbooks, smart home devices (e.g., smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDAs), wearable devices (e.g., smartwatches, smart bracelets, etc.), in-vehicle devices, virtual reality devices, etc., and this application does not impose any limitations on these. In this application, the aforementioned electronic devices are those capable of running an operating system and installing applications. Optionally, the operating system running on the electronic device may be... system, system, Systems, etc.

[0060] For example, please refer to Figure 3 The diagram illustrates the structure of an electronic device 300. The electronic device 300 may include a processor 310, an external memory interface 320, an internal memory 321, an audio module 330, a speaker 330A, a microphone 330B, a display screen 340, a communication module 350, a power module 360, an input device 370, a sensor module 380, a camera 390, antenna 1, and antenna 2, etc. The sensor module 380 may include a pressure sensor, a touch sensor, etc.

[0061] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 300. In other embodiments of this application, the electronic device 300 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0062] Processor 310 may include one or more processing units. For example, processor 310 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, electronic device 300 may also include one or more processors 310. Processor 310 may also include memory for storing instructions and data. In some embodiments, the memory in processor 310 is a cache memory. This memory can store instructions or data that the processor 310 has just used or is recurring. If the processor 310 needs to reuse the instruction or data, it can directly retrieve it from memory. This avoids repeated access, reduces the waiting time of processor 310, and thus improves system efficiency.

[0063] The external storage interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 300. The external memory card communicates with the processor 310 through the external storage interface 320 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0064] Internal memory 321 can be used to store one or more computer programs, which include instructions. Processor 310 can execute the aforementioned instructions stored in internal memory 321, thereby causing electronic device 300 to perform the display methods, various applications, and data management provided in some embodiments of this application. In some embodiments, processor 310 can execute instructions stored in internal memory 321 and / or instructions stored in memory disposed in processor 310 to cause electronic device 300 to perform a display method provided in an embodiment of this application.

[0065] Electronic device 300 can implement audio functions through audio module 330, speaker 330A, microphone 330B, and application processor, such as music playback and recording. Speaker 330A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals.

[0066] Microphone 330B, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. Users can speak by bringing their mouth close to microphone 330B, inputting sound signals into microphone 330B.

[0067] The communication function of electronic device 300 can be realized through antenna 1, antenna 2 and communication module 350, etc.

[0068] The communication module 350 can provide solutions for wireless communication applications on the electronic device 300, including cellular, Wi-Fi, Bluetooth (BT), and wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz). The communication module 350 can be one or more devices integrating at least one communication processing module. The communication module 350 receives electromagnetic waves via antenna 1 or antenna 2, filters and frequency-modulates the electromagnetic wave signals, and sends the processed signal to the processor 310. The communication module 350 can also receive signals to be transmitted from the processor 310, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 1 or antenna 2.

[0069] Electronic device 300 implements display functions through a GPU, display screen 340, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 340 and the application processor. The GPU performs mathematical and geometric calculations and is used for graphics rendering. Processor 310 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0070] The display screen 340 is used to display images, videos, etc. The display screen 340 includes a display panel. In some embodiments, the electronic device 300 may include one or N display screens 340, where N is a positive integer greater than 1. In this embodiment, the display screen 340 can be used to display a user interface (UI) and receive user actions on the UI.

[0071] The power module 360 ​​can be used to supply power to the various components included in the electronic device 300. In some embodiments, the power module 360 ​​can be a battery, such as a rechargeable battery.

[0072] Input device 370 may include keyboard, mouse, etc. The keyboard is used to input English letters, numbers, punctuation marks, etc. into electronic device 300, thereby issuing commands to electronic device 300 and inputting data, etc.

[0073] Electronic device 300 can implement shooting functions through an ISP, camera 390, video codec, GPU, display screen 340, and application processor. The ISP processes data fed back by the camera 390. The camera 390 captures still images or videos. In some embodiments, electronic device 300 may include one or N cameras 390, where N is a positive integer greater than 1. The digital signal processor processes digital signals, including digital image signals and other digital signals. For example, when the electronic device 300 selects a frequency, the digital signal processor performs Fourier transforms on the frequency energy. The video codec compresses or decompresses digital video.

[0074] The software system of electronic device 300 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses a layered architecture. Taking the system as an example, this section exemplifies the structure of mobile phone software. A layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, [the following is omitted as the text is incomplete and requires further context]. The system is divided into four layers, from top to bottom: application layer, application framework layer, system library, and kernel layer.

[0075] The application layer can include a series of application packages. For example... Figure 4 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, alarm clock, music, video, SMS, and social networking.

[0076] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes predefined functions. It may include a view system, an input system, and a system user interface (SystemUI) module, among others.

[0077] The input system is used to monitor the phone's input modules (such as touchscreen drivers) and convert the parameters input by the input modules into usable events, which are then passed to the relevant upper-layer modules. For example, the input system is used to monitor the phone's touchscreen through the touchscreen driver and convert the touch parameters generated by the touchscreen input into usable events, which are then passed to the upper-layer applications or modules.

[0078] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build the display interface of an application.

[0079] The SystemUI module comprises a first module and a second module. The first module generates UI elements based on application messages. The second module adjusts the position and / or visibility of icons in the status bar based on the size and position information of the UI elements. The UI elements can be dynamic capsules (or simply capsules). The first module can be a capsule module. The second module can be a status bar module.

[0080] The Android Runtime comprises the core libraries and the virtual machine. The Android Runtime is responsible for scheduling and managing the Android system. The core libraries consist of two parts: one part contains the functionalities that Java calls, and the other part comprises the core Android libraries. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0081] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0082] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0083] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0084] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0085] A 2D graphics engine is a graphics engine for 2D drawing.

[0086] The kernel layer can include display drivers, sensor drivers, etc.

[0087] The following uses a mobile phone as an example to illustrate a display method provided by an embodiment of this application, with reference to the accompanying drawings.

[0088] For aesthetic purposes, the "little capsule" design typically surrounds the opening in the display screen used to house the front-facing camera. The phone includes at least one front-facing camera. Optionally, the at least one front-facing camera is centrally located. The "little capsule" can be displayed in the center of the display screen horizontally. Optionally, the at least one front-facing camera can be positioned slightly to the left or right of the display screen horizontally, in which case the "little capsule" is displayed slightly to the left or right of the display screen horizontally. The following is in conjunction with... Figure 5 This section introduces the front-facing camera layout and the display method of the "Dynamic Capsule".

[0089] For example, such as Figure 5 As shown in (a), the mobile phone includes a front-facing camera, such as camera a. The center of the front-facing camera is located on the horizontal center line of the display screen, and the distance from the center of the front-facing camera to the top edge of the display screen in the vertical direction is a preset value Y. A flexible capsule surrounds the display at the opening for housing the front-facing camera. Alternatively, the center of the front-facing camera and the center of the flexible capsule can coincide. Of course, they can also not coincide. Figure 5 As shown in (b), the phone includes two front-facing cameras, such as camera a and camera b. Horizontally, cameras a and b are symmetrically positioned on either side of the horizontal centerline of the display. Vertically, the distance from the center of camera a to the top edge of the display is the same as the distance from the center of camera b to the top edge of the display, for example, both being a preset value Y. The "Flexible Capsule" surrounds the display at the two openings used to house the front-facing cameras, and the distance between the centers of the circles containing the two rounded corners of the Flexible Capsule is greater than the distance between the two cameras. Figure 5As shown in (c), the phone includes three front-facing cameras: camera a, camera b, and camera c. Camera b is located on the horizontal center line of the display, while cameras a and c are positioned on either side of the horizontal center line. For example, they can be symmetrically distributed on either side of the horizontal center line. Vertically, cameras a, b, and c are equidistant from the top edge of the display. A "Smart Capsule" surrounds the three openings for the front-facing cameras. The distance between the centers of the circles containing the two rounded corners of the Smart Capsule is greater than the distance between the two outermost cameras. It can be seen that the Smart Capsule is typically centered. When the cameras are not centered, the Smart Capsule can be positioned slightly to the left or right of the center of the display. Figure 5 As shown in (d), camera a is positioned to the right of the horizontal center line of the display, with the "Flexible Capsule" surrounding the opening for the front-facing camera. It can be seen that the Flexible Capsule is also positioned to the right of the horizontal center line of the display.

[0090] Generally, the right side of the status bar is used to display system icons, while the left side is used to display system icons such as the carrier name and time icon, as well as notification icons. After the Smart Capsule is displayed in the middle of the status bar, notification icons are displayed to the left of the Smart Capsule, and system icons are displayed to the right. The specific side of the Smart Capsule where the various icons are displayed can be set according to actual needs, and this embodiment does not impose any specific limitations on this.

[0091] When displaying the first interface element, the phone can adjust the visibility and / or position of the currently displayed icons to show as many icons as possible in the status bar. This solution is illustrated using the first capsule as an example of what constitutes the first interface element.

[0092] In some embodiments, the phone can hide icons currently displayed that would be obscured by the capsule to be displayed (the first capsule), while retaining icons that will not be obscured by the capsule. This allows for the display of as many icons as possible while simultaneously displaying the capsule. For example, the phone displays a status bar that does not include the first capsule but includes multiple icons. In response to a first message from an application, the phone displays the first capsule in the status bar and does not display icons that would be obscured by the first capsule. The icons obscured by the first capsule can be at least one of a first target icon, a second target icon, a third target icon, and a fourth target icon. The following describes... Figure 6 Let me introduce it.

[0093] Figure 6 This application provides a display method according to its embodiments. Figure 6 The methods shown include:

[0094] S601, the phone displays the first screen, which includes the status bar.

[0095] The first screen can be any screen on the phone. For example, the first screen can be the phone's main screen. Alternatively, the first screen can be any screen from any of the installed applications on the phone.

[0096] The status bar does not include the capsule icon. The status bar includes multiple icons. These icons may include at least one of the system icons and notification icons.

[0097] S602, get the first news on your mobile phone.

[0098] The first message is used to trigger the display of the first capsule on the mobile phone. The first message can be sent by an app installed on the mobile phone. The app can be a built-in system app or a third-party app; this application embodiment does not specifically limit this.

[0099] The mobile app can send a first message to the capsule module based on push notifications from the server. For example, after a package arrives at the station, the courier app sends a first message to the capsule module based on the logistics information sent by the server. This first message includes pickup information such as station information and the number of packages. In response to this first message, the capsule module generates a corresponding capsule, which can display the station information and the number of packages waiting to be picked up.

[0100] Mobile apps can also respond to user actions by sending initial messages to the capsule module. For example, a user can set an alarm in an alarm clock app, such as setting an alarm for 7 AM every morning. At 7 AM each day, the alarm clock app can send the corresponding alarm information to the capsule module. In response to this alarm information, the phone can display a capsule in the status bar, which includes the alarm clock app icon, the current time, the alarm name, and controls for turning off the alarm. Another example is a calendar app used to record one or more schedules entered by the user. Schedules can include events and reminder times. When a reminder time for a schedule arrives, the calendar app can send that schedule information to the capsule module. The capsule module then generates a corresponding capsule based on that schedule information. Yet another example is a travel app used to purchase airline tickets. When the travel time is a preset amount, the travel app can send travel information to the capsule module, including the flight number, boarding time, and gate. The capsule module can then generate a corresponding capsule based on this travel information. For example, when a user uses a navigation app, after the app is triggered to run in the background, it can send navigation information to the capsule module. The capsule module can then generate corresponding capsules based on this navigation information. Furthermore, the navigation app can subsequently update navigation information in real time and send it to the capsule module so that the capsule module can synchronize the navigation information within it.

[0101] The first message includes the identifier and element information of the capsule template. In some embodiments, the first message includes the size information and element information of the first capsule. For ease of understanding, the horizontal dimension of the capsule is called the width, and the vertical dimension of the capsule is called the height. The horizontal direction is the direction of the long side of the status bar, and the vertical direction is the direction of the short side of the status bar. Elements are images and / or text displayed in the capsule. Element information may include, for example, image information, text information, image color, text color, etc. Element information may also include the arrangement information of elements in the capsule. The arrangement information of elements may, for example, display an image on the left side of the capsule and text on the right side of the image, or vice versa.

[0102] The mobile phone has multiple capsule templates of different sizes and corresponding element information for each capsule template. The mobile phone can determine the template to use for the first capsule based on the capsule template's identifier and the pre-configured templates in the phone. For example, the mobile phone has pre-configured capsule templates with horizontal widths of 10 device independent pixels (dp), 12dB, 14dB, and 16dB, and a width of 5dB for each. Furthermore, each capsule template corresponds to one element information. Device independent pixels are a unit of length. Optionally, the unit of length in this embodiment can also be millimeters, pixels (PX), etc.

[0103] In response to the first information, the mobile phone can determine that the first capsule occupies a width of 2 in the first area of ​​the status bar and a width of 2 in the second area of ​​the status bar. Horizontally, the status bar can be divided into a first area and a second area. The first area can be the left side area, and the second area can be the right side area. Alternatively, the first area can be the right side area, and the second area can be the left side area. This application does not specifically limit this. The following description uses an example where the first area is the right side area and the second area is the left side area to illustrate this solution.

[0104] For example, such as Figure 7 As shown, the status bar can be divided into a first area and a second area from a first position. The first position can be, for example, located at the center of the status bar horizontally, dividing the status bar into left and right areas from the center. Alternatively, the first position can be located at the left 1 / 3 position of the status bar horizontally. Or, the first position can be located at the right 1 / 3 position of the status bar horizontally. This first position's location information can be pre-stored in the phone, and this location information can be, for example, coordinates. For example, the coordinates can be (W / 2, L / 2), (W / 3, L / 2), or (2W / 3, L / 2), where W is the width of the status bar and L is the height of the status bar. Different phone models have different status bar sizes, and therefore different pre-stored first position information.

[0105] S603, in response to the first message, the phone determines that the first capsule occupies a width of 1 in the right area of ​​the status bar and a width of 2 in the left area of ​​the status bar.

[0106] The mobile phone can determine the width of the right side of the status bar occupied by the first capsule (width 1) and the width of the left side of the status bar occupied by the first capsule (width 2) based on the size and position of the first capsule.

[0107] For example, the mobile phone can obtain the size of the first capsule from the first message. For instance, if the first message carries the size information of the first capsule, the mobile phone can directly read that size information. Alternatively, if the first message does not carry the size information of the first capsule, the mobile phone can determine the template to be used for the first capsule based on the capsule template identifier in the first message and pre-configured templates in the mobile phone, and obtain the size information corresponding to that template. The size information could be, for example, the coordinates of the leftmost and rightmost points of the capsule. The size information could also be, for example, the coordinates of the capsule's center point, the capsule's width, and the capsule's height.

[0108] For example, from Figure 7It can be seen that the first position can divide the first capsule into a right-side area and a left-side area. Therefore, the width 1 of the right-side area occupied by the first capsule in the status bar can be the width of the right-side area of ​​the first capsule. The width 2 of the left-side area occupied by the first capsule in the status bar can be the width of the left-side area of ​​the first capsule. The phone can obtain the coordinates of the rightmost point of the first capsule, such as (X1, Y1), and the coordinates of the leftmost point, such as (X2, Y2). The phone can also obtain the width W of the status bar, which can be, for example, 360dp. The width W of the status bar can be a preset value and pre-stored in the phone. The phone can also obtain the position information of the first position used to divide the status bar into left and right-side areas. Figure 7 As shown, the first position can be located at 1 / 3 of the distance from the right side of the status bar. Based on the obtained data, the phone can determine width 1 = (X1 - 240)dp and width 2 = (240 - X2)dp. For example, the phone can obtain the coordinates of the center point of the first capsule, such as (X3, Y3), and the width w of the first capsule, with width 1 = (X3 + w / 2 - 240)dp and width 2 = (240 - X3 + w / 2)dp.

[0109] Optionally, to avoid overlap between the capsule and the icon, a safety distance is usually designed. This safety distance is the distance between the nearest icons on each side of the capsule. Therefore, the width of the status bar occupied by the first capsule includes this safety distance. The safety distance can be a preset value, such as 3dp or 4dp. Figure 7 In the given equation, width 1 = (X1 - 240)dp + safety distance, width 2 = (240 - X2)dp + safety distance. Alternatively, width 1 = (X2 + w / 2 - 240)dp + safety distance, width 2 = (240 - X3 + w / 2)dp + safety distance.

[0110] S604, determine whether the phone's status bar includes preset icons.

[0111] The phone can determine whether the status bar includes a preset icon based on the icon's identifier. The icon's identifier is used to uniquely identify an icon. The phone compares the identifiers of currently displayed icons with the identifiers of preset icons one by one. If the identifiers of all currently displayed icons include the identifier of the preset icon, the phone determines that the status bar includes the preset icon.

[0112] The preset icon is at least one of a first preset icon and a second preset icon. The first preset icon is a system icon that will be displayed on the far right of the status bar, and the second preset icon is a system icon that will be displayed on the far left of the status bar. For example, the first preset icon is the battery percentage icon displayed on the far right of the status bar, and the second preset icon is the carrier name displayed on the far left of the status bar.

[0113] S605, when the status bar does not include a preset icon, the phone displays a first capsule in the status bar, with the first capsule surrounding the through-hole display in the display screen used to place the front-facing camera; the first target icon and / or the second target icon are not displayed in the status bar.

[0114] Specifically, if the status bar includes both the first and second target icons, the phone will not display either icon in the status bar. If the status bar only includes the first target icon, the phone will not display it. If the status bar only includes the second target icon, the phone will not display it.

[0115] Before executing S605, the phone recognizes the first target icon and / or the second target icon in the status bar. The following is a feasible implementation method for the phone to recognize the first target icon and / or the second target icon in the status bar.

[0116] The phone uses width 1 as the width of the icons to be hidden on the right side of the status bar, and width 2 as the width of the icons to be hidden on the left side of the status bar. The phone can determine the first target icon based on width 1. The phone can determine the second target icon based on width 2. The first target icon is the one located on the right side of the status bar and will be obscured by the first capsule. The second target icon is the one located on the left side of the status bar and will be obscured by the first capsule.

[0117] First, the mobile phone can obtain information about all icons currently displayed in the status bar. This information includes the icon's position, width, height, identifier, and type. The icon's position can be its location on the display screen. For example, the icon's position can be the coordinates of its center point on the screen. For example, these coordinates could be the coordinates of the center point of the smallest bounding rectangle containing the icon. Alternatively, the icon's position could be the coordinates of the lower left vertex of the smallest bounding rectangle. The icon's width can be, for example, the width of the smallest bounding rectangle containing the icon. Different icons can have the same or different widths; this embodiment does not impose a specific limitation on this. The icon's identifier is used to uniquely identify an icon. Icons displayed in the status bar can be divided into system icons and notification icons. Icons used to represent notification messages are called notification icons, while icons used to represent system functions or system status can be system icons. It should be understood that in the accompanying drawings, for ease of understanding, the smallest bounding rectangle containing the icon is shown around the icon; the icon does not actually include this rectangle, meaning the phone does not display the smallest bounding rectangle shown by the dotted line when displaying the icon.

[0118] The phone can then filter out icons located in the right and left areas of the status bar. For example, the phone can compare the horizontal coordinates of each icon displayed in the status bar with the horizontal coordinates of the first position. If the horizontal coordinates of the icon are greater than the horizontal coordinates of the first position, the phone identifies the icon as being located in the right area of ​​the status bar. If the horizontal coordinates of the icon are less than the horizontal coordinates of the first position, the phone identifies the icon as being located in the left area of ​​the status bar.

[0119] Finally, the phone can identify the first target icon and / or the second target icon. Specifically, for icons located in the right area of ​​the status bar, the phone calculates the first distance in the horizontal direction from the first position. For example, the first distance = (the horizontal coordinates of the leftmost point of the icon - the horizontal coordinates of the first position). The horizontal coordinates of the leftmost point of the icon can be the horizontal coordinates of the bottom left vertex of the smallest bounding rectangle including the icon. When the first distance is greater than the width of 1, the phone identifies the icon corresponding to this first distance as not the first target icon. When the first distance is less than or equal to the width of 1, the phone identifies the icon corresponding to this first distance as the first target icon. For icons located in the left area of ​​the status bar, the phone calculates the second distance in the horizontal direction from the first position. For example, the second distance = (the horizontal coordinates of the first position - the horizontal coordinates of the leftmost point of the icon). When the second distance is greater than the width of 2, the phone identifies the icon corresponding to this second distance as not the second target icon. When the second distance is less than or equal to the width of 2, the phone identifies the icon corresponding to this second distance as the second target icon.

[0120] After recognition, the status bar includes at least one of a first target icon and a second target icon. For example, few icons are displayed in the right area of ​​the status bar, and the status bar does not include the first target icon. Or, few icons are displayed in the left area of ​​the status bar, and the status bar does not include the second target icon. After recognizing the first target icon and / or the second target icon, the phone can hide the first target icon and / or the second target icon. For example, the phone sets the first target icon and / or the second target icon to be invisible; specifically, the phone can set the transparency of the first target icon and / or the second target icon to zero.

[0121] S606, when the status bar includes a first preset icon and a second preset icon, the phone displays a first capsule in the status bar, with the first capsule surrounding the through-hole display in the display screen used to place the front-facing camera; the third target icon and / or a fourth target icon are not displayed in the status bar; the first preset icon and the second preset icon are not displayed in the status bar.

[0122] S607, when the status bar includes a first preset icon, the phone displays a first capsule in the status bar, with the first capsule surrounding the through-hole display in the display screen used to place the front-facing camera; the third target icon and / or the second target icon are not displayed in the status bar; the first preset icon is not displayed in the status bar.

[0123] S608, when the status bar includes a second preset icon, the phone displays a first capsule in the status bar, with the first capsule surrounding the through-hole display in the display screen used to house the front-facing camera; the first target icon and / or the fourth target icon are not displayed in the status bar; the second preset icon is not displayed in the status bar.

[0124] Before executing S605-S608, the phone needs to recognize the third and / or fourth target icons in the status bar. Below is a feasible implementation method for the phone to recognize the third and / or fourth target icons in the status bar.

[0125] When the status bar includes a first preset icon and / or a second preset icon, the phone will hide the first preset icon and / or the second preset icon. After hiding the preset icons, the phone can also perform a shifting operation. This shifting operation could, for example, move all system icons in the right area of ​​the status bar (excluding the first preset icon) to the right by the width of the first preset icon, and move all icons in the left area of ​​the status bar (excluding the second preset icon) to the left by the width of the second preset icon. Figure 9 (b) and Figure 9 As shown in (c), after hiding the first preset icon (battery percentage icon), the phone will move all other icons in the right area as a whole to the right by the width of the battery percentage icon. After hiding the second preset icon, the phone will move all other icons in the left area as a whole to the left by the width of the carrier name.

[0126] The third target icon is the icon that will be obscured by the first capsule after the icons in the right area of ​​the status bar are moved to the right by the width of the first preset icon. The fourth target icon is the icon that will be obscured by the first capsule after the icons in the left area of ​​the status bar are moved to the left by the width of the second preset icon.

[0127] In other words, when the status bar includes the first preset icon, the icon displayed in the right area of ​​the status bar and obscured by the first capsule is the third target icon. When the status bar does not include the first preset icon, the icon displayed in the right area of ​​the status bar and obscured by the first capsule is the first target icon. When the status bar includes the second preset icon, the icon displayed in the left area of ​​the status bar and obscured by the first capsule is the fourth target icon. When the status bar does not include the second preset icon, the icon displayed in the right area of ​​the status bar and obscured by the first capsule is the second target icon.

[0128] The phone can determine a third target icon and / or a fourth target icon. For example, the phone uses the difference between width 1 and the width of a first preset icon as the width of the icon to be hidden on the right side of the status bar, and the difference between width 2 and the width of a second preset icon as the width of the icon to be hidden on the left side of the status bar. The phone determines the third and fourth target icons based on the widths of the icons to be hidden on the right and left sides of the status bar, respectively.

[0129] For example, the coordinates of icon A located on the right side of the status bar are (x... a y a After shifting to the right, the coordinates of the icon are (x...). a +X1, y a Where X1 is the width of the first preset icon. The phone can use the coordinates before the shift to calculate the first distance of the icon from the first position; for example, the first distance = x a -X2. If the first distance is greater than (width 1 - X1), the phone recognizes the icon as not a third target icon. If the first distance is less than or equal to (width 1 - X1), the phone recognizes the icon as a third target icon.

[0130] For example, the coordinates of icon B located on the right side of the status bar are (x... b y b After shifting to the left, the coordinates of the icon are (x, y). b -X2, y b Where X2 is the width of the second preset icon. The phone can use the coordinates before the shift to calculate the second distance of the icon from the first position; for example, this second distance = X2 - x. b If the first distance is greater than (width 2 - x 2), the phone recognizes the icon as not the fourth target icon. If the first distance is less than or equal to (width 2 - x 2), the phone recognizes the icon as the fourth target icon.

[0131] After identifying the third and / or fourth target icons, the phone can set the third and / or fourth target icons to be invisible.

[0132] The following is combined Figure 8 and Figure 9 To introduce. For example, such as Figure 8 As shown in (a), the left side of the status bar displays time icons and notification icons such as SMS icon, app store icon, missed call icon, and calendar icon, with the priority of the notification icons decreasing in that order. The time icon is a system icon. The phone displays a notification icon in the status bar after receiving a notification message from an application. Generally, the notification icon is the icon of the application that sent the notification message. Alternatively, the notification icon corresponds to the notification message. The right side of the status bar displays Bluetooth icon, vibration icon, NFC icon, carrier network icon, and battery level icon. Some system icons in the status bar can be selected by the user for display. For example, the device app's settings include status bar settings. The status bar settings interface includes switches for displaying icons, such as switches for displaying real-time network speed, displaying notification icons, and displaying battery level. The phone will only display the corresponding icon in the status bar after the user turns on the icon display switch. Some system icons in the status bar, such as the Bluetooth icon, vibration icon, and NFC icon, will only appear in the status bar after the user enables the corresponding function. For example, after a user turns on Bluetooth and NFC, the phone will display the corresponding icons in the status bar. Similarly, if a user sets incoming call or message notifications to vibration, the phone will display a vibration icon.

[0133] For ease of understanding, the first capsule to be displayed is drawn in the status bar, as shown below. Figure 8 As shown in (b) of the diagram, the dashed line represents the first capsule to be displayed. It can be seen from the diagram that the first distance between the Bluetooth icon, vibration icon, and NFC icon and the first position is less than width 1. The phone uses the Bluetooth icon, vibration icon, and NFC icon as the icons to be adjusted, i.e., the first target icon. The second distance between the calendar icon and the first position is less than width 2. The phone uses the calendar icon as the second target icon. Therefore, in response to the first message, the phone displays the first capsule in the status bar, but does not display the first or second target icons. Figure 8 As shown in (c), the status bar does not include the Bluetooth icon, vibration icon, and NFC icon located in the right area of ​​the first capsule, nor does it include the calendar icon located in the left area of ​​the first capsule; the status bar includes the first capsule.

[0134] For example, such as Figure 9 As shown in (a), the phone displays a status bar, which does not include the capsule. For ease of understanding, the first capsule to be displayed is drawn in the status bar, as shown below. Figure 9 As shown by the dashed line in (b) above. Because the status bar includes the battery percentage icon and the carrier name, the phone hides these two icons and performs a shift operation. After the shift, the icons in the status bar can be as follows: Figure 9 As shown in (c), after performing the shift operations, the third target icon displayed in the right area of ​​the first capsule is a Bluetooth icon and a vibration icon, while the fourth target icon displayed in the left area of ​​the first capsule is a calendar icon. Therefore, the phone can choose not to display the third and fourth target icons when displaying the first capsule, and the phone also does not display the first and second preset icons. Figure 9 As shown in (d), the right side of the status bar does not include the Bluetooth icon, vibration icon, and battery percentage icon, and the left side of the status bar does not include the calendar icon and carrier name. The status bar includes the first capsule. Furthermore, the icons on the right side of the status bar have been shifted to the right by the width of the battery percentage icon, and the icons on the left side of the status bar have been shifted to the left by the width of the carrier icon.

[0135] Optionally, after hiding the battery percentage icon, the phone can switch the first battery power icon to a second battery power icon. The phone can include multiple battery power icons; for example, the first battery power icon could be such as... Figure 9 The battery level icon shown in (d) is a first battery level icon shaped like a battery, with the inside filled to represent the battery level. When fully charged, the icon completely fills the battery area; when not fully charged, only a portion of the battery area is filled. The second battery level icon can be shown as follows... Figure 9 As shown in (e), the second battery power icon is shaped like a battery, and the battery contains a power percentage value.

[0136] As can be seen from the above embodiments, when the phone displays the first capsule, it only hides the icons that would be obscured by the first capsule, retaining the remaining icons. The icons obscured by the first capsule can be a first target icon and / or a second target icon. Optionally, if the status bar includes a preset icon, the phone will hide the preset icon and perform a shift operation on the icons in the status bar when displaying the first capsule. The phone can also hide icons that would be obscured by the first capsule after shifting, retaining the remaining icons. The icons that would be obscured by the first capsule after shifting can be a third target icon and / or a fourth target icon. In this way, the phone can display more icons while displaying the capsule.

[0137] In some embodiments, to avoid obscuring the icons in the right-side area of ​​the status bar due to directly displaying the first capsule, the phone can move the first icon from the right-side area to the left-side area of ​​the status bar when displaying the first capsule. In some embodiments, the first icon can be an icon located in the right-side area of ​​the status bar that will be obscured by the first capsule, such as a first target icon or a third target icon.

[0138] For example, the phone displays a status bar that does not include the capsule icon. The status bar includes multiple icons, including a first icon located on the right side of the status bar. In response to a first message, the first capsule is displayed in the status bar, and the first icon is displayed in the left area of ​​the status bar. The first icon is all the icons in the set to be adjusted.

[0139] For example, the status bar includes a first icon located in the right-hand area, and the status bar includes a first preset icon and / or a second preset icon. In response to a first message, the phone displays a first capsule in the status bar, displays the first icon in the left-hand area of ​​the status bar, and does not display the first preset icon and / or the second preset icon in the status bar.

[0140] In the above embodiment, the first icon is all the icons in the icon set to be adjusted.

[0141] For example, the status bar includes a first icon and a second icon located in the right-hand area. In response to a first message, a first capsule is displayed in the status bar, the first icon is displayed in the left-hand area of ​​the status bar, and the second icon is not displayed in the status bar.

[0142] For example, the status bar includes a first icon and a second icon located in the right area, and the status bar includes a first preset icon and / or a second preset icon. In response to a first message, a first capsule is displayed in the status bar, the first icon is displayed in the left area of ​​the status bar, the second icon is not displayed in the status bar, and the first preset icon and / or the second preset icon are not displayed in the status bar.

[0143] In the above embodiments, the first icon is a subset of the icons to be adjusted. The second icon is the remaining icons excluding the first icon.

[0144] The icon to be adjusted can be either a first target icon or a second target icon. If the status bar does not include the first preset icon, the icon to be adjusted is the first target icon. If the status bar includes the first preset icon, the icon to be adjusted is the third target icon. If it is not possible to move and display all of the icons to be adjusted in the left area of ​​the status bar, the phone can move and display a portion of the icons to be adjusted (the first icon) in the left area of ​​the status bar, while hiding the other icons (the second icons).

[0145] Typically, the right side of the status bar is used to display system icons, and the left side is used to display both system icons and notification icons. In the above embodiment, when no notification icons are displayed in the left side of the status bar, or when only a few notification icons are displayed in the left side of the status bar, and the space is sufficient to display all the icons to be adjusted, the phone can display all the icons to be adjusted in the left side of the status bar. When not all the icons to be adjusted can be displayed, the phone can display the first icon among the icons to be adjusted in the left side of the status bar, while hiding the second icon. Simultaneously, if the status bar includes a first preset icon and / or a second preset icon, the phone will not display the first preset icon and / or the second preset icon.

[0146] In some embodiments, since system icons have a higher priority than notification icons, the phone may not display notification icons and may move the system icons in the right-hand area of ​​the first capsule to the left-hand area of ​​the status bar used to display notification icons.

[0147] For example, the status bar includes a first icon located in the right-hand area and a third icon located in the left-hand area. In response to the first message, the first capsule is displayed in the status bar, the first icon is displayed in the left-hand area of ​​the status bar, and the third icon is not displayed.

[0148] For example, the status bar includes a first icon located in the right-hand area, a first preset icon and / or a second preset icon, and a third icon located in the left-hand area. In response to a first message, a first capsule is displayed in the status bar, the first icon is displayed in the left-hand area of ​​the status bar, the first preset icon and / or the second preset icon are not displayed in the status bar, and the third icon is not displayed.

[0149] For example, the status bar includes a first icon and a second icon located in the right-hand area, and a third icon located in the left-hand area. In response to a first message, the first capsule is displayed in the status bar, the first icon is displayed in the left-hand area of ​​the status bar, and the second and third icons are not displayed in the status bar.

[0150] For example, the status bar includes a first icon and a second icon located in the right-hand area, a first preset icon and / or a second preset icon, and a third icon located in the left-hand area. In response to a first message, a first capsule is displayed in the status bar, the first icon is displayed in the left-hand area of ​​the status bar, and the second and third icons are not displayed in the status bar, nor are the first and / or second preset icons displayed in the status bar.

[0151] The third icon can be any of the notification icons displayed in the left-hand area of ​​the status bar. In other words, in the above embodiment, the phone can hide all notification icons and display all (the first icon) of the icons to be adjusted (either the first target icon or the third target icon) in the left-hand area of ​​the status bar. Alternatively, the phone can hide all notification icons and display some (the first icons) of the icons to be adjusted (either the first target icon or the third target icon) in the left-hand area of ​​the status bar. The second icon, excluding the first icon, is hidden. Furthermore, if the status bar includes both the first and / or second preset icons, the phone does not display the first and / or second preset icons.

[0152] Figure 10 Another display method provided in the embodiments of this application, such as Figure 10 As shown, the method may include:

[0153] S1001, the phone displays the first screen, which includes the status bar.

[0154] S1002, get the first message on your mobile phone.

[0155] S1003, in response to the first message, the mobile phone determines that the first capsule occupies a width of 1 in the right area of ​​the status bar and a width of 2 in the left area of ​​the status bar.

[0156] S1004, the phone confirms whether the status bar includes the first preset icon.

[0157] S1001-S1004 are similar to S601-S604, and will not be described in detail here.

[0158] If the status bar does not include the first preset icon, the phone can execute S1005-S1008. Specifically, if the status bar does not include the first preset icon, it may or may not include a second preset icon.

[0159] When the status bar includes a first preset icon, the phone can execute S1009-S1012. When the status bar includes a first preset icon, it may or may not include a second preset icon.

[0160] S1005, if the status bar does not include the first preset icon, the phone determines the first target icon based on a width of 1.

[0161] The phone can first identify the icons located in the right area of ​​the status bar. Then, the phone calculates a first distance horizontally between each icon and its first position. If the first distance is less than or equal to the width of 1, the phone determines that the icon is the first target icon. For details, please refer to S605; it will not be elaborated here.

[0162] S1006, the phone identifies the first icon among the first target icons.

[0163] The first icon can be some or all of the icons in the first target icon set. The first icon can be displayed in the left-hand area of ​​the status bar, which is used to display notification icons.

[0164] For example, such as Figure 11 As shown in (a), the status bar can be divided into three areas, such as area 1, area 2, and area 3, by a first position and a second position. The first position is used to divide the status bar into a left-side area and a right-side area. The second position is used to divide the left-side area of ​​the status bar into an area for displaying system icons, such as area 1, and an area for displaying notification icons, such as area 2.

[0165] Figure 11 In (a) of the diagram, the area between the second position and the first position is the area used to display the notification icon before the capsule is displayed (hereinafter referred to as the third area). Typically, the left side of the status bar only displays the carrier icon and the time icon, or only the time icon. The carrier icon is displayed to the left of the time icon, which is a persistent icon that is always displayed in the status bar. Therefore, the second position is usually the right boundary of the time icon. From the right side of the time icon to the first position is the area used to display the notification icon before the capsule is displayed. After the first capsule is displayed, the area on the left side of the status bar used to display the notification icon (hereinafter referred to as the fourth area) is the area in the third area that does not include the left side of the first capsule. For example, the area from the right side of the time icon to the leftmost part of the first capsule could be the fourth area used to display the notification icon after the first capsule is displayed. Figure 11 As shown in (b), the width of the third area used to display the notification icon before the capsule is displayed is 3, and the width of the fourth area used to display the notification icon after the capsule is displayed is 4. Since the phone will display the first icon in the fourth area, the width of the fourth area of ​​4 is the available width of the left side of the status bar.

[0166] When the status bar does not include the second preset icon, width 4 = width 3 - width 2. When the status bar includes the second preset icon, width 4 = width 3 - width 2 + the width of the second preset icon. Here, width 3 is the first width, and width 2 is the second width.

[0167] The phone can obtain the position of the time icon in the status bar, the position information of the first location, and the size information of the first capsule. Based on the position of the time icon, it calculates a width of 4. After obtaining the width of 4, the phone can determine the first icon that needs to be moved to the fourth area. Here, the first icon is all or part of the icons in the first target icon.

[0168] If there is still unoccupied space in the fourth region (i.e., if the width 4 is greater than zero), the phone compares the width 4 with the total width of the first target icon. If the width 4 is greater than or equal to the total width of the first target icon, the phone determines to move all icons in the first target icon to the fourth region. That is, all icons in the first target icon are the first icons. If the width 4 is less than the total width of the first target icon, the phone sorts the icons in the first target icon based on priority, moving the higher-priority first target icons to the fourth region on the left side of the status bar (used for displaying notification icons), and hiding the icons in the first target icon that cannot be moved to the left side of the status bar (i.e., the second icons).

[0169] As an example, after sorting the first target icons based on priority, the phone checks if the width of the first icon after sorting is less than 4. If the width of the first icon is less than 4, it is designated as the first icon. The phone then continues to check if the sum of the widths of the first and second icons is less than 4. If this sum is less than 4, the second icon is designated as the first icon. This process continues until the sum of the widths of multiple icons is greater than or equal to 4. At least one first target icon whose sum of width is less than or equal to 4 is designated as the first icon that can be moved to the fourth area. For example, if a width of 4 is 10dp, and the sorted first target icons have widths of 5dp, 3dp, and 6dp, since 5dp + 3dp is less than 10dp and 5dp + 3dp + 6dp is greater than 10dp, the phone can designate the first target icons corresponding to 5dp and 3dp as the first icon.

[0170] As another example, for m first target icons, if m is greater than 1, after sorting the first target icons based on priority, the phone calculates the sum of the widths of the first to (m-1)th first target icons after sorting. If this sum is less than or equal to a width of 4, the phone determines to move the first to (m-1)th first target icons to the fourth region. If this sum is greater than a width of 4, the phone calculates the sum of the widths of the first to (m-2)th first target icons after sorting. If this sum is less than or equal to a width of 4, the phone determines to move the first to (m-2)th first target icons to the fourth region. If this sum is greater than a width of 4, the phone calculates the sum of the widths of the first to (m-3)th first target icons after sorting, and so on. The phone can use at least one first target icon whose sum of width is less than or equal to a width of 4 as the first icon that can be moved to the fourth region. If m = 1, and the width of the first target icon is less than or equal to a width of 4, the phone uses that first target icon as the first icon.

[0171] After identifying the first icon, the phone can display it in the fourth area. If the first icon is a part of the first target icon, the phone can hide the second icon (excluding the first icon) within the first target icon.

[0172] When the status bar does not include a notification icon, the phone displays the first icon in the fourth area, for example, to the right of the time icon. When the status bar includes a notification icon, the phone hides the notification icon in the status bar and displays the first icon in the fourth area, for example, to the right of the time icon. The icon information includes the icon type, which can be, for example, a system icon or a notification icon. After obtaining information about all icons currently displayed in the status bar, the phone can distinguish between system icons and notification icons based on their type. After distinguishing the notification icon, the phone can set the notification icon to be invisible.

[0173] For example, the mobile phone can execute S1007 or S1008.

[0174] S1007: When the first icon is all the icons in the first target icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third icon in the status bar.

[0175] S1008, when the first icon is a part of the first target icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third icon or the second icon other than the first icon in the first target icon in the status bar.

[0176] Optionally, in the methods of S1007 and S1008, if the status bar also includes a second preset icon, the phone does not display the second preset icon in the status bar.

[0177] S1009, when the status bar includes the first preset icon, the phone determines the third target icon based on the difference between width 1 and the width of the first preset icon.

[0178] The third target icon is the icon displayed in the right-hand area of ​​the first capsule after the first preset icon is hidden and all icons on the right side of the status bar are shifted to the right by the width of the first preset icon. Because the phone hides the first preset icon and performs the shift operation, for the icon displayed on the right side of the status bar, the phone can calculate a first distance using the icon's current coordinates. If this first distance is greater than the difference between width 1 and the width of the first preset icon, the phone determines that the icon is the third target icon displayed in the right-hand area of ​​the first capsule. This can be referred to the previous explanation and will not be repeated here.

[0179] S1010, the phone identifies the first icon among the third target icons.

[0180] When the status bar includes the second preset icon, the width of the fourth area (4) is equal to the width of the third area (3) minus the width of the left side area of ​​the first capsule (2) plus the width of the second preset icon, since the second preset operation will be hidden and a shift operation will be performed.

[0181] If the status bar does not include the second preset icon, the width of the fourth area is 4 = the width of the third area is 3 - the width of the left side area of ​​the first capsule is 2.

[0182] After obtaining the width 4 of the fourth area, the phone can determine the first icon that needs to be moved to the fourth area. The first icon is all or some of the icons in the third target area. When the width 4 is greater than the total width of the third target area, all third target icons are the first icons. When the width 4 is less than the total width of the third target area, the phone sorts the icons in the third target area based on priority, moving the higher-priority third target icons to the left side of the status bar. See S1006 for details; further explanation is unnecessary.

[0183] After identifying the first icon, the phone can display the first icon in the fourth area, and the phone can hide the second icon in the third target icon group other than the first icon.

[0184] When the status bar does not include a notification icon, the phone displays the first icon in the fourth area, for example, to the right of the time icon. When the status bar does include a notification icon, the phone hides the notification icon in the status bar and displays the first icon in the fourth area, for example, to the right of the time icon.

[0185] S1011, when the first icon is all the icons in the third target icon and the status bar includes the first preset icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third icon and the first preset icon in the status bar.

[0186] S1012, when the first icon is part of the third target icon and the status bar includes the first preset icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third icon, the second icon, and the first preset icon in the status bar.

[0187] Optionally, in the methods of S1011 and S1012, if the status bar also includes a second preset icon, the phone does not display the second preset icon in the status bar.

[0188] Optionally, after the phone moves the first icon in the icons to be adjusted to the fourth area, if there is still a free area between the rightmost side of the first capsule and the icon closest to the capsule, and if the width of one of the other icons in the icons to be adjusted (excluding the first icon) is smaller than the width of this free area, the phone can also display this icon in this free area.

[0189] The following is combined Figure 12 Let me introduce it.

[0190] like Figure 12 As shown, the phone displays... Figure 12 The status bar shown in (a) is an example. Figure 12 As shown in (a), the area from the right boundary of the time icon to the first position is the third area used to display notification icons before the capsule is displayed. The third area displays the SMS icon, app store icon, missed call icon, and calendar icon.

[0191] For ease of understanding, the first capsule is drawn in the status bar, as shown below. Figure 12 As shown in (b), the area from the right edge of the time icon to the leftmost part of the first capsule is the area used to display notification icons after the capsule is displayed. The right-hand area of ​​the first capsule includes the Bluetooth icon, vibration icon, and NFC icon. Since the total width of these three icons is greater than 4, the phone can sort these three icons based on priority. The NFC icon has a higher priority than the vibration icon, which in turn has a higher priority than the Bluetooth icon. When the total width of the NFC icon and vibration icon is less than or equal to 4, the phone displays the NFC icon and vibration icon in the fourth area on the left side of the status bar used to display notification icons. Specifically, the phone does not display the notification icon and Bluetooth icon, and displays the vibration icon and NFC icon sequentially to the left of the time icon, as shown below. Figure 12As shown in (c) in the figure.

[0192] like Figure 12 As shown, the phone displays... Figure 12 The status bar is shown in (d) above. The status bar includes a first preset icon, such as the battery percentage icon, and a second preset icon, such as the carrier name. For clarity, the carrier icon is hidden, and all icons on the left side of the status bar except for the carrier icon are moved to the left by the width of the carrier icon. The battery percentage icon is hidden, and all icons on the right side of the status bar except for the battery percentage icon are moved to the right by the width of the battery percentage icon. After this movement, the first capsule is drawn in the status bar after the moved icons, as shown below. Figure 12 As shown in (e) in the diagram. It can be seen that after hiding the battery percentage icon and moving the remaining icons on the right side of the status bar to the right, the third target icons displayed in the right area of ​​the first capsule are the Bluetooth icon and the vibration icon. After hiding the carrier name and moving the remaining icons on the left side of the status bar to the left, the width 4 of the area on the left side of the status bar used to display notification icons is (width 3 - width 2 + width of the carrier name). The phone can hide all notification icons displayed on the left side of the status bar. Since the total width of the Bluetooth icon and the vibration icon is less than width 4, the phone displays the Bluetooth icon and the vibration icon sequentially to the right of the time icon in the left area of ​​the status bar, as shown below. Figure 12 As shown in (f) in the figure.

[0193] Optionally, when the phone displays the first icon in the left area of ​​the status bar, the icons can be sorted based on their priority, and the first icon can be displayed based on that priority. Specifically, from the time icon to the right, the displayed first icons are arranged in ascending order of priority. Figure 12 As shown in (d) in the diagram, in the fourth area, the higher-priority vibration icon is located to the right of the lower-priority Bluetooth icon. That is, from the time icon to the right, the priority of the first icon increases sequentially. In other words, when the first icon is moved from the right side of the status bar to the left side, the first icon can be shifted without changing its original arrangement.

[0194] In some embodiments, since system icons have a higher priority than notification icons, the phone can reduce the number of notification icons on the left side of the status bar by moving some system icons from the right side of the first capsule area to the left side of the status bar area used to display notification icons. That is, the third icon can be at least one of all notification icons displayed in the left side of the status bar. The following is in conjunction with... Figure 13 Let me introduce it.

[0195] S1301, the phone displays the first screen, which includes the status bar.

[0196] S1302, get the first message on your mobile phone.

[0197] S1303, in response to the first message, the mobile phone determines that the first capsule occupies a width of 1 in the right area of ​​the status bar and a width of 2 in the left area of ​​the status bar.

[0198] S1304, the phone determines whether the status bar includes the first preset icon.

[0199] If the status bar does not include the first preset icon, the phone can execute S1305-S1308. Specifically, if the status bar does not include the first preset icon, it may or may not include a second preset icon.

[0200] When the status bar includes a first preset icon, the phone can execute S1309-S1312. When the status bar includes a first preset icon, the status bar may or may not include a second preset icon.

[0201] S1305: When the status bar does not include the first preset icon, the phone determines the first target icon based on a width of 1.

[0202] S1301-S1305 are the same as S1001-S1005, and will not be described again here.

[0203] S1306, the phone determines which icon to retain in the fourth area and which first icon to move to the fourth area.

[0204] The icon reserved in the fourth area is the icon to be displayed. This icon can be at least one notification icon displayed in the notification icons displayed in the left area of ​​the status bar. The phone identifies the icon to be displayed from the notification icons displayed in the left area of ​​the status bar based on the width of the fourth area (4) and the width of the first target icon, and identifies the first icon from the first target icon. The remaining icons in the notification icons displayed in the left area of ​​the status bar, excluding the icon to be displayed, are the third icons. The total width of all icons to be displayed, plus the sum of the total widths of all first icons, is equal to the width of the fourth area (4).

[0205] For example, the right side area of ​​the first capsule includes m first target icons, and the phone calculates the number n of notification icons to be retained based on the following formula: n = (width 4 - total width of m first target icons) / standard width of notification icons.

[0206] When the status bar does not include the second preset icon, width 4 = width of the third area (3) - width of the left side area of ​​the first capsule (2). When the status bar includes the second preset icon, width 4 = width of the third area (3) - width of the left side area of ​​the first capsule (2) + width of the second preset icon. Here, width 3 is the distance between the right side of the time icon in the status bar and the first position. Width 2 is the width of the left side area of ​​the status bar occupied by the first capsule. The phone can calculate width 3 and width 2, and subtract them to get width 4. Alternatively, width 4 is the distance between the right side of the time icon in the status bar and the leftmost side of the first capsule; the phone can directly calculate width 4.

[0207] If the number of notification icons n is greater than or equal to 1, all icons in the first target icon set are used as the first target icon set, n icons in the notification icon set are used as reserved icons, and the remaining icons in the notification icon set other than the n reserved icons are used as the third icon set.

[0208] If n is less than 1, it means that after moving all the first target icons to the fourth area, no more notification icons can be displayed. To retain at least one notification icon, the phone modifies the number of first icons moved to the fourth area and recalculates n until n is greater than or equal to 1. For example, the phone sorts the first target icons by priority, modifying the total width of the m first target icons in the above formula to the total width of the first first target icon to the (m-1)th first target icon after sorting. Then, the phone recalculates the number of notification icons n. If n is greater than or equal to 1, it determines that n notification icons need to be retained and moves the first and (m-1)th first target icons after sorting to the fourth area. Similarly, if n is less than 1, the total width of the m first target icons in the above formula is modified to the total width of the first and (m-2)th first target icons after sorting, and n is recalculated until n is greater than or equal to 1. If n is greater than 1 and n is a decimal, n can be rounded down. For example, n = 1.6, rounded down to n = 1. Another example, n = 2.1, rounded down to n = 2. After obtaining n, select n icons from the notification icons as retained icons, select the remaining icons (excluding the n retained icons) as third icons, select the sorted first target icon to the i-th first target icon as first icons, and select the remaining icons (excluding the first icons) as second icons. Here, i takes values ​​in [m-1, m-2, ..., 2].

[0209] S1307: When the first icon is all the icons in the first target icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third icon in the status bar.

[0210] S1308: When the first icon is a part of the first target icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third and second icons in the status bar.

[0211] Optionally, in the methods of S1011 and S1012, if the status bar also includes a second preset icon, the phone does not display the second preset icon in the status bar.

[0212] S1309, when the status bar includes a first preset icon, the phone determines the third target icon based on the difference between width 1 and the width of the first preset icon.

[0213] S1309 is the same as S1009, so it will not be repeated here.

[0214] S1310, the phone confirms that the notification icon in the fourth area and the first icon moved to the fourth area are retained.

[0215] The phone identifies the icon to be displayed from the notification icons displayed in the left area of ​​the status bar based on the width of the fourth area (4) and the width of the third target icon, and identifies the first icon from the third target icon. The total width of all icons to be displayed and the sum of the total widths of all first icons are consistent with the width of the fourth area (4).

[0216] For example, the right-hand area of ​​the first capsule includes Q third-target icons, and the phone calculates the number n of notification icons to be retained based on the following formula: n = (width 4 - total width of Q third-target icons) / standard width of notification icons.

[0217] When the status bar does not include the second preset icon, the width 4 = the width of the third area (3) - the width of the left side area of ​​the first capsule (2). When the status bar includes the second preset icon, the width 4 = the width of the third area (3) - the width of the left side area of ​​the first capsule (2) + the width of the second preset icon.

[0218] If the number of notification icons, n, is greater than or equal to 1, all icons in the first target icon set are designated as the first target icons, n icons in the notification icons set are reserved, and the remaining icons (excluding the n reserved icons) are designated as third icons. If n is less than 1, it means that after moving all third target icons to the fourth area, no more notification icons can be displayed. To retain at least one notification icon, the phone moves some icons from the third target icons set to the fourth area. For example, the phone sorts the third target icons by priority, modifying the total width of the Q third target icons in the above formula to the total width of the first to the (Q-1)th third target icons after sorting. Then, the phone recalculates the number of notification icons, n. If n is greater than or equal to 1, it determines that n notification icons need to be retained and moves the first to the (Q-1)th third target icons after sorting to the fourth area. Similarly, if n is less than 1, the total width of the Q third target icons in the above formula is modified to the total width of the first to the (Q-2)th third target icons after sorting, and n is recalculated until n is greater than or equal to 1. When n is greater than 1 and is a decimal, n can be rounded down. For example, n = 1.6, after rounding, n = 1. Or, n = 2.1, after rounding, n = 2. After obtaining n, n icons from the notification icons are selected as retained icons. The remaining icons (excluding the n retained icons) are selected as third icons. The sorted third target icons from the first to the kth are selected as first icons. The remaining third target icons (excluding the first icon) are selected as second icons. Here, k takes values ​​in the range [Q-1, Q-2, ..., 2].

[0219] S1311, when the first icon is all the icons in the third target icon and the status bar includes the first preset icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third icon and the first preset icon in the status bar.

[0220] S1312, when the first icon is part of the third target icon and the status bar includes the first preset icon, the phone displays the first capsule in the status bar, displays the first icon in the left area of ​​the status bar, and does not display the third icon, the second icon, and the first preset icon in the status bar.

[0221] Optionally, in the methods of S1311 and S1312, if the status bar also includes a second preset icon, the phone does not display the second preset icon in the status bar.

[0222] The following is combined Figure 14 Let me introduce it.

[0223] For example, such as Figure 14As shown in (a), the status bar does not include the capsule. The third area in the status bar is the area between the time icon and the first position. This area has a width of 3. The third area includes the SMS icon, App Store icon, missed call icon, and calendar icon. For ease of understanding, the first capsule to be displayed is drawn in the status bar, as shown below. Figure 14 As shown in (b) above. It can be seen that the fourth area in the status bar after displaying the capsule is the area between the time icon and the left side of the first capsule. The width of the fourth area, 4 = width 3 - width 2. The right side area of ​​the first capsule includes the Bluetooth icon, vibration icon, and NFC icon. The phone calculates the number n of notification icons that can be retained in the fourth area. Where, the number n = width 4 / (width of Bluetooth icon + width of vibration icon + width of NFC icon). Assuming width 4 = 20dp, the width of the Bluetooth icon is 8dp, the width of the vibration icon is 8dp, and the width of the NFC icon is 6dp. The number n is less than 1. Since the priority of the NFC icon is higher than that of the vibration icon, which is higher than that of the Bluetooth icon, the phone recalculates the number n: number n = width 4 / (width of vibration icon + width of NFC icon). n = 1.25. The phone uses the vibration icon and the NFC icon as the first icon. The phone determines to retain one notification icon; since the priority of notification icons decreases from left to right, the phone determines to retain the highest priority notification icon, namely the SMS icon. The phone uses all notification icons in the left-hand area of ​​the status bar, excluding the SMS icon, as the third icon. After responding to the first message, such as... Figure 14 As shown in (c), the first icons, such as the NFC icon and the vibration icon, are displayed in the fourth area, while the Bluetooth icon is hidden. The fourth area also displays the SMS icon. Furthermore, because system icons have higher priority than notification icons, the phone displays the NFC icon and vibration icon after the time icon and before the SMS icon.

[0224] Figure 14 (d) shows the status bar excluding the capsule; the status bar includes a battery percentage icon and carrier name. For clarity, after hiding the battery percentage icon and carrier name, a shift operation is performed, and the first capsule to be displayed is drawn in the status bar, as shown below. Figure 14 As shown in (e) above. It can be seen that the width 4 of the fourth area = width 3 - width 2 + the width of the carrier icon. Based on width 4 and the total width of the Bluetooth and vibration icons, the phone determines that the icons to be retained in the fourth area are the SMS icon and the app store icon. Therefore, it decides to shift the Bluetooth and vibration icons to be displayed in the fourth area, and hide the missed call icon and the app store icon. The phone can display as shown below. Figure 14 The status bar shown in (f) is shown in the image.

[0225] The above description, in conjunction with the accompanying drawings, introduces a display method provided by an embodiment of this application. The following describes the interaction between various software and hardware modules in a mobile phone.

[0226] The mobile phone may include a system user interface (SystemUI) module, which may include a capsule module and a status bar module. The capsule module is used to receive a first message and generate a first capsule based on the first message. The status bar module is used to adjust the visibility and / or position of the icons in the status bar according to the first capsule.

[0227] For example, such as Figure 15 and Figure 16 As shown, the capsule module may include a receiving module, a management module, a parsing module, a view control module, and a display module. The status bar module may include an update module, a layout module, a control module, and an animation module.

[0228] Figure 16 This is a module interaction method provided in the embodiments of this application. Figure 16 In the illustrated embodiment, the status bar includes a first preset icon and a second preset icon. Figure 16 The methods shown include:

[0229] S1 a, the alarm clock application sends capsule data to the receiving module in the capsule module.

[0230] For example, if a user sets an alarm for 7 a.m., at 7 a.m., the alarm clock application sends capsule data to the receiving module in the capsule module. The capsule data is the first message mentioned earlier.

[0231] The receiving module could be, for example, the Global DynamicCoord inato class, used to receive capsule data sent by applications on the phone.

[0232] S2a, the receiving module receives capsule data.

[0233] S3a, the management module reads the capsule data and saves the capsule data.

[0234] The receiving module can buffer the received capsule data at a preset location and trigger the management module to read the capsule data from the preset location. For example, the capsule module `GLOBAL DynamicCoord` class can call the `processCapsuleData` method to trigger the management module to read the capsule data from the preset location. The management module can be, for example, the `CapsuleManager` class, which can call the `onDynamicCapsuleDataAdd` method to first save the capsule data in the management module's corresponding buffer.

[0235] S4a, the parsing module parses the capsule data and generates the view object of the first capsule.

[0236] The parsing module reads capsule data from the buffer corresponding to the management module and parses out the layout information, which is used to generate the view object of the first capsule. The layout information may include the position of the first capsule on the display screen, the size of the first capsule, the color of the first capsule, the text and / or images displayed in the first capsule, and the position information of the text and / or images displayed in the first capsule. The view object is a basic UI component, containing data about the interface elements displayed in the user interface, such as buttons, text, images, and capsules. After the view object is drawn and rendered, the corresponding interface elements are displayed on the display screen.

[0237] The parsing module could be, for example, the CapsuleViewFactory class. The CapsuleViewFactory class calls the notifyCapsuleRecordAdd method to parse the layout data in the capsule data. After that, the parsing module can generate the view object of the first capsule based on the layout data.

[0238] S5a, the view control module saves the view object of the first capsule in the list to be displayed.

[0239] The view control module can save the view object of the first capsule in the list to be displayed.

[0240] S6a, the display module sorts the view objects of the capsules to be displayed based on the application's priority, and triggers the display of the view objects corresponding to the capsules with higher priority.

[0241] View control modules can be, for example, the `CapsuleClusterControl` class. The view control module can call the `onCapsuleRecordAdd` method to indicate that a capsule needs to be added. Display modules, such as the `LivelyCapsuleStatusBarHelper` class, can call the `setCurrentRecordSortToCapsuleSet` method to prioritize newly added view objects against existing capsule view objects, displaying the view object with the highest priority on the screen. The higher the application's priority, the higher the priority of the view object generated from the capsule data emitted by that application. System applications have a higher priority than third-party applications.

[0242] The display module triggers the drawing and rendering module in the phone to draw and render the view object to obtain the image data of the first capsule. When multiple capsule view objects are obtained simultaneously, the display module displays the capsule corresponding to the application with higher priority at the top and the capsule corresponding to the application with lower priority at the bottom.

[0243] The notification module triggers the status bar module to update the position and / or visibility of icons. The status bar module includes an update module, a layout module, and an animation notification module.

[0244] S7a, the display module triggers the update module to calculate width 1 and width 2.

[0245] The update module can be, for example, the HwPhoneStatusBarView class. The update module can call the updateStatusIconsVisibility method and the calculateRightHideWidth method to calculate the width 1 occupied by the first capsule in the left area of ​​the status bar and the width 2 occupied by the first capsule in the right area of ​​the status bar.

[0246] S8a, the update module confirms that the icons displayed in the status bar include the battery percentage icon and the carrier name.

[0247] In the S9a update module, the battery percentage icon and carrier name are made invisible.

[0248] S10a, the update module triggers the layout module to calculate the width of the icon that needs to be hidden on the right side of the status bar and the available width of the area on the left side of the status bar.

[0249] The width of the icon to be hidden on the right = width 1 - width of the battery percentage icon = (horizontal coordinates of the far right of the first capsule - horizontal coordinates of the first position) + safety distance - width of the battery percentage icon.

[0250] Available width = Width of the third area (3) - Width (2) + Width of the carrier name. Where, Width (3) = Horizontal coordinate of the first position - Horizontal coordinate of the time icon. Width (2) = Horizontal coordinate of the first position - Horizontal coordinate of the leftmost part of the first capsule.

[0251] The layout module can be, for example, the HwSystemIconParentView class or the HwNotationIconContainer class. Specifically, the HwPhoneStatusBarView class calls the updateOccupiedNotificationIconAreaRect method in the HwSystemIconParentView class to calculate the available width of the left side of the status bar area.

[0252] S11 a, The layout module calculates the third target icon in the right area of ​​the first capsule in the status bar.

[0253] For icons located in the right-hand area of ​​the status bar, the phone can calculate a first distance using the icon's coordinates. If this first distance is greater than the width that needs to be hidden on the right (width 1 - the width of the battery percentage icon), the phone determines that the icon is the third target icon. For example... Figure 14 As shown in (d) in the diagram, the third target icon is the Bluetooth icon and the vibration icon.

[0254] Specifically, the HwSystemIconParentView class calls the updateIconAreaWidth method in the HwNotificationIconContainer class to calculate the third target icon in the right area of ​​the status bar.

[0255] S12a, the layout module calculates the number of notification icons to be retained and the number of first icons moved to the fourth area.

[0256] Available width = width 3 - width 2 + width of carrier name.

[0257] by Figure 14 For example, the number of notification icons to be retained, n, is calculated as follows: (width 3 - width 2 + width of carrier name - total width of third target icon) / standard width of notification icon. For instance, the number of notification icons, n, is calculated as: (width 3 - width 2 + width of carrier name - width of Bluetooth icon - width of vibration icon) / standard width of notification icon. Assuming n = 2, the phone will retain the first and second notification icons to the right of the time icon, namely the SMS icon and the app store icon, and will use the missed call icon and calendar icon as the third icon.

[0258] When the number n is less than 1, it means that after moving all the third target icons to the fourth area, no more notification icons can be displayed. In order to retain at least one notification icon, the phone moves some icons from the third target icons to the fourth area as the first icons, and hides the remaining second icons from the third target icons other than the first icons. Please refer to the previous introduction; it will not be repeated here.

[0259] S13a, the update module sets the third and second icons to be invisible.

[0260] For example, the status bar module makes the missed call icon and calendar icon invisible. If the system icon, which cannot be moved to the left side of the status bar, is also included in the right-hand area of ​​the first capsule, that system icon will be made invisible. Making an icon invisible means setting its transparency to zero.

[0261] S14a, The update module triggers the control module to update the position of the icon to be displayed.

[0262] The control module first shifts all icons except the carrier icon and the battery percentage icon. For example, it adds the width of the battery percentage icon to the horizontal coordinate of all icons on the right side of the status bar (excluding the battery percentage icon). It then subtracts the width of the carrier icon from the horizontal coordinate of all icons on the left side of the status bar (excluding the carrier icon).

[0263] Next, the control module modifies the positions of the first icon and the notification icons to be displayed. Since the first icon is displayed to the left of the notification icons to be displayed, the status bar module shifts the position of each notification icon in the list to the right by the total width of the first icon. Based on priority, the control module moves the lowest priority first icon to the left of the time icon, and from the time icon to the right, the priority of the first icons increases sequentially. Figure 14 Taking (e) as an example, the original coordinates of the SMS icon are (x1, y1), and the control module modifies them to (x1-X2+X). a The original coordinates of the app store icon are (x2, y1), and the control module modifies them to (x2 - x2 + x1). a (x2), where x2 is the width of the carrier icon, and x... a This is the total width of the Bluetooth icon and the vibration icon. After shifting the notification icon to be displayed to the left by the width of the carrier name, the total width of the Bluetooth and vibration icons is shifted to the right. The original coordinates of the time icon are (x3, y3), which the control module modifies to (x3 - x2, y3). This shifts the time icon to the left by the width of the carrier name. The Bluetooth icon is now to the left of the shifted time icon, and the control module modifies its position to (x3 - x2 + the width of the time icon, y3). The control module modifies the position of the vibration icon to (x3 - x2 + the width of the time icon + the width of the Bluetooth icon, y3). In this example, the icon's coordinates are the position of the bottom left vertex of the smallest bounding rectangle containing the icon.

[0264] The control module can be the `HnStatusBar IconAvoidCapsuleAnimController` class, and the update module, such as the `HwPhon eStatusBarView` class, calls the `HnStatusBar IconAvoidCapsuleAnimController` class to perform the operation of updating the icon position.

[0265] S15a, the layout module triggers the animation module to create animation effects.

[0266] The animation module creates animations based on the layout information sent by the layout module. The animation module can be a StatusBar IconView class. The layout module calls the startAvoidAnim method in the StatusBar IconView class, triggering the animation module to create the animation.

[0267] The animation could be, for example: the transparency of the third icon, the second icon, the carrier name, and the battery percentage icon gradually decreases until the icons disappear; all icons in the right area of ​​the status bar except for the battery percentage icon move to the right; all icons in the left area of ​​the status bar except for the carrier name move to the left; the first capsule is displayed; the first icon and the notification icon to be displayed are displayed sequentially to the right of the time icon. Optionally, when displaying the first icon and the notification icon to be displayed, the transparency of the first icon and the notification icon to be displayed gradually increases until the icons are displayed.

[0268] S16a, the update module triggers the display screen to show animation effects.

[0269] In some embodiments, when the capsule disappears from the phone, the phone also adjusts the visibility and / or position of the icon in the status bar. The phone may not display the capsule corresponding to an application based on a second message from the application. The application may respond to user actions or automatically send a second message to the phone. For example, the phone displays a capsule, and the application receives a user's action of swiping the capsule left or right, and sends a second message to the phone. Another example is that the phone displays a capsule, and in response to the user tapping the capsule, the capsule expands into a card, which includes a close control. The application receives a request to tap the close control in the card and sends a second message to the phone. Yet another example is that the capsule contains elements including a close control, and the application receives a request from the user tapping the close control in the capsule, and sends a second message to the phone. Yet another example is that the capsule displays pickup information, and after the user completes pickup, the courier application sends a second message to the phone. Yet another example is that the capsule displays travel information, and after the user travels, the travel application sends a second message to the phone, and so on.

[0270] For example, a mobile phone displays a status bar, which includes multiple icons, including a first capsule surrounding a through-hole; the multiple icons include a first icon located in a second area of ​​the status bar. In response to a second message from an application on the mobile phone, the status bar does not display the first capsule, and the first icon is moved from the second area of ​​the status bar to the first area of ​​the status bar for display; the second message is used to trigger the mobile phone to not display the first capsule.

[0271] For example, in response to a second message from an application on the phone, the status bar does not display the first capsule, and the first icon is moved from the second area of ​​the status bar to the first area of ​​the status bar, while the second icon is displayed in the second area of ​​the status bar.

[0272] For example, in response to a second message from an application on the phone, the status bar does not display the first capsule, and the first icon is moved from the second area of ​​the status bar to the first area of ​​the status bar. The second icon and the first preset icon are displayed in the second area of ​​the status bar.

[0273] For example, in response to a second message from an application on the phone, the first capsule is not displayed in the status bar, and the first icon is moved from the second area of ​​the status bar to the first area of ​​the status bar, while the third icon is displayed in the first area of ​​the status bar.

[0274] For example, in response to a second message from an application on the phone, the status bar does not display the first capsule, and the first icon is moved from the second area of ​​the status bar to the first area of ​​the status bar. The second preset icon and the third icon are displayed in the first area of ​​the status bar.

[0275] For example, in response to a second message from an application on the phone, the status bar does not display the first capsule, and the first icon is moved from the second area of ​​the status bar to the first area of ​​the status bar. The second preset icon and the third icon are displayed in the first area of ​​the status bar, and the second icon and the first preset icon are displayed in the second area of ​​the status bar.

[0276] The following descriptions will be divided into two scenarios, with the first area being the right-hand area and the second area being the left-hand area.

[0277] Scenario 1: In response to the second message, the phone identifies whether the user has enabled the switch to display the carrier name and battery percentage icon. If the switch is not enabled, the phone updates the usable width of the right side of the status bar to the distance between the first position and the leftmost icon in the right area of ​​the status bar, such as... Figure 17 Width A in (a). Update the usable width on the left side of the status bar to (distance from the first position to the time icon - total width of currently displayed notification icons), such as... Figure 17(a) Width B. Where, width B = width b - width a. Width b is the distance between the first position and the time icon, and width a is the total width of the currently displayed notification icons. Afterwards, the phone will make all or some of the icons that were previously set to invisible visible. Icons set to invisible include system icons and / or notification icons. When displaying the first capsule, the phone will make some icons invisible based on the method described above. Furthermore, during the display of the first capsule, the phone may receive application notification messages or system notifications that require the display of notification icons or system icons. In this case, the phone can make these notification icons or system icons invisible. Specifically, the phone calculates the number m of displayable notification icons, where m = width B / standard width of the notification icon. The phone makes m of the invisible notification icons displayable. The phone determines the displayable system icons based on the available width on the right side of the status bar and the priority of the invisible system icons. For example, the invisible system icons are first sorted by priority, and then the width of the system icons and width A are compared to determine the displayable system icons. Afterwards, the phone does not display the first capsule. The phone displays available notification icons in the left-hand area of ​​the status bar, to the right of the already displayed notification icons, based on application priority. The phone also displays available system icons in the right-hand area of ​​the status bar, to the left of the already displayed system icons, based on icon priority. Figure 17 As shown in (a) in the figure.

[0278] When the user enables the above switch, the phone will make the default icon visible. After displaying the default icon, the phone will shift the width of the carrier name to the right of all icons on the left side of the status bar, and shift the width of the battery percentage icon to the left of all icons on the right side of the status bar. For ease of understanding, [the following is a simplified explanation of the default icon]. Figure 17 The icons in the status bar shown in (b) are shifted. It can be seen that width B = width b - width a - width of the carrier name. Width A = width c - width of the battery percentage icon, where width c = the distance from the first position to the leftmost icon on the right side of the status bar, such as the NFC icon. After obtaining width A and width B, the phone can calculate the displayable system icons and / or notification icons using the same method, and display the displayable icons when the capsule is not displayed.

[0279] Scenario 2: In response to the second message, the phone identifies whether the user has enabled the switch to display the carrier name and / or battery percentage icon. If the switch is not enabled, the phone will move the first icon displayed in the left area of ​​the status bar to the right area of ​​the status bar. For ease of understanding, as follows... Figure 17As shown in (c), the vibration icon and NFC icon are moved to the right side of the status bar. After the move, width A is the distance from the first position to the leftmost icon, such as the NFC icon, in the right-hand area of ​​the status bar. Width B = (width b - width a). After obtaining width A and width B, the phone can calculate the displayable system icons and / or notification icons using the same method, and display the displayable icons when the capsule is not displayed. The displayable system icons may include a hidden second icon.

[0280] When the user enables the above switch, the phone makes the battery percentage icon and carrier name visible. For icons displayed in the left area of ​​the status bar, the width of the carrier name is shifted to the right; for icons displayed in the right area of ​​the status bar, the width of the battery percentage icon is shifted to the left. The system icons, which are usually displayed in the left area of ​​the status bar for notifications, are moved to the right side of the status bar. For ease of understanding, as... Figure 17 As shown in (d), a preset icon is displayed and then shifted. Next, the first icon is moved from the left side of the status bar and displayed in the right side. After the shift operation, width A is the distance from the first position to the leftmost icon (e.g., the Bluetooth icon) in the right side of the status bar. Width B = (width b - width a - width of the carrier name). After obtaining widths A and B, the phone can calculate the displayable system icons and / or notification icons using the same method, and display the displayable icons when the capsule is not displayed.

[0281] Figure 17 In the illustrated embodiment, the status bar displayed by the phone before receiving the second information includes a notification icon. When the status bar displayed by the phone before receiving the second information does not include a notification icon, the usable width B on the left side of the status bar is the distance between the first position and the time icon. Optionally, when displaying displayable system icons, the phone can sort the displayable system icons and already displayed system icons based on priority, and then display them in the right area of ​​the status bar from low to high priority. Optionally, when displaying displayable notification icons, the phone can sort the displayable notification icons and already displayed notification icons based on application priority, and then display them in the left area of ​​the status bar from high to low priority.

[0282] Figure 18 This is a module interaction method provided in the embodiments of this application. Figure 18 In the illustrated embodiment, the status bar includes a first preset icon and a second preset icon. Figure 18 The methods shown include:

[0283] S1b, the alarm clock application sends a removal message to the receiving module in the capsule module.

[0284] This removal information is used to trigger the phone to not display the first capsule corresponding to the alarm clock app. Receiver modules such as the `GlobalDynamicCoordInto` class can call the `onNotificationRemove` method to trigger the management module to remove the capsule data.

[0285] S2b, the receiving module receives the removal information.

[0286] S3b, the management module deletes the saved capsule data of the first capsule.

[0287] The management module can call the onDynamicCapsuleDataRemoved method to remove saved capsule data.

[0288] S4b, the view control module deletes the view object corresponding to the first capsule.

[0289] View control modules such as the CapsuleClusterController class call the onCapsuleRecordRemoved method to indicate that the first capsule needs to be removed.

[0290] S5b, the display module deletes the view object corresponding to the first capsule.

[0291] The display module calls the `removeCapsu leViewFromCapsu leSet` method to remove the view object corresponding to the first capsule in the status bar.

[0292] The display module will trigger the status bar module to refresh the visibility and avoidance effects of each icon in the status bar.

[0293] S6b, the display module triggers the update module to calculate the usable width on the left side of the status bar and the usable width on the right side of the status bar.

[0294] The update module calls the updateOccupiedNotifIconAreaRect method in the layout module, such as the HwSystemIconParentView class, to calculate the usable width on the left and right sides of the status bar.

[0295] S7b, the layout module determines the icons that can be displayed.

[0296] Displayable icons include displayable notification icons and / or displayable system icons. The number of displayable notification icons is calculated as: the usable width of the left side of the status bar / the standard width of the notification icon. After determining the number of displayable notification icons, displayable notification icons are selected from a pool of invisible icons based on priority. Based on priority and the usable width of the right side of the status bar, the system icon with the highest priority is selected as the displayable system icon from a pool of invisible system icons.

[0297] For example, layout modules such as the HwSystemIconParentView class call the updateIconAreaWidth method in the HwNotificationIconContainer class to calculate the number of notification icons that can be displayed after the capsule disappears.

[0298] In S8b, the update module makes the carrier name and battery percentage icon visible.

[0299] S9b updates module update icon visibility.

[0300] For example, the update module sets the visible system icons and / or visible notification icons to be visible.

[0301] S10b, the update module triggers the control module to update the position of the icon in the status bar.

[0302] Move the currently displayed notification icons in the status bar to the right by the width of the carrier name. Move the currently displayed system icons in the status bar to the left by the width of the battery percentage icon. Move the first icon from the second area to the first area. Place the displayable notification icons to the right of the currently displayed notification icons, and place the displayable system icons to the left of the currently displayed system icons.

[0303] S11 b, the layout module triggers the animation module to create animation effects.

[0304] The animation is as follows: the first capsule disappears; all icons on the right side of the status bar, except for the battery percentage icon, move to the left, and all icons on the left side of the status bar, except for the carrier name, move to the right; the transparency of the carrier name and battery percentage icons in the status bar gradually increases until the icons appear; the first icon moves and appears in the first area of ​​the status bar; a notification icon appears to the right of the currently displayed notification icon; and the system icon appears to the left of the first icon. Specifically, when displaying the system icon and notification icon, the transparency of the icons gradually increases until they are displayed.

[0305] S12b, the update module triggers the display screen to show animation effects.

[0306] The preceding text primarily used the example of a capsule displayed in the middle area of ​​the status bar, in an expanded state, to introduce one display method. In some embodiments, the capsule can be displayed in different areas of the status bar and have different forms. The following section will combine... Figure 19 To introduce it. For example... Figure 19 As shown, the capsule can have two forms: an expanded state and a contracted state.

[0307] For example, in response to the application's first message, the phone can display an expanded capsule, and after a preset time, switch the expanded capsule to a collapsed state. During the switch, as... Figure 19 As shown in (a), the phone can update the usable width on the right side of the status bar to the distance between the first position and the NFC icon. The phone determines and displays the system icons that can be shown based on the usable width on the right side of the status bar, such as the GPS and Wi-Fi icons. The phone displays as many icons as possible based on the width of the thumbnail capsule, maintaining a 4dp safety distance between the icons and the thumbnail capsules. The phone can overlay multiple expanded capsules, with the capsule corresponding to the highest priority application displayed on top. When switching states, the phone switches multiple expanded capsules to thumbnail state, with the capsule corresponding to the highest priority application displayed on top.

[0308] For example, such as Figure 19 As shown in (b), when the opening for the camera is located on the left side of the status bar, the capsule is displayed on the left side of the status bar. For example, in response to a first message from the application, if the current status bar includes a battery percentage icon and / or carrier name, the phone will make the battery percentage icon and / or carrier name disappear with an opacity animation until they are hidden. After hiding the battery percentage icon, the system icons on the right side of the status bar are shifted to the right by the width of the battery percentage icon. After hiding the carrier name, the icons on the left side of the status bar are shifted to the right to accommodate the capsule. After this shift, notification icons that cannot fit in the left side of the status bar, such as the calendar icon, are hidden. When switching from expanded to thumbnail mode, the battery percentage icon is displayed, and all other icons on the right side of the status bar, except for the battery percentage icon, are shifted to the left by the width of the battery percentage icon. Based on the width of the thumbnail capsule, as many notification icons as possible are displayed, maintaining a 4dp safety distance between the icons and the thumbnail capsule. Figure 19 As shown in (b), after switching to the thumbnail state, since the width occupied by the capsule is reduced, the icons on the left side of the status bar can be moved to the left as a whole. After the movement, if there is still space on the left side of the status bar, some notification icons can be displayed, such as the calendar icon in the figure.

[0309] For example, a foldable phone can be either an inward-folding or outward-folding screen. When the phone is unfolded, the capsule is displayed on the large screen. For instance, the foldable phone includes folded screens A and B. After unfolding, the phone can display an image in full-screen mode on screen C, which is composed of screens A and B. In the unfolded state, the capsule can be displayed in the status bar of screen C. Figure 19 As shown in (c), when the expanded capsule is displayed, the phone does not hide any icons in the right-hand area of ​​the status bar. If the icons currently displayed in the status bar include the carrier name, the phone hides the carrier name. For example, the phone applies a fade-out and shrink-out animation to the carrier name, eventually making it disappear. Then, the remaining icons in the left-hand area of ​​the status bar, excluding the carrier name, are shifted to the left by the width of the carrier name. Whether the icons currently displayed in the status bar include or exclude the carrier name, the phone can directly display the expanded capsule. When switching from expanded to minimized mode, it directly switches to minimized mode.

[0310] As mentioned earlier, the capsule usually wraps around the opening used to house the front-facing camera. For electronic devices without a front-facing camera, the capsule is typically displayed behind the time icon on the left side of the status bar. For example, as... Figure 19 As shown in (d), when the capsule is displayed in its expanded state, if the current status bar includes the battery percentage icon, the phone will use an animation to make the battery percentage icon disappear until it is hidden. After hiding the battery percentage icon, the system icons in the right area of ​​the status bar are moved to the right by the width of the battery percentage icon. If the current status bar includes the carrier name, the carrier name is hidden. The time icon is moved to the left, and the notification icons are moved to the right, placing the capsule between the time icon and the notification icons, and hiding any notification icons that do not fit in the left area of ​​the status bar. If the status bar does not include the battery percentage icon, the icons in the right area of ​​the status bar do not need to be changed. If the status bar does not include the carrier name, the notification icons are moved to the right, and any notification icons that do not fit in the left area of ​​the status bar are hidden, placing the capsule between the time icon and the notification icons. When switching from the expanded state to the thumbnail state, since the width occupied by the capsule is reduced, the notification icons can be moved to the left, and after the movement, if there is still space on the left side of the status bar, the hidden notification icons will be displayed.

[0311] This application provides an electronic device including a memory, a display screen, and one or more processors. The display screen is coupled to the processors. The memory stores computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the mobile phone in the above method embodiments. The structure of the electronic device can be referred to... Figure 3 The structure of the electronic device 300 shown.

[0312] This application embodiment also provides a computer storage medium, which includes computer instructions, when the computer instructions are executed in the aforementioned electronic device (such as...). Figure 3 When the electronic device 300 shown is run, it causes the electronic device to perform the various functions or steps in the above method embodiments.

[0313] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps described in the above method embodiments.

[0314] This application also provides a chip system including at least one processor and at least one interface circuit. The processor and the interface circuit are interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit can be used to send signals to other devices (e.g., the processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application does not specifically limit this.

[0315] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0316] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0317] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0318] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0319] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0320] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A display method, characterized in that, Applied to electronic devices, the display screen of the electronic device is provided with a through hole for placing a camera; A status bar is displayed, which includes multiple icons but does not include the interface elements surrounding the through-hole; the multiple icons include a first icon located in a first area of ​​the status bar. In response to a first message from an application in the electronic device, a first interface element is displayed in the status bar, and the first icon is moved from a first area of ​​the status bar to a second area of ​​the status bar, with the display position of the first interface element surrounding the through-hole; the first message is used to trigger the electronic device to display the first interface element.

2. The method according to claim 1, characterized in that, The plurality of icons also includes a second icon located in the first area of ​​the status bar, and the method further includes: In response to the first message from the application in the electronic device, the second icon is not displayed in the status bar.

3. The method according to claim 1 or 2, characterized in that, The plurality of icons also includes a first preset icon located in the first area of ​​the status bar, and the method further includes: In response to the first message from the application in the electronic device, the first preset icon is not displayed in the status bar.

4. The method according to any one of claims 1-3, characterized in that, The plurality of icons also includes a third icon located in the second area of ​​the status bar, and the method further includes: In response to the first message from the application in the electronic device, the third icon is not displayed in the status bar.

5. The method according to any one of claims 1-4, characterized in that, The plurality of icons also includes a second preset icon located in the second area of ​​the status bar, and the method further includes: In response to the first message from the application in the electronic device, the second preset icon is not displayed in the status bar.

6. The method according to any one of claims 1-5, characterized in that, Before the status bar displays the first interface element, the method further includes: Identify the icon to be adjusted in the first area of ​​the status bar; the icon to be adjusted is an icon in the status bar that is obscured by the first interface element; The first icon is identified from the icons to be adjusted; the first icon is the icon to be moved to the second area of ​​the status bar for display.

7. The method according to claim 6, characterized in that, Before the status bar displays the first interface element, the method further includes: Identify a third icon from the notification icons displayed in the second area of ​​the status bar; the third icon is a subset of the notification icons displayed in the second area.

8. The method according to claim 6 or 7, characterized in that, After identifying the first icon from the icons to be adjusted, the method further includes: The remaining icons in the list of icons to be adjusted, excluding the first icon, are designated as the second icons.

9. The method according to any one of claims 6-8, characterized in that, The process of identifying the icons to be adjusted in the first area of ​​the status bar includes: If the first area of ​​the status bar does not include the first preset icon, the icon to be adjusted is identified based on the size and position information of the first interface element. When the first area of ​​the status bar includes a first preset icon, the icon to be adjusted is identified based on the size and position information of the first interface element and the width of the first preset icon.

10. The method according to claim 6, characterized in that, The step of identifying the first icon from the icons to be adjusted includes: When the available width of the second area of ​​the status bar is greater than or equal to the total width of the icon to be adjusted, the icon to be adjusted is used as the first icon; When the available width of the second region is less than the total width of the icons to be adjusted, a portion of the icons to be adjusted will be used as the first icon.

11. The method according to claim 7, characterized in that, The step of identifying the first icon from the icons to be adjusted includes: Based on the available width of the second area and the width of the icon to be adjusted, at least one icon to be displayed is identified from the notification icons displayed in the second area of ​​the status bar, and the first icon is identified from the icons to be adjusted; the sum of the width of the at least one icon to be displayed and the width of the first icon is equal to the available width of the second area.

12. The method according to claim 11, characterized in that, The step of identifying the third icon from the notification icons displayed in the second area of ​​the status bar includes: The remaining icons displayed in the second area of ​​the status bar, excluding the at least one icon to be displayed, are designated as the third icon.

13. The method according to any one of claims 10-12, characterized in that, When the second area of ​​the status bar includes a second preset icon, the available width of the second area is the difference between the first width and the second width; when the second area of ​​the status bar does not include the second preset icon, the available width of the second area is the sum of the difference between the first width and the second width and the width of the second preset icon; wherein, the first width is the distance from the third preset icon in the status bar to the first position before the first message is received, and the second width is the width of the second area occupied by the first interface element; the first position is used to divide the status bar into the first area and the second area.

14. An electronic device, characterized in that, The electronic device includes: a memory, a display screen, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the display screen is used to display images; the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1-13.

15. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-13.

16. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1-13.