Display method, device, terminal equipment and computer readable storage medium
Patent Information
- Application Number
- CN202611223203.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-09
AI Technical Summary
现有实现方式中,装饰栏通常依附于任务对应的窗口进行绘制,对应画布作为对应任务的子节点存在,相关装饰内容需要在任务范围内进行绘制,从而容易对任务内容的显示区域造成遮挡,影响显示布局的灵活性
[0014]本发明的有益效果:通过获取目标任务的装饰栏信息,并创建系统层级的装饰栏画布,随后基于所述装饰栏画布绘制目标任务对应的目标装饰栏,再基于所述目标装饰栏显示目标任务,由于装饰栏是在系统层级的装饰栏画布中进行绘制,而非在目标任务对应的子节点画布中进行绘制,因此装饰栏的显示范围不再受目标任务几何范围的约束,使装饰栏能够根据显示需求在更大的显示范围内进行布局和显示,从而降低装饰栏对目标任务内容显示区域产生遮挡的可能性,提高任务界面的显示完整性以及装饰栏布局的灵活性。
Smart Images

Figure CN122884591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a display method, apparatus, terminal device, and computer-readable storage medium. Background Technology
[0002] In the Android system, the window corresponding to a task typically includes a decorative bar for displaying information such as the title bar and borders. In existing implementations, the decorative bar is usually drawn attached to the window corresponding to the task, with the corresponding canvas existing as a child node of the task. The decorative content needs to be drawn within the task's area, which can easily obscure the display area of the task content and affect the flexibility of the display layout. Summary of the Invention
[0003] This application provides a display method, apparatus, terminal device, and computer-readable storage medium, which can enable the decorative bar to be laid out and displayed in a larger display area according to display needs, thereby reducing the possibility of the decorative bar obstructing the display area of the target task content, improving the display integrity of the task interface, and increasing the flexibility of the decorative bar layout.
[0004] The technical solution adopted by this invention to solve the problem is as follows: On the one hand, this application provides a display method, including: Retrieve the decoration bar information for the target task to be displayed; Create a system-level decorative panel canvas; Based on the decoration bar information and the decoration bar canvas, draw the target decoration bar corresponding to the target task; Display the target task based on the target decoration bar.
[0005] In some embodiments of this application, there are multiple target tasks and multiple target decorative columns, and the multiple target tasks correspond one-to-one with the multiple target decorative columns; Based on the decoration bar information and the decoration bar canvas, draw the target decoration bar corresponding to the target task, including: In the decoration canvas, draw the corresponding multiple target decorations based on the decoration information of each target task.
[0006] In some embodiments of this application, the method further includes: Obtain information on changes in the display hierarchy of multiple target tasks; In the decoration panel canvas, based on the display hierarchy change information, modify the decoration panel hierarchy information of multiple target decoration panels, and display multiple target decoration panels based on the modified decoration panel hierarchy information.
[0007] In some embodiments of this application, the target decorative bar corresponding to the target task is drawn based on the decorative bar information and the decorative bar canvas, including: Based on the decoration information, the elements to be drawn in the target decoration are classified to obtain the target category information; Draw the target decoration bar in the decoration bar canvas based on the target category information.
[0008] In some embodiments of this application, the elements to be drawn in the target decorative bar are classified according to the decorative bar information to obtain target category information, including: Based on the information in the decoration bar, determine whether the element to be drawn is a preset type element; When the element to be drawn is not a preset type element, the target category information is determined to be the first category information; When the element to be drawn is a preset type element, determine whether the element needs to interact with the user based on the decoration bar information; if the element needs to interact with the user, determine the target category information as the first category information; if the element does not need to interact with the user, determine the target category information as the second category information.
[0009] In some embodiments of this application, the target decorative bar is drawn in the decorative bar canvas according to the target category information, including: If the target category information is the first category information, draw the view corresponding to the element to be drawn in the decoration bar canvas to obtain the target decoration bar.
[0010] In some embodiments of this application, the target task is displayed based on the target decorative bar, including: Get the task canvas corresponding to the target task to be displayed; The task canvas and the decorative canvas with the target decorative panel are combined to display the target task, where the decorative canvas has a higher display level than the task canvas.
[0011] In a second aspect, embodiments of the present invention also provide a display device, comprising: The acquisition module is used to acquire the decoration bar information of the target task to be displayed; Create a module for creating system-level decorative canvases; The drawing module is used to draw the target decorative bar corresponding to the target task based on the decorative bar information and the decorative bar canvas. The display module is used to display the target task based on the target decoration bar.
[0012] Thirdly, this application also provides a terminal device, which includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by a processor to implement the display method of any of the first aspects.
[0013] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps in the display method of any of the first aspects.
[0014] The beneficial effects of this invention are as follows: By acquiring the decorative bar information of the target task and creating a system-level decorative bar canvas, the target decorative bar corresponding to the target task is drawn based on the decorative bar canvas, and then the target task is displayed based on the target decorative bar. Since the decorative bar is drawn in the system-level decorative bar canvas, rather than in the child node canvas corresponding to the target task, the display range of the decorative bar is no longer constrained by the geometric range of the target task. This allows the decorative bar to be laid out and displayed in a larger display range according to display requirements, thereby reducing the possibility of the decorative bar obscuring the display area of the target task content, improving the display integrity of the task interface and the flexibility of the decorative bar layout. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of a display system provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating one embodiment of the display method provided by the present invention; Figure 3 This is a schematic diagram of the decorative railing provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the hierarchical relationship between the decoration canvas and the task canvas provided in an embodiment of the present invention; Figure 5 This is a flowchart illustrating a specific embodiment of the display method for the decorative bar provided in this invention. Figure 6 This is a schematic block diagram of the display device provided in the embodiment of the present invention; Figure 7 This is a schematic diagram of an embodiment of the terminal device provided in this invention. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of the stated features.
[0019] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0020] It should be noted that since the method in this application embodiment is executed in a terminal device, the processing objects of each terminal device exist in the form of data or information, such as time, which is essentially time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data that exist so that the terminal device can process them. Specific details will not be elaborated here.
[0021] This application provides a display method, apparatus, terminal device, and computer-readable storage medium, which will be described in detail below.
[0022] Please see Figure 1 , Figure 1 This is a schematic diagram of a display system provided in an embodiment of this application. The display system may include a terminal device 100, which integrates a display device, such as... Figure 1 Terminal devices in the process.
[0023] In this embodiment, the terminal device 100 is mainly used to obtain the first position information of the face in the first face image, and determine whether the first position information meets the first condition; if the first position information meets the first condition, the terminal device obtains the gravity data, and based on the gravity data, the front camera of the terminal device is activated. The front camera can be automatically activated by combining the first face image and the gravity data of the terminal device, thereby simplifying user operation, reducing selfie preparation time and improving the convenience of selfies.
[0024] In this embodiment, the terminal device 100 can be an independent server, a server network, or a server cluster. For example, the terminal device 100 described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0025] It is understood that the terminal device 100 used in the embodiments of this application can be a device that includes both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display. Specifically, the terminal device 100 may be a desktop terminal or a mobile terminal, and the terminal device 100 may also be one of a mobile phone, tablet computer, laptop computer, etc.
[0026] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include those that are more specific to this application. Figure 1 The number of more or fewer terminal devices shown, for example Figure 1 Only one terminal device is shown in the image. It is understood that the display system may also include one or more other services, which are not specified here.
[0027] In addition, such as Figure 1 As shown, the display system may also include a memory 200 for storing data, such as decorative bar information, display hierarchy change information, target category information, etc.
[0028] It should be noted that, Figure 1The schematic diagram of the display system shown is merely an example. The display system and scenario described in this application are for the purpose of more clearly illustrating the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of display systems and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0029] First, this application provides a display method, the execution subject of which is a display device, which is applied to a terminal device. The display method includes: obtaining decoration bar information of the target task to be displayed; creating a system-level decoration bar canvas; drawing the target decoration bar corresponding to the target task according to the decoration bar information and the decoration bar canvas; and displaying the target task based on the target decoration bar.
[0030] like Figure 2 The diagram shown is a flowchart of an embodiment of the display method in this application. The display method may include the following steps S201 to S204, as detailed below: Step S201: Obtain the decoration bar information of the target task to be displayed.
[0031] In this step, the target task corresponds to a Task in the Android system. A Task can be understood as the basic unit for managing application interfaces in the Android system. The system typically manages the display, switching, movement, and hierarchical relationships of applications using Tasks as a whole. In actual use, one application usually corresponds to one Task. For example, when opening a navigation application, music application, vehicle control application, or smart assistant application on a smart car screen, the system will create corresponding Tasks to manage the interfaces of each application. Therefore, the target task can be understood as the Task corresponding to the target application that needs to be displayed. The decoration bar information can be information describing how the decoration bar of the target application is displayed, such as the position, size, display style, and borders or titles to be displayed.
[0032] Combination Figure 3 The specific application scenario of this step is understandable. The left side of the in-vehicle smart screen's display interface shows a dialog box. The dotted box indicates the decorative bar at the top of this dialog box. The decorative bar can include a title area, a border area, and decorative elements used to indicate the window's state. The entire dialog box corresponds to an application interface managed by a Task. When the system needs to display this application interface, it first needs to obtain the decorative bar information corresponding to that Task, such as the decorative bar's position, size, display style, and the border or title to be displayed. After obtaining the decorative bar information, the system can generate corresponding decorative bars for different Tasks, thereby ensuring that each application interface can be displayed according to its corresponding display requirements.
[0033] Step S202: Create a system-level decorative canvas.
[0034] In this step, the canvas corresponds to the Surface in the Android system, which is the display medium used to carry the content of graphic drawing. The decorative bar canvas belongs to the system level, meaning that the decorative bar canvas does not exist as a child node of the target task, but as an independent node in the system display layer, and its display area covers the entire screen.
[0035] In the native implementation of current Android systems, window decoration components are typically located within a separate Surface. However, this Surface is a child node of the corresponding application Task, so the decoration bar can only be displayed within the geometric boundaries of the corresponding Task. When the decoration bar needs to be displayed beyond the Task's boundaries, the corresponding decorative content still has to be drawn within the Task's boundaries, which can easily occupy the Task's internal display area.
[0036] In this step, a system-level decoration bar canvas is created, detaching the corresponding Surface from the Task hierarchy. It no longer functions as a child node of any Task but exists as an independent node within the system layer. Simultaneously, this canvas's size corresponds to the entire display screen, allowing the decoration bar to be drawn across the entire screen area, no longer limited by the target Task's geometry. This provides the foundation for flexible layout of the decoration bar later. When the decoration bar needs to be displayed outside the Task boundaries, it can also be drawn directly within the system-level canvas, reducing the area occupied by the decoration bar in the Task content display area and improving the interface's display flexibility.
[0037] Step S203: Draw the target decorative bar corresponding to the target task based on the decorative bar information and the decorative bar canvas.
[0038] In this step, based on the decoration bar information, the title area, border area, and other decorative elements are drawn onto the system-level decoration bar canvas to form the display content corresponding to the target decoration bar. Since the drawing process is completed in the system-level canvas, rather than in the target's corresponding Surface, the generated decoration bar does not depend on the target task but exists as system-level display content.
[0039] The decoration bar, originally attached to a task, is separated from the task's corresponding rendering system and rendered uniformly at the system level. This allows the decoration bar to determine its rendering position according to actual display needs, without being constrained by task boundaries. When the decoration bar needs to extend beyond the task's area, the corresponding decorative content can still be displayed completely, thereby improving the flexibility of the decoration bar layout and reducing the possibility of the decoration bar obscuring the task's content area.
[0040] Step S204: Display the target task based on the target decoration bar.
[0041] After completing the drawing of the target decorative bar, this step can display the target task based on the target decorative bar. Specifically, SurfaceFlinger (SurfaceFlinger, abbreviated as SF) in the Android system can be understood as a graphics compositing module, responsible for compositing the Surface of the application interface, the Surface of the system interface, and the system-level decorative bar canvas created in step S202 into a unified layer, generating the final output image to the display screen. In this step, SurfaceFlinger obtains the application interface content corresponding to the target task and the target decorative bar that has already been drawn in the system-level canvas, and then completes the layer compositing according to their respective display levels, finally displaying the composited overall interface on the in-vehicle smart screen. Since the target decorative bar has been drawn independently of the Task, in the final display process, the decorative bar can be displayed as a system-level node, while the application content corresponding to the target task remains normally displayed. This allows the decorative bar to be displayed within or outside the Task as needed, which helps reduce the situation where decorative content obscures the application interface and improves the overall display integrity and visual effect of the interface.
[0042] In one specific implementation, there are multiple target tasks and multiple target decorative columns, with each target task corresponding to one target decorative column. The target decorative column corresponding to the target task is drawn according to the decorative column information and the decorative column canvas, including: drawing the corresponding multiple target decorative columns in the decorative column canvas according to the decorative column information of each of the multiple target tasks.
[0043] In this embodiment, there are multiple target tasks, and each target decorative bar corresponds one-to-one with a specific target task; that is, each target task has its own corresponding decorative bar. In other words, when the system needs to display multiple target tasks simultaneously, it does not create separate decorative bar canvases to draw the decorative bars corresponding to each target task. Instead, within the same decorative bar canvas, multiple target decorative bars are drawn according to the decorative bar information corresponding to each of the multiple target tasks. A unique correspondence is established between the multiple target tasks and the multiple target decorative bars; each target task corresponds to a single decorative bar used to represent its own window state and boundaries, thus ensuring that different target tasks can have their own independent decorative display effects.
[0044] The system-level canvas itself can accommodate multiple decorative panels, thus eliminating the need to create separate decorative panel canvases for each target task. This allows for centralized management and unified drawing of decorative panels corresponding to multiple target tasks. Compared to methods where multiple target tasks correspond to multiple decorative panel canvases, this implementation utilizes only one decorative panel canvas to complete the drawing of multiple target decorative panels, thereby reducing the number of canvases involved in the final display composition. In the Android system, SurfaceFlinger needs to perform unified composition of the layers corresponding to each Surface. When the number of decorative panel canvases is reduced, the number of layers involved in the composition also decreases, thereby reducing the processing overhead during layer composition and improving display efficiency in multi-task display scenarios.
[0045] In one specific implementation, the method further includes: obtaining display hierarchy change information of multiple target tasks; modifying the decoration level information of multiple target decoration bars in the decoration bar canvas according to the display hierarchy change information, and displaying multiple target decoration bars based on the modified decoration level information.
[0046] In this embodiment, when the occlusion relationship between multiple target tasks changes, the display relationship between multiple target decorative bars also changes synchronously. The display hierarchy change information refers to the information about changes in the front-to-back hierarchy of multiple target tasks in the display interface. For example, if one target task moves before other target tasks, or if a target task becomes the currently top-level task due to user operation, the display hierarchy between multiple target tasks will change accordingly. The decorative bar hierarchy information refers to the front-to-back display order of multiple target decorative bars, used to determine the occlusion relationship when multiple target decorative bars overlap.
[0047] After acquiring the display hierarchy change information, this embodiment modifies the decoration level information of multiple target decoration bars according to the display hierarchy change information, and displays the multiple target decoration bars based on the modified decoration level information. Since the multiple target decoration bars are drawn together in the same decoration bar canvas, they also have corresponding hierarchical relationships. When the display level of a certain target task changes, the hierarchical information of the corresponding target decoration bar is adjusted synchronously, so that the multiple target decoration bars always maintain a consistent front-to-back display relationship with the multiple target tasks. If the target decoration bar further includes multiple views, when adjusting the decoration bar hierarchical information, the hierarchical relationship of each view within the target decoration bar can be adjusted synchronously, thereby ensuring that the entire target decoration bar is displayed as a whole according to the adjusted hierarchy.
[0048] This implementation monitors the display layer changes of multiple target tasks and synchronously modifies the decoration layer information of multiple target decoration bars, ensuring that the display layer of the target decoration bar always remains consistent with the corresponding target task. This guarantees that while multiple target decoration bars are drawn uniformly in the same decoration bar canvas, they can still correctly reflect the front and back occlusion relationships between multiple target tasks, thus improving the correctness and consistency of decoration bar display in multi-task scenarios.
[0049] In one specific implementation, the target decorative bar corresponding to the target task is drawn based on the decorative bar information and the decorative bar canvas, including: classifying the elements to be drawn included in the target decorative bar according to the decorative bar information to obtain target category information; and drawing the target decorative bar in the decorative bar canvas according to the target category information.
[0050] In this embodiment, instead of directly drawing all content in the target decorative bar in the same way, the elements to be drawn in the target decorative bar are first classified according to the decorative bar information to obtain target category information. Then, the target decorative bar is drawn using the corresponding method based on the target category information. Here, the elements to be drawn refer to the various components that make up the target decorative bar, such as borders, outlines, title text, icons, buttons, and other decorative content that needs to be displayed. The target category information indicates the category to which the corresponding element to be drawn belongs; different categories correspond to different drawing methods.
[0051] Although the target decorative bar serves as a whole to decorate the window, the individual elements that make up the decorative bar vary in complexity, function, and display requirements. Not all elements are suitable for the same drawing method. Using a uniform drawing mechanism would force some simpler decorative elements with lower display requirements to go through the entire interface drawing process, hindering the full utilization of the advantages of different drawing methods. By categorizing the elements to be drawn and then drawing them separately based on the categorization results, different types of decorative elements can use drawing mechanisms that match their characteristics, thereby improving the overall rationality of the decorative bar's drawing process.
[0052] In one specific implementation, the elements to be drawn included in the target decorative bar are classified according to the decorative bar information to obtain target category information, including: determining whether the element to be drawn is a preset type element based on the decorative bar information; when the element to be drawn is not a preset type element, determining the target category information as the first category information; when the element to be drawn is a preset type element, determining whether the element to be drawn needs to interact with the user based on the decorative bar information; when the element to be drawn needs to interact with the user, determining the target category information as the first category information; when the element to be drawn does not need to interact with the user, determining the target category information as the second category information.
[0053] In this embodiment, to employ different drawing mechanisms for elements with different characteristics, the elements can be divided into two categories: a first category and a second category. The first category mainly includes elements with complex structures or those requiring user interaction; the second category mainly includes elements with simple structures that do not require user interaction. After this classification, appropriate drawing methods can be applied to different categories of elements, thus balancing the functional requirements of complex decorative content with the drawing efficiency of simple decorative content.
[0054] Specifically, the system first determines whether the element to be drawn belongs to a preset type element based on the decoration information. Preset type elements can be understood as a category of decorative elements predefined by the system. These elements are characterized by relatively simple structures and fixed drawing rules, such as geometric decorations like window outlines and borders. If the element to be drawn does not belong to a preset type element, the target category information is directly determined as the first category. If the element to be drawn belongs to a preset type element, the system further determines whether the element needs to interact with the user, i.e., whether the element needs to respond to user input operations, such as clicks, drags, or other touch operations. When the element needs to respond to user operations, even if it belongs to a preset type element, the target category information is still determined as the first category; only when the element belongs to a preset type element and does not need to interact with the user is the target category information determined as the second category.
[0055] For elements with relatively simple structures but requiring interactive functionality, they not only need to display graphics but also participate in user event responses. Therefore, a drawing mechanism that supports interactive functionality is still necessary. Conversely, for decorative elements that are of a preset type and do not require user interaction, their main function is only to complete static display and do not involve event handling. Therefore, a more direct drawing method can be used.
[0056] In one specific implementation, the target decorative bar is drawn in the decorative bar canvas according to the target category information, including: if the target category information is the first category information, the view corresponding to the element to be drawn is drawn in the decorative bar canvas to obtain the target decorative bar.
[0057] In this embodiment, after classifying the elements to be drawn, when the target category information is the first category information, the view corresponding to the element to be drawn can be drawn in the decoration banner canvas to obtain the target decoration banner. Here, the view corresponds to the View in the Android system and is the basic display unit that constitutes the application interface, used to describe various display contents and corresponding interaction logic in the interface. For the first category of elements, since they are either non-preset type elements or, although they are preset type elements, they need to respond to user interactions, the system completes the display of this type of element by creating a corresponding view. The view is not only responsible for drawing the corresponding graphic content, but also for layout management, state management, and user event response functions, which can meet the display needs of complex decorative elements or interactive decorative elements.
[0058] In another embodiment, when the target category information is the second category information, the corresponding element to be drawn is directly drawn during the subsequent layer composition by SurfaceFlinger. For the second category element, since this type of element belongs to a preset type and does not need to respond to user interaction, there is no need to build a corresponding view; the corresponding display content is directly generated during the layer composition stage.
[0059] By employing different drawing mechanisms for different types of elements, complex decorative elements can gain full interface capability support, while simple decorative elements that do not require interaction have reduced unnecessary view creation and management processes. This makes the entire drawing process of the decoration bar more in line with the functional characteristics of different elements and improves the utilization efficiency of system display resources.
[0060] In one specific implementation, displaying a target task based on a target decorative bar includes: obtaining the task canvas corresponding to the target task to be displayed; and combining the task canvas and the decorative bar canvas with the target decorative bar drawn on it to display the target task, wherein the display level of the decorative bar canvas is higher than that of the task canvas.
[0061] In this embodiment, the task canvas refers to the Surface containing the application interface content corresponding to the target task. It is used to carry the application's own interface content, such as the business interface, images, text, buttons, etc., in the application window. Display hierarchy refers to the front-to-back arrangement of multiple canvases when participating in the final graphic composition. It determines which canvas is displayed on top and which is displayed on the bottom when multiple canvases overlap. The higher the display hierarchy, the closer the corresponding canvas is to the user, and the displayed content will cover the corresponding area of the canvas with the lower display hierarchy; the lower the display hierarchy, the more likely it is to be displayed after other canvases.
[0062] The system can composite the task canvas with the already drawn target decorative panel canvas, and display them according to a pre-defined display hierarchy, where the decorative panel canvas has a higher display hierarchy than the task canvas. By setting the decorative panel canvas to a higher display hierarchy than the task canvas, the decorative panel is always displayed above all task content.
[0063] Combination Figure 4 This implementation method can be further understood. Figure 4 This illustrates the hierarchical relationship of multiple canvases participating in the final display. The top layer is the decoration panel canvas, followed by Task 1 canvas, Task 2 canvas, Task 3 canvas, and the bottom layer is the system's underlying display canvas. Figure 4As can be seen, regardless of the arrangement of the Task 1, Task 2, or Task 3 canvases, they are all located below the decoration bar canvas, meaning the decoration bar canvas always maintains the highest display layer. In other words, the decoration bars corresponding to each task are drawn on the topmost decoration bar canvas, while the application's own interface content is still drawn on its respective task canvas. When SurfaceFlinger performs a unified layer composition on all canvases, it first composites the lower-level task canvases, then composites the highest-level decoration bar canvas, thus ensuring that the decoration bar ultimately covers and displays on all task canvases.
[0064] As one specific embodiment, such as Figure 5 As shown, when the system detects that multiple application tasks have entered a multi-window display state, it first determines whether the decorative content corresponding to the target task meets preset conditions. If the decorative content meets the preset conditions, the corresponding decorative content is drawn directly during layer compositing in the SurfaceFlinger service; if the decorative content does not meet the preset conditions, the content of the corresponding view in the decorative bar canvas is updated, and the hierarchy of each view is updated according to the hierarchical relationship between tasks, and then the decorative bar canvas is redrawn. When the hierarchical relationship of tasks changes, the hierarchical relationship of the corresponding view in the decorative bar canvas is adjusted synchronously, and the decorative bar canvas is redrawn. Finally, the SurfaceFlinger service performs layer compositing on each task canvas and the decorative bar canvas, and outputs the composited display to the display device, achieving unified drawing and correct display of decorative bars for multiple tasks.
[0065] To better implement the display method in the embodiments of this application, a display device is also provided in the embodiments of this application, such as... Figure 6 As shown, the display device 600 includes: The acquisition module 610 is used to acquire the decoration bar information of the target task to be displayed; Create module 620 to create the system-level decorative panel canvas; The drawing module 630 is used to draw the target decoration bar corresponding to the target task based on the decoration bar information and the decoration bar canvas. Display module 640 is used to display the target task based on the target decoration bar.
[0066] In this embodiment, the decorative bar information of the target task is obtained, and a system-level decorative bar canvas is created. Then, the target decorative bar corresponding to the target task is drawn based on the decorative bar canvas, and the target task is displayed based on the target decorative bar. Since the decorative bar is drawn in the system-level decorative bar canvas, rather than in the child node canvas corresponding to the target task, the display range of the decorative bar is no longer constrained by the geometric range of the target task. This allows the decorative bar to be laid out and displayed within a larger display range according to display requirements, thereby reducing the possibility of the decorative bar obscuring the display area of the target task content, improving the display integrity of the task interface, and enhancing the flexibility of the decorative bar layout.
[0067] In some embodiments of this application, there are multiple target tasks and multiple target decorative bars, and the multiple target tasks correspond one-to-one with the multiple target decorative bars; The drawing module 630 draws the target decorative bar corresponding to the target task based on the decorative bar information and the decorative bar canvas, including: In the decoration canvas, draw the corresponding multiple target decorations based on the decoration information of each target task.
[0068] In some embodiments of this application, the display device 600 is further configured to: Obtain information on changes in the display hierarchy of multiple target tasks; In the decoration panel canvas, based on the display hierarchy change information, modify the decoration panel hierarchy information of multiple target decoration panels, and display multiple target decoration panels based on the modified decoration panel hierarchy information.
[0069] In some embodiments of this application, the drawing module 630 draws the target decorative bar corresponding to the target task based on the decorative bar information and the decorative bar canvas, including: Based on the decoration information, the elements to be drawn in the target decoration are classified to obtain the target category information; Draw the target decoration bar in the decoration bar canvas based on the target category information.
[0070] In some embodiments of this application, the drawing module 630 classifies the elements to be drawn included in the target decorative bar according to the decorative bar information to obtain target category information, including: Based on the information in the decoration bar, determine whether the element to be drawn is a preset type element; When the element to be drawn is not a preset type element, the target category information is determined to be the first category information; When the element to be drawn is a preset type element, determine whether the element needs to interact with the user based on the decoration bar information; if the element needs to interact with the user, determine the target category information as the first category information; if the element does not need to interact with the user, determine the target category information as the second category information.
[0071] In some embodiments of this application, the drawing module 630 draws the target decorative bar in the decorative bar canvas according to the target category information, including: If the target category information is the first category information, draw the view corresponding to the element to be drawn in the decoration bar canvas to obtain the target decoration bar.
[0072] In some embodiments of this application, the display module 640 displays the target task based on the target decorative bar, including: Get the task canvas corresponding to the target task to be displayed; The task canvas and the decorative canvas with the target decorative panel are combined to display the target task, where the decorative canvas has a higher display level than the task canvas.
[0073] This application embodiment also provides a terminal device that integrates any of the display devices provided in this application embodiment. The terminal device includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by a processor from the steps of the display method in any of the above-described display method embodiments.
[0074] This application also provides a terminal device that integrates any of the display devices provided in this application. For example... Figure 7 As shown, it illustrates a structural schematic diagram of the terminal device involved in the embodiments of this application. Specifically: The terminal device may include components such as a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will understand that... Figure 7 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 701 is the control center of the terminal device. It connects various parts of the terminal device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 702, and by calling data stored in the memory 702, it performs various functions and processes data of the terminal device, thereby providing overall monitoring of the terminal device. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 701.
[0075] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0076] The terminal device also includes a power supply 703 that supplies power to the various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 703 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0077] The terminal device may also include an input unit 704, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0078] Although not shown, the terminal device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 701 in the terminal device loads the executable files corresponding to the processes of one or more applications into the memory 702 according to the following instructions, and the processor 701 runs the applications stored in the memory 702 to realize various functions, as follows: Retrieve the decoration bar information for the target task to be displayed; Create a system-level decorative panel canvas; Based on the decoration bar information and the decoration bar canvas, draw the target decoration bar corresponding to the target task; Display the target task based on the target decoration bar.
[0079] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0080] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the display methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps: Retrieve the decoration bar information for the target task to be displayed; Create a system-level decorative panel canvas; Based on the decoration bar information and the decoration bar canvas, draw the target decoration bar corresponding to the target task; Display the target task based on the target decoration bar.
[0081] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.
[0082] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.
[0083] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0084] The above provides a detailed description of a display method, apparatus, terminal device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A display method, characterized in that, include: Retrieve the decoration bar information for the target task to be displayed; Create a system-level decorative panel canvas; Based on the decorative bar information and the decorative bar canvas, draw the target decorative bar corresponding to the target task; The target task is displayed based on the target decorative bar.
2. The display method according to claim 1, characterized in that, The target tasks include multiple targets, and the target decorative bars include multiple targets, with each target task corresponding to one target decorative bar. The step of drawing the target decorative bar corresponding to the target task based on the decorative bar information and the decorative bar canvas includes: In the decoration panel canvas, multiple corresponding target decoration panels are drawn according to the decoration panel information of each of the multiple target tasks.
3. The display method according to claim 2, characterized in that, Also includes: Obtain display hierarchy change information for multiple target tasks; In the decorative panel canvas, the decorative panel hierarchy information of multiple target decorative panels is modified according to the display hierarchy change information, and multiple target decorative panels are displayed based on the modified decorative panel hierarchy information.
4. The display method according to claim 1, characterized in that, The step of drawing the target decorative bar corresponding to the target task based on the decorative bar information and the decorative bar canvas includes: The elements to be drawn in the target decoration bar are classified according to the decoration bar information to obtain target category information; Based on the target category information, draw the target decorative bar in the decorative bar canvas.
5. The display method according to claim 4, characterized in that, The step of classifying the elements to be drawn in the target decoration bar according to the decoration bar information to obtain target category information includes: Based on the decoration bar information, determine whether the element to be drawn is a preset type element; When the element to be drawn is not the preset type element, the target category information is determined to be the first category information; When the element to be drawn is the preset type element, it is determined whether the element to be drawn needs to interact with the user based on the decoration bar information; if the element to be drawn needs to interact with the user, the target category information is determined to be the first category information; if the element to be drawn does not need to interact with the user, the target category information is determined to be the second category information.
6. The display method according to claim 5, characterized in that, The step of drawing the target decorative bar in the decorative bar canvas according to the target category information includes: If the target category information is the first category information, draw the view corresponding to the element to be drawn in the decoration bar canvas to obtain the target decoration bar.
7. The display method according to claim 1, characterized in that, The step of displaying the target task based on the target decorative bar includes: Obtain the task canvas corresponding to the target task to be displayed; The task canvas and the decorative panel canvas with the target decorative panel drawn on them are combined to display the target task, wherein the display level of the decorative panel canvas is higher than that of the task canvas.
8. A display device, characterized in that, include: The acquisition module is used to acquire the decoration bar information of the target task to be displayed; Create a module for creating system-level decorative canvases; The drawing module is used to draw the target decoration bar corresponding to the target task based on the decoration bar information and the decoration bar canvas. The display module is used to display the target task based on the target decorative bar.
9. A terminal device, characterized in that, The terminal device includes: one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the display method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to perform the steps of the display method according to any one of claims 1 to 7.