Interface display methods, devices, electronic devices, storage media and products
By allocating target storage space for a first application and a second application in an electronic device, the second application draws and stores the view, and the first application obtains and displays the view, the device overhead and convenience issues caused by frequent application switching are resolved, and convenient view display and resource isolation are achieved.
Patent Information
- Application Number
- CN202510639278.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-11-17
AI Technical Summary
Frequent application switching increases the overhead of electronic devices and affects the ease of use of applications.
In an electronic device, a target storage space is allocated that can be accessed by both the first and second applications. The second application draws and stores the view in this space, and the first application retrieves and displays the view from this space, thereby reducing its own drawing burden and improving resource isolation.
It improves the ease of use of the application, reduces the view rendering pressure of the first application, enhances the resource isolation between the first and second applications, and reduces the probability of information leakage or tampering.
Smart Images

Figure CN123114598A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electronic technology, and in particular to an interface display method, apparatus, electronic device, storage medium, and product. Background Technology
[0002] As the number of applications installed on electronic devices continues to increase, the probability of users using multiple applications simultaneously is also rising. Therefore, when users need to use multiple applications at the same time, they need to switch between the application interfaces to operate them. However, frequent application switching not only increases the overhead of electronic devices but also affects the ease of use of the applications. Summary of the Invention
[0003] To overcome the problems existing in the related technologies, this disclosure provides an interface display method, apparatus, electronic device storage medium and product, which can reduce the view drawing pressure of the first application.
[0004] According to a first aspect of the present disclosure, a method for displaying an interface is provided. The method includes: allocating a target storage space accessible to both a first application and at least one second application; wherein the target storage space is used to store at least one first view, the first view being drawn by at least one second application, and the second application and the first application being different applications on the same electronic device; obtaining at least one first view from the target storage space; and synthesizing and displaying the application interface of the first application based on the at least one first view through the first application.
[0005] In this embodiment, firstly, the first application can display the first view without drawing it itself, reducing the view drawing burden on the first application. Secondly, the second application can display the first view on the application interface of the first application by storing the drawn first view in the target storage space, without sending the view drawing information to the first application. This increases the resource isolation between the first and second applications, thereby reducing the probability of the second application's application information being leaked or tampered with. Finally, the method provided in this embodiment can transfer any type of view from the second application to the first application for display, expanding the display range of views from the second application by the first application.
[0006] In some embodiments, obtaining at least one first view from a target storage space includes: receiving a notification message sent by at least one second application based on a first application, wherein the notification message is sent by at least one second application after storing at least one first view in the target storage space; and obtaining at least one first view from the target storage space based on the first application in response to receiving the notification message.
[0007] In this embodiment of the disclosure, after the second application stores the drawn first view to the target storage space, it sends a notification message to the first application. This allows the first application to obtain the first view in a timely manner, thereby shortening the rendering time of the application interface including the first view.
[0008] In some embodiments, based on at least one first view, composing and displaying an application interface of a first application through a first application includes: determining the target position of each of the at least one first view on the application interface; adding each first view to the corresponding target position based on the first application; and displaying an application interface including at least one first view.
[0009] In some embodiments, adding each first view to a corresponding target location based on a first application includes: determining a target layer corresponding to each first view from multiple layers, wherein the multiple layers are layers included in the application interface of the first application; and adding each first view to the corresponding target layer based on the first application.
[0010] In some embodiments, the method further includes: in response to detecting a triggering operation for a second view, obtaining a first instruction corresponding to the triggering operation, wherein the second view is a view triggered by the triggering operation in at least one first view; sending the first instruction to a target second application to which the second view belongs based on a first application, the first instruction being used by the target second application to draw a third view corresponding to the first instruction; obtaining the third view from a target storage space based on the first application; and composing and displaying the application interface of the first application based on the third view.
[0011] In this embodiment of the disclosure, when the first application needs to update the first view based on the user's trigger operation, it can send the first instruction corresponding to the trigger operation to the corresponding second application to instruct the second application to draw a new view, without having to draw a new view itself. This can further reduce the drawing pressure on the first application and improve the update efficiency of the application interface.
[0012] In some embodiments, there are multiple second applications; each of the multiple second applications corresponds to a different target storage space.
[0013] In this embodiment of the disclosure, when there are multiple second applications, allocating an independent target storage space for each second application can improve resource isolation between multiple second applications.
[0014] According to a second aspect of the present disclosure, an interface display device is provided, the device comprising: an allocation module configured to allocate a target storage space accessible to both a first application and at least one second application; wherein the target storage space is used to store at least one first view, the first view being drawn by at least one second application, and the second application and the first application being different applications on the same electronic device; a first acquisition module configured to acquire at least one first view from the target storage space; and a first display module configured to synthesize and display the application interface of the first application based on the at least one first view through the first application.
[0015] In some embodiments, the first acquisition module is configured to: receive a notification message sent by at least one second application based on the first application, wherein the notification message is sent by at least one second application after storing at least one first view in the target storage space; and in response to receiving the notification message, acquire at least one first view from the target storage space based on the first application.
[0016] In some embodiments, the first display module is configured to: determine the target position of each of the at least one first views on the application interface; add each first view to the corresponding target position based on the first application; and display the application interface including at least one first view.
[0017] In some embodiments, the first display module is configured to: determine a target layer corresponding to each first view from multiple layers based on a first application, wherein the multiple layers are layers included in the application interface of the first application; and add each first view to the corresponding target layer based on the first application.
[0018] In some embodiments, the apparatus further includes: a second acquisition module configured to acquire a first instruction corresponding to the triggering operation in response to detecting a triggering operation on a second view, wherein the second view is a view triggered by the triggering operation in at least one first view; a sending module configured to send the first instruction to a target second application to which the second view belongs, based on a first application, wherein the first instruction is used by the target second application to draw a third view corresponding to the first instruction; a third acquisition module configured to acquire the third view from a target storage space based on the first application; and a second display module configured to synthesize and display the application interface of the first application based on the third view through the first application.
[0019] In some embodiments, there are multiple second applications; each of the multiple second applications corresponds to a different target storage space.
[0020] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing computer programs or instructions; wherein the processor executes the computer programs or instructions to implement the steps of the method described above.
[0021] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which stores executable instructions or a computer program that, when executed by a processor, implements the steps of the method described above.
[0022] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the steps of the method described above.
[0023] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0024] In this disclosure, a target storage space accessible to both a first application and a second application is allocated within the electronic device. Based on this, when the second application needs to display a first view from the first application through the first application's interface, it can draw the first view and store it in the target storage space. The first application can then retrieve the first view from the target storage space and display it on its own interface. This offers several advantages: First, users can operate on the views of both the first and second applications directly within the first application's interface without switching between them, increasing ease of use. Second, since the first application can directly retrieve the second application's first view from the target storage space without drawing it itself, the view drawing burden on the first application is reduced. Finally, the second application can display the first view on the first application's interface simply by storing the drawn first view in the target storage space, without sending the view drawing information to the first application. This increases resource isolation between the first and second applications, thereby reducing the probability of the second application's application information being leaked or tampered with.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0027] Figure 1 This is a flowchart illustrating a cross-application view display method in related technologies.
[0028] Figure 2 This is a flowchart illustrating an interface display method according to an exemplary embodiment.
[0029] Figure 3 This is a flowchart illustrating an interface display method according to another exemplary embodiment.
[0030] Figure 4 This is a block diagram illustrating an interface display device according to an exemplary embodiment.
[0031] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0033] As the number of applications installed on electronic devices continues to increase, the probability of users using multiple applications simultaneously is also rising. Therefore, when users need to use multiple applications at the same time, they need to switch between the application interfaces to operate them. However, frequent application switching not only increases the overhead of electronic devices but also affects the ease of use of the applications.
[0034] Currently, it's possible to draw views from multiple applications within a single application, allowing the view library to display multiple application views on a single application's interface. This enables users to interact with multiple application views within a single application interface. However, the need to draw multiple application views places a significant burden on the application that draws the views.
[0035] refer to Figure 1 , Figure 1 This is a flowchart illustrating a cross-application view display method in related technologies. For example... Figure 1 As shown, the method includes:
[0036] In step 101, if application A needs to display application A's remote views through application B's application interface, application A can send the serialized view drawing information (the drawing information of remote views) to application B via inter-process communication (IPC).
[0037] In step 102, application B deserializes the received view drawing information and draws the corresponding RemoteViews.
[0038] In step 103, application A serializes the commands (actions) related to RemoteViews and sends them to application B.
[0039] In step 104, application B deserializes the received serialized instructions to obtain instructions related to RemoteViews and executes those instructions.
[0040] In step 105, if application B detects a trigger operation on the remote view, it sends the second instruction corresponding to the trigger operation to application A for processing.
[0041] The aforementioned technical solutions have the following problems: 1. Since application A uses an IPC method with encapsulated instructions to send view drawing information and instructions to application B, the view content corresponding to the view drawing information that application A can send to B is limited. 2. The drawing of the first view needs to be performed by application B, which increases the load on application B when there are many applications A or a large number of first views. 3. Since application B can obtain the view drawing information and instructions from application A, the isolation between application B and application A is reduced.
[0042] To address the aforementioned problems, this disclosure provides an interface display method. This method can be executed by an electronic device. Exemplarily, the electronic device executing the interface display method provided in this disclosure can be a mobile terminal with a screen or a fixed terminal. The mobile terminal can include smartphones, tablets, laptops, digital cameras, and wearable electronic devices, etc. The fixed terminal can include desktop computers, all-in-one computers, etc.
[0043] refer to Figure 2 , Figure 2 This is a flowchart illustrating an interface display method according to an exemplary embodiment. In the following text, an electronic device will be used as the execution subject, with reference to... Figure 2 The steps shown illustrate the interface display method provided in this disclosure embodiment. This interface display method mainly includes the following steps:
[0044] In step 201, a target storage space that can be accessed by both the first application and at least one second application is allocated.
[0045] In some embodiments, the target storage space is used to store at least one first view, which is drawn by at least one second application.
[0046] Understandably, an electronic device can allocate a target storage space, which can be a storage space accessible to both a first application and at least one second application. Based on this, if any of the at least one second application needs to display a first view from the second application through the application interface of the first application, it can draw the first view and store the drawn first view in the target storage space, so that the target storage space can store at least one first view.
[0047] In some embodiments, both the first application and the second application can be an application (APP), a mini-program, etc.
[0048] In some embodiments, at least one second application is a different application from the first application on an electronic device.
[0049] In some embodiments, the first application can be any application installed on the electronic device, and this disclosure does not limit this.
[0050] In some embodiments, the second application can be any one or more applications other than the first application installed on the electronic device.
[0051] For example, both the first application and the second application can be system applications, desktop applications, web applications, mobile applications, etc.
[0052] In some embodiments, the target storage space can be a storage space accessible to system-level hardware.
[0053] For example, the target storage space may include, but is not limited to, a direct memory access buffer (DMAbuf), a graphics processing unit buffer (GPU buffer), etc.
[0054] In some embodiments, the first view may be any view included in the application interface of the first application.
[0055] For example, the first view can be RemoteViews.
[0056] For example, the first view includes, but is not limited to: text view (TextView), control (Button) view, image view (ImageView), etc.
[0057] In some embodiments, the target storage space may be allocated by a first application or by a second application, and this disclosure does not limit this.
[0058] For example, either the first application or the second application can request the target storage space through the Direct Memory Access Application Programming Interface (DMA API).
[0059] In some embodiments, the timing of the first application requesting the target storage space and the timing of the second application requesting the target storage space can be determined as needed, and this disclosure does not limit this.
[0060] For example, when the first application requests the allocation of target storage space, the first application may request the allocation of target storage space before each application interface including the first view is generated, and release the target storage space after obtaining the first view.
[0061] For example, when the first application requests the allocation of target storage space, the first application can request the allocation of target storage space after each start of the application process of the first application, and release the target storage space when the application process of the first application ends.
[0062] For example, when a second application requests the allocation of target storage space, the second application may request the allocation of target storage space after completing the drawing of the first view.
[0063] In some embodiments, the second application may apply for a storage space for each first view to store that first view, or it may apply for a target storage space to store all the first views drawn by the second application. This disclosure does not limit this.
[0064] In some embodiments, if the target storage space is allocated by a first application, the first application may send a third instruction to a second application that has the first view if it needs to display an application interface including the first view. The third instruction instructs the second application to draw the first view. Based on this, after receiving the third instruction, the second application can draw the first view and store it in the target storage space.
[0065] In some embodiments, the third instruction may carry access information for the target storage space. Based on this, the second application can access the target storage space based on the access information carried in the third instruction to store the drawn first view in the target storage space.
[0066] In some embodiments, access information includes, but is not limited to, access path, access permissions, etc.
[0067] In step 202, at least one first view is obtained from the target storage space.
[0068] Understandably, before displaying the application interface, the first application can retrieve at least one first view of the second application stored in the target storage space.
[0069] In some embodiments, before each display of the application interface, the first application may query the target storage space to see if a first view to be displayed through the application interface of the first application is stored. If the target storage space contains a first view to be displayed through the application interface of the first application, the first application can retrieve the first view from the target storage space.
[0070] In step 203, based on at least one first view, the application interface of the first application is synthesized and displayed through the first application.
[0071] Understandably, after obtaining at least one first view through the first application, the electronic device can also use the first application to draw and display the application interface of the first application based on the obtained first view. At this time, the application interface of the first application displayed by the electronic device includes the first view of the second application.
[0072] In some embodiments, the first view may be displayed on the application interface of the first application in any form, and this disclosure does not limit this.
[0073] For example, the first view may be displayed on the application interface of the first application in at least one of the following forms: the first view is displayed on the application interface of the first application as a floating window; the first view is displayed on the application interface of the first application as a pop-up window; the first view is displayed on the application interface of the first application as a widget; or the first view is displayed on the notification bar of the application interface of the first application.
[0074] It should be noted that when there are multiple first views, the display forms of different first views in the application interface of the first application can be the same or different, and this embodiment does not limit this.
[0075] In some embodiments, after completing the drawing of the application interface including the first view, the first application can send the drawn application interface to the SurfaceFlinger so that the SurfaceFlinger can display the application interface of the first application on the screen of the electronic device.
[0076] In this embodiment, a target storage space accessible to both the first and second applications is allocated within the electronic device. Based on this, when the second application needs to display a first view from the first application through its application interface, it can draw the first view and store it in the target storage space. The first application can then retrieve the first view from the target storage space and display it on its application interface. This provides several advantages: First, users can operate on the views of both the first and second applications directly from the first application's interface without switching between them, increasing ease of use. Second, since the first application can directly retrieve the first view from the target storage space without drawing it itself, the view drawing burden on the first application is reduced. Third, the second application can display the first view on its application interface simply by storing the drawn first view in the target storage space, without sending the view drawing information to the first application, increasing resource isolation between the two applications and reducing the probability of the second application's application information being leaked or tampered with. Finally, the method provided in this disclosure embodiment can transfer any type of view from the second application to the first application for display, thereby expanding the display range of views from the second application to the first application.
[0077] In some embodiments, step 202 includes: receiving a notification message sent by at least one second application based on the first application, wherein the notification message is sent by at least one second application after storing a first view in a target storage space; and in response to receiving the notification message, retrieving at least one first view from the target storage space based on the first application.
[0078] Understandably, after drawing the first view, any of the at least two second applications can store the drawn first view in the target storage space. Then, the second application that drew the first view can send a notification message to the first application. Correspondingly, the first application can receive the notification message sent by the second application. Afterwards, the first application can retrieve the first view drawn by the second application from the target storage space.
[0079] In some embodiments, the notification message may carry access information for the target storage space. Based on this, the first application can access the target storage space based on the access information carried in the notification message to obtain a first view from the target storage space.
[0080] In some embodiments, the second application may send the notification message to the first application in any feasible manner, and this disclosure does not limit this.
[0081] For example, the second application can send a notification message to the first application via inter-process communication.
[0082] For example, the second application can send notification messages to the first application based on the binder mechanism.
[0083] In this embodiment of the disclosure, after the second application stores the drawn first view to the target storage space, it sends a notification message to the first application. This allows the first application to obtain the first view in a timely manner, thereby shortening the rendering time of the application interface including the first view.
[0084] In some embodiments, step 203 includes: determining the target position of each of the at least one first view on the application interface; adding each first view to the corresponding target position based on the first application; and displaying the application interface including at least one first view.
[0085] Understandably, after obtaining at least one first view from the target storage space, the first application can determine the position of each of the at least one first view on the application interface to be displayed by the first application, and use the determined position as the target position corresponding to each first view. Then, the first application can draw each first view to the corresponding target position on the application interface to obtain an application interface including at least one first view. Subsequently, the electronic device can display the application interface including at least one first view.
[0086] In some embodiments, the electronic device may store position information of each view that makes up the application interface of the first application. Based on this, after obtaining the first view, the first application can obtain the position information corresponding to each first view on the application interface and add each first view to the target position indicated by the corresponding position information.
[0087] In some embodiments, adding each first view to a corresponding target location based on a first application includes: determining a target layer corresponding to each first view from multiple layers, wherein the multiple layers are layers included in the application interface of the first application; and adding each first view to the corresponding target layer based on the first application.
[0088] Understandably, the application interface displayed on an electronic device is composed of overlaid layers, with different views drawn on different layers. Therefore, after retrieving the first view from the target storage space, the first application can determine the layer corresponding to each first view from the layers included in the application interface to be displayed by the first application, and use the layer corresponding to each first view as the target layer for that first view. Then, the first application can add each first view to its corresponding target layer to obtain the application interface including the first views.
[0089] In some embodiments, after the electronic device adds all views of the application interface to be displayed to the corresponding layers through the first application, it can composite the layers through the first application to obtain an application interface including the first view. Then, the electronic device can send the application interface to be displayed to SurfaceFlinger through the first application, so that SurfaceFlinger can display the application interface including the first view on the screen.
[0090] In some embodiments, the first application may determine the target layer corresponding to each first view from among the multiple layers included in the application interface to be displayed, based on the position of each first view on the application interface to be displayed and the position of each layer on the application interface to be displayed.
[0091] In some embodiments, the method further includes: in response to detecting a triggering operation for a second view, obtaining a first instruction corresponding to the triggering operation, wherein the second view is a view triggered by the triggering operation in at least one first view; sending the first instruction to a target second application to which the second view belongs based on the first application, the first instruction being used by the target second application to draw a third view corresponding to the first instruction; obtaining the third view from a target storage space based on the first application; and composing and displaying the application interface of the first application based on the third view.
[0092] Understandably, when an electronic device's current display interface is an application interface including at least one first view, if it detects a user's trigger operation on a second view within the first view, it can obtain the instruction corresponding to that trigger operation and use the obtained instruction as a first instruction. The electronic device can then send the first instruction to the second application to which the second view belongs, via the first application. For ease of explanation, the second application to which the second view belongs will be referred to as the target second application in the following text. After receiving the first instruction, the target second application can draw a third view based on the first instruction and store the drawn third view in the target storage space. Based on this, the first application can retrieve the third view from the target storage space and draw an application interface including the third view. The electronic device can then display the application interface including the third view.
[0093] In some embodiments, the second view can be any one or more first views.
[0094] In some embodiments, after the second application stores the third view in the target storage space, it can send a notification message to the first application again. Based on this, the first application can retrieve the third view from the target storage space.
[0095] In some embodiments, if the target storage space for storing the third view is different from the target storage space for storing the first view, the target second application may carry access information for accessing the target storage space storing the third view in the notification message it sends, so that the first application can obtain the third view from the target storage space based on the access information carried in the notification message.
[0096] In some embodiments, if the target storage space for storing the third view is the same as the target storage space for storing the first view, the target second application may access the information in the sent notification message or may not carry the access information. This disclosure does not limit this.
[0097] It should be noted that the process of the first application drawing the application interface including the third view can refer to the process of the first application drawing the application interface including the first view, and this disclosure embodiment does not limit it.
[0098] In addition, the application interface including the first view and the application interface including the third view can be different application interfaces of the first application.
[0099] For example, assume the first application is a system application and the second application is a media application. Based on this, if the media application's playback sub-interface is displayed as a floating window in the system application's interface, and media resources are being played, and the system application detects a user's trigger operation on the playback control, it can determine that the first instruction corresponding to this trigger operation is to stop playing the media resources. Based on this, the system application can send the first instruction to the media application. Correspondingly, the media application can receive the first instruction. Since if a user's trigger operation on the playback control is detected during media resource playback, the playback control needs to be updated to a pause control. Therefore, after receiving the first instruction, the media application can draw a pause control view and store the drawn pause control view in the target storage space. In this way, the system application can retrieve the pause control view from the target storage space and draw an application interface including the pause control view. Based on this, the electronic device can update the currently displayed application interface (the system application's application interface) to an application interface including the pause control view, thereby updating the playback control on the playback sub-interface to a pause control.
[0100] In this embodiment of the disclosure, when the first application needs to update the first view based on the user's trigger operation, it can send the first instruction corresponding to the trigger operation to the corresponding second application to instruct the second application to draw a new view, without having to draw a new view itself. This can further reduce the drawing pressure on the first application and improve the update efficiency of the application interface.
[0101] In some embodiments, there are multiple second applications. Each of the multiple second applications corresponds to a different target storage space.
[0102] Understandably, the second application can be multiple applications installed on the electronic device. Based on this, the target storage space on the electronic device can include a target storage space corresponding to each second application. Thus, each second application can store at least one first view it draws into its corresponding target storage space.
[0103] In some embodiments, for each of the multiple second applications, if the second application needs to store the drawn first view or third view to the target storage space, it can request the allocation of a target storage space. In this way, each second application can obtain its own corresponding target storage space.
[0104] In some embodiments, when a first application needs to display a first view or a third view of multiple second applications through an application interface, it can apply to allocate a target storage space for each of the multiple second applications to obtain a target storage space corresponding to each second application.
[0105] In this embodiment of the disclosure, when there are multiple second applications, allocating an independent target storage space for each second application can improve resource isolation between multiple second applications.
[0106] The interface display method provided in the above embodiments will be further described below with a specific example.
[0107] If a view (the first view) in the second application needs to be displayed through the application interface of the first application, the main content of the first view is drawn on the original first application, and after drawing is completed, it is transferred to the first application via IPC through the graphics buffer. The application process of the first application then draws the first view to the appropriate position.
[0108] This disclosure supports the transmission of any user interface (UI) content. Examples include basic UI content, vector images, fonts, and hardware-accelerated rendering content (videos, games, etc.). Furthermore, this disclosure uses an IPC mechanism on a binder or other system to transmit attributes and events, driving the redrawing and updating of the first view.
[0109] For example, this embodiment of the disclosure uses system-level hardware-accessible memory (DMAbuf / GPUbuffer) to unify view drawing between the application processes of the first application and the application processes of the second application. The application process of the second application does not record instructions; instead, it directly draws the content of the first view onto the DMAbuf accessible to both processes. One application displaying content (the first application) corresponds to multiple applications providing views (the second applications). The view drawing of each second application does not interfere with each other; the first application uniformly fills the resulting content and displays it. In the system's drawing sequence, events and view attribute changes are transmitted via IPC. The application process of the first application directly fills the view drawn by the application process of the second application into the corresponding location in the drawing memory of the first application.
[0110] Figure 3 This is a flowchart illustrating an interface display method according to another exemplary embodiment. In the following, reference will be made to... Figure 3 The steps shown in the figure further illustrate the interface display method provided in the above embodiments. The method includes:
[0111] In step 301, the first application sends a third instruction to the second application to inform the second application that the first application needs the view in the second application.
[0112] In step 302, the second application draws the view based on the third instruction.
[0113] In step 303, the second application sends the drawn view to the first application based on the GPU buffer.
[0114] In step 304, the first application fills the view drawn by the second application into the corresponding position.
[0115] In step 305, in response to the first application detecting the trigger operation, a first instruction is sent to the second application to instruct the second application to draw a new view.
[0116] refer to Figure 4 , Figure 4 This is a block diagram illustrating an interface display device according to an exemplary embodiment. Figure 4As shown, the interface display device 400 includes: an allocation module 401 configured to allocate a target storage space accessible to both a first application and at least one second application; wherein the target storage space is used to store at least one first view, the first view being drawn by at least one second application, and the second application and the first application being different applications on the same electronic device; a first acquisition module 402 configured to acquire at least one first view from the target storage space; and a first display module 403 configured to synthesize and display the application interface of the first application based on at least one first view through the first application.
[0117] In some embodiments, the first acquisition module 402 is configured to: receive a notification message sent by at least one second application based on the first application, wherein the notification message is sent by at least one second application after storing at least one first view in the target storage space; and in response to receiving the notification message, acquire at least one first view from the target storage space based on the first application.
[0118] In some embodiments, the first display module 403 is configured to: determine the target position of each of the at least one first views on the application interface; add each first view to the corresponding target position based on the first application; and display the application interface including at least one first view.
[0119] In some embodiments, the first display module 403 is configured to: determine a target layer corresponding to each first view from multiple layers based on a first application, wherein the multiple layers are layers included in the application interface of the first application; and add each first view to the corresponding target layer based on the first application.
[0120] In some embodiments, the apparatus further includes: a second acquisition module configured to acquire a first instruction corresponding to the triggering operation in response to detecting a triggering operation on a second view, wherein the second view is a view triggered by the triggering operation in at least one first view; a sending module configured to send the first instruction to a target second application to which the second view belongs, based on a first application, wherein the first instruction is used by the target second application to draw a third view corresponding to the first instruction; a third acquisition module configured to acquire the third view from a target storage space based on the first application; and a second display module configured to synthesize and display the application interface of the first application based on the third view through the first application.
[0121] In some embodiments, there are multiple second applications; each of the multiple second applications corresponds to a different target storage space.
[0122] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0123] Figure 5 This is a structural block diagram illustrating an electronic device 500 according to an exemplary embodiment. For example, the electronic device 500 may be a mobile phone, tablet computer, smartwatch, vehicle-mounted device, or other communication device.
[0124] Reference Figure 5 The electronic device 500 may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, sensor component 514, and communication component 516.
[0125] Processing component 502 typically controls the overall operation of electronic device 500, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0126] Memory 504 is configured to store various types of data to support operation on electronic device 500. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 500, contact data, phonebook data, messages, pictures, and videos. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0127] Power supply component 506 provides power to various components of electronic device 500. Power supply component 506 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 500.
[0128] Multimedia component 508 includes a screen that provides an output interface between electronic device 500 and user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When electronic device 500 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0129] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when electronic device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0130] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0131] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of electronic device 500. For example, sensor assembly 514 may detect the on / off state of electronic device 500, the relative positioning of components such as the display and keypad of electronic device 500, changes in position of electronic device 500 or one of its components, the presence or absence of user contact with electronic device 500, orientation or acceleration / deceleration of electronic device 500, and temperature changes of electronic device 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0132] Communication component 516 is configured to facilitate wired or wireless communication between electronic device 500 and other devices. Electronic device 500 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0133] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.
[0134] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including executable instructions or a computer program, which can be executed by a processor 520 of an electronic device 500 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0135] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the interface display methods described in the embodiments of this disclosure. For example, the method includes:
[0136] Allocate a target storage space accessible to both a first application and at least one second application; wherein the target storage space is used to store at least one first view, the first view being drawn by at least one second application, the second application and the first application being different applications on the same electronic device; obtain at least one first view from the target storage space; and based on at least one first view, synthesize and display the application interface of the first application through the first application.
[0137] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the interface display methods described in this disclosure.
[0138] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0139] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for displaying an interface, characterized in that, The method includes: Allocate a target storage space that can be accessed by a first application and at least one second application; wherein the target storage space is used to store at least one first view, the first view being drawn by the at least one second application, and the second application and the first application being different applications on the same electronic device; Obtain the at least one first view from the target storage space; Based on the at least one first view, the application interface of the first application is synthesized and displayed through the first application.
2. The method according to claim 1, characterized in that, Obtaining the at least one first view from the target storage space includes: The first application receives a notification message sent by the at least one second application, wherein the notification message is sent by the at least one second application after storing the at least one first view in the target storage space; In response to receiving the notification message, the first application retrieves the at least one first view from the target storage space.
3. The method according to claim 1, characterized in that, The step of composing and displaying the application interface of the first application based on the at least one first view includes: Determine the target position of each of the at least one first view on the application interface; Based on the first application, each first view is added to the corresponding target location; Displays an application interface that includes at least one first view.
4. The method according to claim 3, characterized in that, The step of adding each first view to its corresponding target location based on the first application includes: Based on the first application, a target layer corresponding to each first view is determined from multiple layers, wherein the multiple layers are the layers included in the application interface of the first application; Based on the first application, each first view is added to the corresponding target layer.
5. The method according to claim 1, characterized in that, The method further includes: In response to detecting a trigger operation for a second view, a first instruction corresponding to the trigger operation is obtained, wherein the second view is a view among the at least one first view that is triggered by the trigger operation; Based on the first application, the first instruction is sent to the target second application to which the second view belongs, and the first instruction is used by the target second application to draw a third view corresponding to the first instruction; Based on the first application, the third view is obtained from the target storage space; Based on the third view, the application interface of the first application is synthesized and displayed through the first application.
6. The method according to any one of claims 1 to 5, characterized in that, There are multiple second applications; each of the multiple second applications corresponds to a different target storage space.
7. An interface display device, characterized in that, The device includes: The allocation module is configured to allocate a target storage space that can be accessed by a first application and at least one second application; wherein the target storage space is used to store at least one first view, the first view being drawn by the at least one second application, and the second application and the first application being different applications on the same electronic device; The first acquisition module is configured to acquire the at least one first view from the target storage space; The first display module is configured to synthesize and display the application interface of the first application based on the at least one first view.
8. The apparatus according to claim 7, characterized in that, The first acquisition module is configured as follows: The first application receives a notification message sent by the at least one second application, wherein the notification message is sent by the at least one second application after storing the at least one first view in the target storage space; In response to receiving the notification message, the first application retrieves the at least one first view from the target storage space.
9. The apparatus according to claim 7, characterized in that, The first display module is configured as follows: Determine the target position of each of the at least one first view on the application interface; Based on the first application, each first view is added to the corresponding target location; Displays an application interface that includes at least one first view.
10. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 6.
11. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.
