Display method and device and storage medium

By hiding the application icon window after the animation is over, the problem of icon ghosting when sliding up and returning to the desktop is solved, improving the smoothness and user experience of the animation.

CN119311164APending Publication Date: 2025-01-14HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310855520.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing slide-up returns to the end of the animation of the desktop. Users are prone to icon ghosting problems when sliding the screen, because closing the application icon window takes time, resulting in misalignment of the upper and lower icons.

Method used

After the animation is over, hide the application icon window by calling the hide interface of the window management module to avoid icon ghosting, and then close the icon window to complete the animation.

Benefits of technology

It effectively avoids the problem of icon ghosting and improves the visual fluency and user experience of the animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311164A_ABST
    Figure CN119311164A_ABST
Patent Text Reader

Abstract

The invention provides a display method and device and a storage medium, and relates to the technical field of terminals.The method comprises the steps that under the condition that an electronic device displays an interface of a first application, pressing and up-sliding operation of a user on the interface of the first application is received, and in response to the operation that the user lifts up a finger, the electronic device displays a first animation returning to a desktop, the first animation comprises a sinking animation of an icon window of the newly created first application. In this way, the electronic equipment can hide the icon window of the first application after the first animation is finished, and compared with window closing, the response time of window hiding is short. In the embodiment of the invention, if the user immediately slides the screen leftwards or rightwards after the first animation is finished, the view icon of the first application on the desktop moves along with the screen, and the icon window of the first application is hidden, so that the icon window of the first application and the view icon of the first application on the desktop can be prevented from being displayed in a misplaced manner, namely, icon ghosting can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a display method, device and storage medium. Background Art

[0002] With the continuous development of terminal technology, electronic devices such as mobile phones have more and more functions. For example, taking a mobile phone as an example, when the mobile phone displays the interface of an application, when it detects that the user intends to return to the desktop, the mobile phone can execute the dynamic effect scheme of sliding up to return to the desktop. The animation effect achieved is roughly as follows: the window of the application interface gradually shrinks, and after shrinking to a certain proportion, the icon of the application is created and displayed, and continues to shrink until the application icon is reduced to the same size as the icon of the application on the desktop, and falls back to the icon position of the application on the desktop. At the end of the animation, there is an application icon created during the animation process on the upper layer, and the original application icon on the desktop is on the lower layer. After the animation ends, it is necessary to control the closing of the application icon on the upper layer.

[0003] In the existing swipe up animation to return to the desktop, at the moment the animation ends, if it is detected that the user has swiped the screen (not swiping the entire screen, but only moving a short distance), since it takes time to close the application icon (ranging from 15 to 50ms), the upper application icon and the lower application icon will be misaligned. Visually, the user can perceive that there is an icon ghosting. Summary of the invention

[0004] The embodiments of the present application provide a display method, a device, and a storage medium. When the animation of returning to the desktop ends, if the user swipes left or right on the screen, no icon ghosting will occur.

[0005] In a first aspect, an embodiment of the present application provides a display method, which is applied to an electronic device, and the method includes: when a first application is running in the foreground, displaying the interface of the first application; receiving a user's pressing and swiping up operation on the interface of the first application, and in response to the user lifting up the finger, displaying a first animation between a first time point and a second time point; the second time point is later than the first time point; at the second time point, displaying a desktop interface, displaying an icon window of the first application on the desktop interface, and the view icon of the first application on the desktop interface is blocked by the icon window of the first application; after the second time point, calling a first interface of a window management module, the first interface being used to trigger hiding the icon window of the first application; after the second time point, displaying a second animation in response to the user's sliding operation in a first direction, the second animation being an animation of the view icon of the first application moving in the first direction; when the second animation is displayed, the icon window of the first application is hidden.

[0006] The first time point may be regarded as the time point when the user lifts his finger, and the first animation starts to be displayed at the first time point, and the first animation is an animation of returning to the desktop.

[0007] Among them, the second time point is the time point when the first animation ends. When the first animation ends, the desktop interface is displayed, and the view icon of the first application (that is, the icon of the first application originally on the desktop) is displayed on the desktop interface. The upper layer of the desktop interface also displays the icon window of the first application. The icon window of the first application is the same size and position as the view icon of the first application, and the icon window of the first application obscures (covers) the view icon of the first application.

[0008] The user's sliding operation in the first direction may be an operation of sliding the screen left, right, upward or downward, for example, Figure 5 The user swipes left on the screen.

[0009] After the second time point, that is, after the first animation ends, the electronic device will trigger the closing of the icon window of the first application. However, it takes a certain amount of time to close the icon window of the first application. Therefore, if the user slides the screen in the first direction before the icon window of the first application is closed, the icon window of the first application is still displayed in the original position, and the view icon of the first application below the icon window of the first application will move a short distance in the first direction, that is, the view icon of the first application will deviate from its original position, and the icon ghost will appear. In order to solve this problem, after the second time point, that is, after the first animation ends, the following steps are added: the electronic device triggers the hiding of the icon window of the first application by calling the first interface (hide interface), so that the icon window of the first application disappears immediately in the next frame. If the user slides the screen left or right after the first animation ends, the icon ghost will not appear because the icon window of the first application has been hidden.

[0010] In this embodiment, when the electronic device displays the interface of the first application, it receives an operation of pressing and swiping up on the interface of the first application by the user. In response to the operation of the user lifting his finger, the electronic device displays a first animation of returning to the desktop, and the first animation includes a sinking animation of the newly created icon window of the first application. The electronic device can hide the icon window of the first application after the first animation ends. Compared with closing the window, the response time of hiding the window is short. If the user swipes left or right on the screen immediately after the first animation ends, the view icon of the first application on the desktop moves accordingly. Since the icon window of the first application has been hidden, this can avoid the misalignment of the icon window of the first application and the view icon of the first application on the desktop, and can avoid the occurrence of icon ghosting.

[0011] In an optional embodiment of the first aspect, the display method further includes: after a second time point, calling a second interface of the window management module, the second interface being used to trigger closing of the icon window of the first application.

[0012] In one example, after the second time point, the electronic device calls the first interface of the window management module and calls the second interface (e.g., release interface) of the window management module at the same time. In this example, the electronic device can call the first interface and the second interface at the same time to trigger hiding and closing the icon window of the first application respectively.

[0013] In one example, after the second time point, the electronic device calls the first interface of the window management module and then calls the second interface of the window management module. In this example, the electronic device first calls the first interface and then calls the second interface, and accordingly, the icon window of the first application is first triggered to be hidden and then the icon window of the first application is triggered to be closed.

[0014] In some embodiments, closing the icon window of the first application may also be described as destroying the icon window of the first application.

[0015] In an optional embodiment of the first aspect, the display method also includes: at a third time point, hiding the icon window of the first application; the third time point is later than the second time point; at a fourth time point, closing the icon window of the first application; the fourth time point is later than the third time point.

[0016] Based on the two examples of the aforementioned embodiments, no matter whether the electronic device calls the first interface and the second interface at the same time, or calls the first interface first and then calls the second interface, the electronic device first hides the icon window of the first application and then closes the icon window of the first application. This is because hiding the icon window of the first application only requires the window management module of the electronic device to mark the icon window as invisible, so that the icon window of the first application disappears immediately in the next frame image, while closing the icon window of the first application requires the window management module to perform a large number of conditional judgments (such as traversing windows), and involves communication between the application layer and the framework layer, which takes a certain amount of time.

[0017] After the second time point, the electronic device first hides the icon window of the first application by calling the first interface, thereby avoiding the aforementioned icon ghosting problem. Subsequently, the electronic device closes the hidden icon window of the first application, and closing the icon window of the first application is a fallback step. After this step is completed, the animation effect of returning to the desktop ends.

[0018] In an optional embodiment of the first aspect, the display method also includes: at a first time point, creating an icon window of a first application, the icon window of the first application being located above the interface window of the first application; at the first time point, the icon window of the first application is the same size as the interface window of the first application, the icon window of the first application is the same position as the interface window of the first application, the transparency of the icon window of the first application is a first value, and the transparency of the interface window of the first application is a second value.

[0019] The first value is different from the second value. The larger the value of the window transparency, the more transparent (less clear) the window is; the smaller the value of the window transparency, the clearer the window is. Exemplarily, the first value is 100% and the second value is 0%; or, the first value is 100% and the second value is a value greater than 0% and less than 100%, such as 10%.

[0020] In this embodiment, since the icon of the first application on the desktop is a view icon, the view icon cannot perform an icon sinking animation, and only the icon in the form of a window can perform an icon sinking animation. Therefore, in this embodiment, when the user lifts his finger, an icon window of the first application is created to implement a sinking animation of the first application icon returning to the desktop.

[0021] In an optional embodiment of the first aspect, in each frame image of the first animation, the interface window of the first application and the icon window of the first application are the same size and position; in the first animation, the transparency of the interface window of the first application gradually increases, the transparency of the icon window of the first application gradually decreases, and the transparency of the desktop interface gradually decreases.

[0022] In this embodiment, the interface window of the first application and the icon window of the first application in the first animation are scaled down in the same proportion, that is, the positions and sizes of the two are the same in each frame of the first animation. During the first animation, the interface window of the first application becomes more and more transparent, the icon window of the first application becomes clearer and clearer, and the desktop interface becomes clearer and clearer. It is understandable that when the first animation ends, the desktop interface is displayed, the icon window of the first application is displayed on the upper layer of the desktop interface, and the interface window of the first application (with a transparency of 100%) is not displayed.

[0023] In an optional embodiment of the first aspect, the display method also includes: in response to the operation of the user lifting his finger, calling the thread of the desktop application, calculating the data of M frame images of the first animation, the data of each frame image in the M frame images includes parameters of the interface window of the first application, parameters of the icon window of the first application, and parameters of each element on the desktop interface, M is a positive integer; calling the thread of the desktop application to transfer the data of the M frame images to the layer synthesis module; calling the thread of the layer synthesis module to generate the first animation based on the data of the M frame images.

[0024] The parameters of the interface window of the first application include the position, size or zoom ratio, transparency, etc. of the interface window of the first application. The parameters of the icon window of the first application include the position, size or zoom ratio, transparency, etc. of the icon window of the first application. The parameters of each element on the desktop interface include the position, size or zoom ratio, transparency, etc. of each element on the desktop.

[0025] Among them, M is related to the refresh rate of the display and the preset animation duration.

[0026] In this embodiment, the thread of the desktop application calculates the animation frame data of the first animation at one time, and transmits the calculated animation frame data of the first animation to the layer synthesis module, so that the layer synthesis module generates the first animation, instead of calculating one frame of animation frame data and transmitting one frame of animation frame data. This helps to reduce the possibility that the thread of the desktop application cannot calculate the animation frame data due to excessive load during the animation process, resulting in animation frame loss or stuck.

[0027] In an optional embodiment of the first aspect, the thread of the layer synthesis module is called to generate a first animation based on the data of the M frame image, including: the thread of the layer synthesis module is called to obtain the interface content of the first application, the icon content of the first application, and the content of each element on the desktop interface from the buffer; the thread of the layer synthesis module is called to generate the first animation based on the data of the M frame image, the interface content of the first application, the icon content of the first application, and the content of each element on the desktop interface.

[0028] For example, refer to Figure 4 , the layer where the icon window of the first application is located is layer 1, the layer where the interface window of the first application is located is layer 2, the layer where the desktop interface is located is layer 3, layer 1 is above layer 2, and layer 2 is above layer 3. The layer synthesis module can merge the image data of the three layers of each frame to generate the first animation.

[0029] In this embodiment, the buffer of the electronic device stores the interface content of the first application, the icon content of the first application and the content of each element on the desktop interface. The layer synthesis module can obtain the content data to be displayed in the animation from the buffer, and combine it with the data of the M frame images to generate the first animation.

[0030] In an optional embodiment of the first aspect, the method further includes: in response to a press and slide-up operation, displaying a third animation; in the third animation, the interface window of the first application gradually shrinks; at a first time point, displaying the interface window of the first application that has been reduced to a first ratio.

[0031] In one example, a gradually clearer desktop interface is displayed below the interface window of the first application. In another example, a preset screen is displayed below the interface window of the first application, for example, the preset screen is a pure black screen.

[0032] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a memory and at least one processor; the memory is used to store computer program code, the computer program code comprises instructions; when the at least one processor executes the instructions, the electronic device executes a method as described in any one of the first aspects.

[0033] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by an electronic device, the method described in any one of the first aspects is implemented.

[0034] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, an electronic device executes any method as described in the first aspect.

[0035] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute any method as described in the first aspect.

[0036] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding optional embodiments are similar and will not be repeated herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of a mobile phone interface change provided in an embodiment of the present application;

[0038] Figure 2 A schematic diagram of a mobile phone interface change provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of an animation effect of returning to the desktop on a mobile phone interface provided in an embodiment of the present application;

[0040] Figure 4 A schematic diagram of a layer provided in an embodiment of the present application;

[0041] Figure 5 A schematic diagram of a mobile phone interface change provided in an embodiment of the present application;

[0042] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0043] Figure 7 A software structure block diagram of an electronic device provided in an embodiment of the present application;

[0044] Figure 8 A flow chart of a display method provided in an embodiment of the present application;

[0045] Fig. 9 A flowchart of a display method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0047] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0048] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent a, b, c, ab, ac, bc or abc, where a, b, c can be single or multiple.

[0049] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0050] The display method provided in the embodiment of the present application can be applied to any electronic device with a display function. The electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a smart screen, an artificial intelligence (AI) audio with a display function, a terminal in industrial control, a terminal in self-driving, a terminal in remote medical surgery, a terminal in smart grid, a terminal in transportation safety, a terminal in smart city, a terminal in smart home, a personal digital assistant (PDA), etc., and the embodiment of the present application does not make any limitation to this.

[0051] For the convenience of description, the display method provided in the embodiment of the present application is described below by taking a mobile phone as an electronic device. The display methods of other electronic devices can refer to the mobile phone.

[0052] When a user opens an application on a mobile phone and the application is running in the foreground, the mobile phone displays the interface of the application. If the user wants to return to the desktop from the interface of the application, it can be achieved by swiping up the screen. There are many operations for swiping up the screen, and different swiping up operations correspond to different animations. For example, swiping up the screen to the upper right corner of the screen and keeping the finger in the upper right corner for a moment can trigger a small window displaying the application interface. For another example, swiping up the screen to the upper left corner of the screen and keeping the finger in the upper left corner for a moment can trigger a split-screen display. For another example, after swiping up the screen, the distance between the finger lift position and the bottom of the screen is greater than or equal to the preset height, and the speed at which the finger is lifted (i.e., the hand-raising speed) is greater than the preset threshold, it can trigger a return to the desktop. It can be seen that after receiving the user's operation of swiping up the screen, the mobile phone needs to combine the movement trajectory of the finger on the screen and the hand-raising speed to judge the user's true intention, thereby triggering the corresponding animation.

[0053] The following is a detailed description of the operation and animation effect of the user swiping up the screen to return to the desktop with reference to the accompanying drawings.

[0054] In some embodiments, Figure 1As shown in the figure, the user opens the short message application, and the mobile phone displays the interface 101 of the short message application. The user presses the preset area 102 of the interface 101, slides up to position 103 and lifts his finger, and the mobile phone does not perform the animation of returning to the desktop, that is, the desktop interface is not displayed. Specifically, the mobile phone receives the user's operation of pressing and sliding up in the preset area 102, and in response to the operation of pressing and sliding up, the mobile phone displays an animation of the interface 101 gradually shrinking, such as Figure 1 The mobile phone receives the user's lifting operation at position 103, detects that the height of the user's hand-lifting position from the bottom of the screen is less than the height h of the preset area 102, and the sliding distance is short, and the mobile phone will think that the user has no intention of returning to the desktop. Therefore, in response to the lifting operation, the mobile phone displays an animation of gradually enlarging the interface 101, such as Figure 1 From c to e, it bounces back to the initial interface, and the phone does not return to the desktop.

[0055] In this embodiment, when the user slides up the screen, the interface of the short message application gradually shrinks. When the user lifts his finger, the interface will rebound to the initial state because the position where the finger is lifted does not meet the preset conditions.

[0056] In some embodiments, Figure 2 As shown, the user opens the short message application, and the mobile phone displays the interface 201 of the short message application. The user presses the preset area 202 of the interface 201, slides up to position 203 and lifts his finger, and the mobile phone executes the animation of returning to the desktop, and finally displays the desktop interface, which has the icon of the short message application. Specifically, the mobile phone receives the operation of the user pressing and sliding up in the preset area 201, and in response to the operation of pressing and sliding up, the mobile phone displays an animation of the interface 201 gradually shrinking, such as Figure 2 a to c. The mobile phone receives the user's lifting operation at position 203, detects that the height of the user's hand-raising position from the bottom of the screen is greater than or equal to the height h of the preset area 202, and the hand-raising speed is greater than or equal to the preset threshold, and the mobile phone determines that the user intends to return to the desktop. Therefore, in response to the lifting operation, the mobile phone executes the dynamic effect solution of sliding up to return to the desktop. For the corresponding animation effect, see Figure 3 , and eventually the desktop interface will be displayed.

[0057] For example, Figure 3As shown, time t1 is the moment when the user lifts his finger. At time t1, the mobile phone displays the interface window 301 of the short message application which has been reduced by a certain proportion. At this time, the transparency of interface window 301 is 0%. After time t1, the interface window of the short message application will continue to shrink, and the transparency of the interface window will gradually increase (the interface window will gradually disappear), such as interface window 302 at time t2 and interface window 303 at time t3, until at time t3, the interface window is reduced to the same size as the icon of the short message application on the desktop, and the interface window falls at the position of the icon of the short message application on the desktop, such as interface window 304. It should be noted that since the transparency of interface window 304 at time t3 is 100%, interface window 304 will not actually be displayed. Figure 3 It is only used to indicate the final position of the interface window.

[0058] In addition, at time t1, the mobile phone will create a window, which is used to display the icon of the short message application, and the window can be called the icon window of the short message application. At time t1, the icon window 305 is the same size as the interface window 301, and the transparency of the icon window 305 is 100%. After time t1, the created icon window will gradually shrink, and the transparency of the icon window will gradually decrease (the icon window gradually appears), such as icon window 306 at time t2 and icon window 307 at time t3, until time t3, the icon window is reduced to the same size as the icon of the short message application on the desktop, and the icon window falls on the position of the icon of the short message application on the desktop, such as icon window 308, and the transparency of icon window 308 is 0%. It should be noted that at time t2, the icon window 306 is the same size as the interface window 302, and at time t3, the icon window 307 is the same size as the interface window 303, that is, after time t1, the icon window and the interface window are reduced in the same proportion.

[0059] To fully understand the animation process, Figure 3 The animation process of the interface window of the short message application is displayed separately from the animation process of the icon window. In actual applications, the interface window and the icon window are displayed in a superimposed manner, and the icon window is superimposed on the interface window. Figure 4 As shown in the figure, when the user lifts his finger, the phone creates an icon window above the interface window. The layer where the icon window is located is layer 1, and the layer where the interface window is located is layer 2. Layer 2 is below layer 1. Figure 3 At time t1, the transparency of layer 1 is 100%, the icon window is not displayed, the transparency of layer 2 is 0%, and the interface window is fully displayed. After time t1, the transparency of layer 1 gradually decreases, the icon window gradually appears, the transparency of layer 2 gradually increases, and the interface window gradually disappears. At time t3, the transparency of layer 1 is 0%, the icon window is fully displayed, the transparency of layer 2 is 100%, and the interface window is not displayed.

[0060] It should be noted that based on Figure 2 In the embodiment shown, when the user swipes up, the interface window of the short message application gradually shrinks. During this process, the desktop interface can be displayed below the interface window. When the user starts to swipe up, the transparency of the desktop interface is 100%. During the swiping process, the transparency of the desktop interface gradually decreases (that is, the desktop interface gradually appears). After the user lifts his finger, the transparency of the desktop interface continues to decrease until the transparency is 0%. The moment when the transparency of the desktop interface is 0% can correspond to Figure 3 At time t3, the desktop interface is fully displayed. Figure 4 , the layer where the desktop interface is located is layer 3, layer 3 is below layer 2, and layer 2 is the layer where the interface window is located. When the user starts to slide up, the transparency of layer 3 is 100%, and the desktop interface is not displayed at this time. After that, the transparency of layer 3 gradually decreases. At time t3, the transparency of layer 3 is 0%, and the desktop interface is fully displayed.

[0061] It should be noted that at time t3, the desktop interface displayed on the mobile phone may have icons of other applications in addition to the short message application icon. Figure 3 The desktop interface shown is only an example.

[0062] In this embodiment, when the user swipes up the screen, the interface of the short message application gradually shrinks, and the desktop interface gradually appears below the interface of the short message application. When the user lifts his finger, because the position and speed of the finger lifting meet the preset conditions, the interface of the short message application continues to shrink and the transparency gradually increases. At the same time, an icon window of the short message application with the same size and position as the short message application gradually appears above the interface of the short message application, and the desktop interface continues to appear below the interface of the short message application. When the desktop interface is fully displayed, the icon window overlaps with the icon of the short message application on the desktop interface, realizing the animation effect of sliding the screen up to return to the desktop.

[0063] Based on the above embodiments, it can be known that only when the user's swipe up gesture operation meets the preset conditions can the dynamic effect of returning to the desktop be triggered. The preset conditions include: the position where the user presses is in the preset area of ​​the mobile phone interface (such as the bottom area of ​​the mobile phone interface), the height between the position where the user swipes up and the bottom of the mobile phone screen is greater than or equal to the height of the preset area, and the user's hand-raising speed is greater than or equal to the preset threshold.

[0064] The above-mentioned animation effect of returning to the desktop can also be called dynamic sinking or sinking animation. Since the dynamic sinking can only be performed on windows, the icons on the desktop belong to view icons, and view icons cannot be animated by sinking. Therefore, the above-mentioned embodiment implements the sinking animation of the application icon by creating a window of an application icon. When the animation ends, the window of the application icon will return to the position of the application icon on the desktop, and the two icons will overlap. At this time, the application icon on the desktop will be covered (blocked) by the icon window. After the animation ends, the mobile phone will close the icon window, but it takes time to close the icon window. Then, there is a possible situation. At the moment the animation ends, if the user quickly swipes left or right on the screen (without swiping the entire screen, but only moving a short distance), since it takes time to close the icon window, if the icon window is not closed when sliding, the icon window and the original application icon on the desktop will be misaligned and displayed, resulting in ghosting. If Figure 5 As shown, when the user slides the screen to the left, the window of the application icon of layer 1 remains at the original position, and the application icon on the desktop of layer 3 moves a short distance to the left, and a double image of the icon appears.

[0065] The above-mentioned icon ghosting problem is essentially due to the fact that the created icon window does not disappear in time. After the animation ends, when the icon window returns to its original position (to the position of the application icon on the desktop), the icon window should disappear immediately. However, since it takes a certain amount of time (15-50ms) to close (or destroy) the icon window, the problem cannot be solved by simply closing the window in the traditional way. You can consider hiding the window at the end of the animation. Since hiding the window can take effect immediately, the icon window of the next frame will be invisible immediately after the animation ends, thereby solving the problem of icon ghosting.

[0066] For ease of understanding, the hardware structure of the electronic device is described below. Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0067] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0068] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a display processing unit (displayprocess unit, DPU), and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. Exemplarily, the electronic device can execute the display method provided in the embodiment of the present application through the processor 110.

[0069] The electronic device 100 can realize the display function through the GPU, the display screen 194, and the application processor. For example, the electronic device can display the Figure 1 , Figure 2 , Figure 3 The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute instructions to generate or change display information.

[0070] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include at least one display screen 194.

[0071] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. Exemplarily, the internal memory 121 can store the code corresponding to the display method provided in the embodiment of the present application.

[0072] In addition, on top of the above components, the device also runs an operating system, such as an iOS operating system, an Android operating system, or a Windows operating system, etc. Applications can be installed and run on the operating system.

[0073] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system as an example of a layered architecture software system to illustrate the software structure of the electronic device. Figure 7 A software structure block diagram of an electronic device provided in an embodiment of the present application. The layered architecture divides the software system of the electronic device into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into four layers, namely, the application layer (applications), the application framework layer (application framework), the Android runtime (Android runtime) and the system library, and the kernel layer (kernel).

[0074] The application layer can include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. Figure 7 As shown, the application layer includes applications such as desktop applications, short messages, photo albums, calendars, alarm clocks, emails, browsers, etc. Among them, the thread of the desktop application can be used to calculate the application interface window, application icon window and animation frame data of the desktop interface when returning to the desktop, and the animation frame parameters can include window transparency, window scaling, window position, etc.

[0075] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions, such as the release function for closing (destroying) a window and the hide function for hiding a window involved in the embodiments of the present application. Figure 7 As shown, the application framework layer includes an interface detection module and a window management module.

[0076] The interface detection module is used to detect user operations, such as detecting user touch, press, click, double-click, slide, drag, and lift operations. In an embodiment of the present application, the desktop application registers gesture events with the interface detection module, such as gesture events of user finger press (ACTION_DOWN), gesture events of user finger slide (ACTION_MOVE), gesture events of user finger lift (ACTION_UP / ACTION_CANCEL), etc. When the interface detection module detects at least one gesture event registered by the desktop application, it notifies the desktop application that the at least one gesture event is triggered so that the desktop application executes the thread related to the at least one gesture event.

[0077] In some embodiments, the interface detection module may also be deployed at the application layer.

[0078] The window management module is responsible for managing the graphical user interface (GUI) resources used on the screen of the electronic device, which may include: creating and destroying windows, displaying and hiding windows, layout of windows, management of focus (activity), management of input method windows and wallpaper, etc. Each focus will have its own application window, and the window management module will regularly refresh the display content and window parameters in the application window (for example, the size of the application window, window zoom ratio, position, transparency, etc.). The window management module can create a corresponding window state for each application window, and the window management module uses this to mark the application window, and stores, queries and controls the state of the application window through the window state. In the embodiment of the present application, the window management module provides a release interface and a hide interface, and the desktop application can notify the window management module to close and / or hide the corresponding window by calling the release interface and / or the hide interface.

[0079] It should be noted that both the release interface and the hide interface are interfaces provided by the Android system. The release interface is a public interface that can be directly called, but the hide interface is not open to the public. In this regard, in the embodiment of the present application, the desktop application uses reflection to call the hide interface. The reflection method calls the hide interface in the code layer as follows: first find the hide interface, and then trigger the interface through invoke.

[0080] In some embodiments, the application framework layer may also include a display policy service, a power management service (PMS), an activity manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc., but the embodiments of the present application are not limited to this.

[0081] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0082] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0083] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0084] The system library may include multiple functional modules, such as surface flinger module, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0085] The layer synthesis module is used to perform layer synthesis on the drawn multiple application windows to obtain a display screen. In the embodiment of the present application, the layer synthesis module can perform layer synthesis on the application interface window, the application icon window and the desktop interface to obtain a frame of the return desktop animation.

[0086] In some embodiments, the layer composition module may also be deployed at the application framework layer.

[0087] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

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

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

[0090] The kernel layer is a layer between hardware and software. The kernel layer may include one or more of the following: display driver, camera driver, audio driver, sensor driver, etc., which are not limited in this embodiment of the present application. In this embodiment of the present application, the display driver is used to drive the display screen to display an animation of returning to the desktop.

[0091] It should be understood that in some embodiments, the layers implementing the same function may be called by other names, or the layers that can implement the functions of multiple layers may be regarded as one layer, or the layers that can implement the functions of multiple layers may be divided into multiple layers. The embodiments of the present application are not limited to this.

[0092] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0093] For example, Figure 8 A flow chart of a display method provided in an embodiment of the present application. Figure 8 As shown, the display method of this embodiment can be applied to electronic devices such as mobile phones, and the method may include the following steps:

[0094] S801. When the interface detection module detects that the user clicks on the icon of the first application, it transmits a first notification message to the desktop application, where the first notification message is used to notify the opening of the first application.

[0095] In this embodiment, the first application may be any application on the desktop interface, and the first application may be a system application or a third-party application, and this embodiment of the application does not impose any limitation on this.

[0096] For example, the first application may be Figure 2 The short message application shown in FIG. 1 shows a short message application. After the user clicks the icon of the short message application, the electronic device displays the interface of the short message application, such as Figure 2 Interface 201 is shown.

[0097] S802. The desktop application registers a gesture event with the interface detection module in response to the first notification message.

[0098] It is understandable that after the user clicks on the icon of the first application, the electronic device displays the interface of the first application. The user may trigger a gesture operation to return to the desktop on the interface of the first application. Therefore, after receiving the first notification message, the desktop application can register relevant gesture events to the interface detection module so as to promptly learn the user's operation intention on the first application interface (such as the intention to return to the desktop), thereby triggering the corresponding process (such as triggering the animation scheme to return to the desktop).

[0099] In this embodiment, the gesture events registered by the desktop application include a first gesture event, a second gesture event, and a third gesture event. The operation corresponding to the first gesture event is the operation of the user lifting his finger, the operation corresponding to the second gesture event is the operation of the user sliding his finger (such as sliding to the right / left / up / down) on the screen, and the operation corresponding to the third gesture event is the operation of the user pressing his finger.

[0100] After the desktop application registers the above gesture events with the interface detection module, if the interface detection module detects at least one of the three registered gesture events (such as S803, or S810, or S824 described below), the interface detection module can notify the desktop application so that the desktop application executes the corresponding process (such as S804, or S811 and S813, or S825 described below).

[0101] In some embodiments, after S802, the following steps may be included:

[0102] S803. When the interface detection module detects the third gesture event and the second gesture event, it transmits a second notification message to the desktop application, where the second notification message is used to notify the triggering of the third gesture event and the second gesture event.

[0103] In this step, after the interface detection module detects the operation of the user's finger pressing and sliding the screen, it transmits a second notification message to the desktop application. The second notification message carries data such as the position where the user's finger pressed, the sliding track and sliding speed of the user's finger on the screen. Based on the data in the second notification message, the desktop application determines that the user pressed and slid upward in the preset area of ​​the screen. For example, refer to Figure 2 Based on the data in the second notification message, the desktop application determines that the user presses and slides the screen upward within the preset screen area 202, and the desktop application executes the process corresponding to the gesture (see S804).

[0104] S804. The desktop application calculates third animation frame data in response to the second notification message.

[0105] In this step, the third animation frame data can be understood as animation frame data of the first application's interface sinking.

[0106] In one example, the third animation frame data includes animation frame data of the interface of the first application. The third animation frame data may include data of N frames of images, each frame of image data including the position, size or scaling ratio, transparency, etc. of the interface of the first application, where N is a positive integer.

[0107] The interface size of the first application in the third animation frame data gradually decreases, that is, the zoom ratio of the interface of the first application gradually decreases. The gradual reduction of the interface of the first application can be understood as the gradual reduction of the interface window of the first application.

[0108] In one example, the interface position of the first application in the third animation frame data can be represented by the coordinate position of the upper left corner of the interface of the first application. It can be understood that as the size of the first application interface decreases, the interface position of the first application will also change. For example, if the first application is always located at the center of the display screen in the animation of the first application interface sinking (i.e., the third animation), then as the size of the first application interface decreases, the coordinate position of the upper left corner of the first application interface will gradually approach the center of the display screen. Of course, the interface position of the first application can also be represented by, for example, the coordinate position of the upper right corner of the interface of the first application, or the center position of the interface of the first application, and this embodiment of the application does not impose any limitation on this.

[0109] Regarding the interface transparency of the first application in the third animation frame data, in one example, the interface transparency of the first application remains unchanged and is maintained at 0%, that is, the display content on the interface of the first application is clearly displayed. In another example, the interface transparency of the first application gradually increases from 0%, that is, the display content on the interface of the first application can be gradually blurred as the interface is reduced.

[0110] In one example, the third animation frame data includes animation frame data of the interface of the first application and animation frame data of the desktop interface. Accordingly, the data of each frame of the N frames of images may include the position, size or scaling ratio, transparency, etc. of the interface of the first application, and the position, size or scaling ratio, transparency, etc. of each element on the desktop interface. It is understandable that the transparency of each element of the desktop interface in the same frame of image is the same.

[0111] Among them, the desktop interface may include elements such as desktop icons (BubbleTextView), desktop widgets (LauncherAppWidgetHostView), cards (AbilityFormHostView), large folders (CardFolder), navigation bars, and status bars, and the embodiments of the present application do not impose any limitations on this.

[0112] In one example, the second notification message may include data such as the position where the user presses, the sliding speed of the user's finger on the screen, etc. The desktop application may calculate the third animation frame data based on the position where the user presses, the sliding speed, etc. in the second notification message, combined with the display screen size (i.e., the initial interface size of the first application), the preset animation duration, the refresh rate of the display screen, etc. The number of frames N in the third animation frame data is related to the refresh rate of the display screen and the preset animation duration. This part can be referred to the prior art and will not be elaborated here.

[0113] In one example, in response to the second notification message, the desktop application calculates the third animation frame data by calling a thread.

[0114] S805. The desktop application transmits the third animation frame data to the window management module.

[0115] S806. The window management module transmits the third animation frame data to the layer synthesis module.

[0116] S807. The layer synthesis module generates a third animation based on the third animation frame data.

[0117] In one example, the layer synthesis module generates a third animation based on the animation frame data of the interface of the first application in the third animation frame data and the animation frame data of the desktop interface. In other words, the layer synthesis module needs to merge the interface of the first application on the upper layer with the desktop interface on the lower layer to obtain the third animation.

[0118] S808. The layer synthesis module transmits the third animation to the display driver.

[0119] S809. The display driver drives the display screen to play the third animation.

[0120] In some embodiments, after the interface detection module detects the third gesture event and the second gesture event, the following steps are further included:

[0121] S810. When the interface detection module detects the first gesture event, it transmits a third notification message to the desktop application, where the third notification message is used to notify the triggering of the first gesture event.

[0122] In this embodiment, after detecting the user's gesture operation of pressing and sliding the screen, the interface detection module detects the user's finger lifting operation. When the user lifts the finger, the interface detection module transmits a third notification message to the desktop application. The third notification message carries data such as the position and speed of the user's finger lifting. Based on the data in the third notification message, the desktop application determines that the user has lifted his finger after pressing and sliding up. For example, refer to Figure 2 Based on the data in the third notification message, the desktop application determines that the user lifts his finger at position 203, the height of the finger lifted from the bottom of the screen is greater than the preset height h, and the hand-raising speed is greater than or equal to the preset threshold, and the desktop application executes the process corresponding to the gesture (the animation solution for returning to the desktop, see S811).

[0123] S811. In response to the third notification message, the desktop application notifies the window management module to create an icon window for the first application.

[0124] S812. The window management module creates an icon window for the first application.

[0125] In this embodiment, the window management module creates an icon window of the first application to implement a sinking animation of the icon window of the first application, and the icon of the first application is displayed on the icon window of the first application. It should be noted that when the window management module creates the icon window of the first application, the transparency of the icon window of the first application is 100%, and the size and position of the icon window of the first application are the same as the size and position of the interface window of the first application at the current moment.

[0126] For example, refer to Figure 3 , the first application is a short message application. At time t1 (the moment when the user lifts his finger), the mobile phone creates an icon window 305 of the short message application. The icon window 305 has the same position and size as the interface window 301 of the short message application at time t1. At time t1, the transparency of the icon window 305 is 100% (for illustration, Figure 3 The rectangular frame of the icon window 305 is shown, but in fact, when the icon window is created, the icon window will not be displayed), and the transparency of the interface window 301 is 0% (clear display).

[0127] While executing S811, you may also execute the following steps:

[0128] S813. The desktop application calculates the first animation frame data in response to the third notification message.

[0129] In this step, the first animation frame data refers to the animation frame data of the sinking animation returning to the desktop.

[0130] The first animation frame data includes animation frame data of the interface of the first application, animation frame data of the icon window of the first application, and animation frame data of the desktop interface. The first animation frame data may include data of M frames of images, and the data of each frame of image may include the position, size or zoom ratio, transparency, etc. of the interface of the first application, the position, size or zoom ratio, transparency, etc. of the icon window of the first application, and the position, size or zoom ratio, transparency, etc. of each element on the desktop application. Wherein, M is a positive integer.

[0131] The size of the interface of the first application in the first animation frame data continues to gradually shrink based on the size of the interface of the first application at the end of the aforementioned third animation. In one example, the interface position of the first application in the first animation frame data can be represented by the coordinate position of the upper left corner of the interface of the first application. It can be understood that as the interface of the first application continues to shrink, the coordinate position of the upper left corner of the interface of the first application no longer gradually approaches the center position of the display screen, but gradually approaches the coordinate position of the upper left corner of the icon of the first application on the desktop interface. Of course, the interface position of the first application can also be represented by, for example, the coordinate position of the upper right corner of the interface of the first application, or the center position of the interface of the first application, and this embodiment of the application does not impose any limitation on this.

[0132] The transparency of the interface of the first application in the first animation frame data is gradually increased on the basis of the transparency of the interface of the first application at the end of the aforementioned third animation. In one example, the transparency of the interface of the first application is 0% at the end of the third animation, and the first animation starts, and the transparency of the interface of the first application gradually increases from 0%, and at the end of the first animation, the transparency of the interface of the first application is 100%, and the interface of the first application completely disappears. In another example, the transparency of the interface of the first application is greater than 0% at the end of the third animation, for example, 10%, and the first animation starts, and the transparency of the interface of the first application continues to increase from 10%, and at the end of the first animation, the transparency of the interface of the first application is 100%, and the interface of the first application completely disappears.

[0133] The size of the icon window of the first application in the first animation frame data is gradually reduced based on the size of the icon window of the first application. In each frame of image data of the first animation frame data, the size and position of the icon window of the first application are the same as the size and position of the interface of the first application. Figure 3At time t1, the icon window 305 of the short message application is the same size and position as the interface window 301 of the short message application. At time t2, the icon window 306 of the short message application is the same size and position as the interface window 302 of the short message application. At time t3, the icon window 307 of the short message application is the same size and position as the interface window 303 of the short message application. At time t4, the icon window 308 of the short message application is the same size and position as the interface window 304 of the short message application.

[0134] The transparency of the icon window of the first application in the first animation frame data is gradually reduced based on the transparency of the icon window of the first application when it is created. At the beginning of creation, the transparency of the icon window of the first application is 100%, and the transparency gradually decreases from 100%. When the first animation ends, the transparency of the icon window of the first application is 0%, and the icon window of the first application is completely visible.

[0135] The transparency of each element of the desktop interface in the first animation frame data gradually decreases on the basis of the transparency of the desktop interface at the end of the aforementioned third animation. In one example, when the third animation ends, a desktop interface is created. At the beginning of creation, the transparency of the desktop interface is 100%. When the first animation starts, the transparency of the desktop interface gradually decreases from 100%. When the first animation ends, the transparency of the desktop interface is 0%, and each element on the desktop interface is clearly displayed. In another example, when the third animation ends, the transparency of the desktop interface is between 100% and 0%, for example, 90%. When the first animation starts, the transparency of the desktop interface continues to decrease from 90%. When the first animation ends, the transparency of the desktop interface is 0%, and each element on the desktop interface is clearly displayed.

[0136] It should be noted that in the first animation, the animation effect of the desktop interface is mainly reflected in the change of transparency, and each element on the desktop interface can be slightly scaled in size at the original position. For example, all icons on the desktop are reduced from a certain size to the original size.

[0137] In one example, the third notification message may include data such as the position of the finger raised and the speed of the hand raised. The desktop application may calculate the first animation frame data based on the position of the finger raised and the speed of the hand raised in the third notification message, and in combination with the state parameters of the interface window when the finger is raised (such as the size, position, transparency, etc. of the interface window of the first application), the position and size of the icon of the first application on the desktop when the animation ends, the preset animation duration, the refresh rate of the display screen, etc. Among them, the number of frames M in the first animation frame data is related to the refresh rate of the display screen and the preset animation duration. This part can refer to the existing technology and will not be elaborated here.

[0138] In one example, in response to the third notification message, the desktop application calculates the first animation frame data by calling a thread.

[0139] S814. The desktop application transmits the first animation frame data to the window management module.

[0140] S815. The window management module transmits the first animation frame data to the layer synthesis module.

[0141] S816. The layer synthesis module generates a first animation based on the first animation frame data.

[0142] In one example, the layer synthesis module generates the first animation based on the animation frame data of the interface of the first application, the animation frame data of the icon window of the first application, and the animation frame data of the desktop interface in the first animation frame data. In other words, the layer synthesis module needs to merge the icon window of the first application in the upper layer, the interface window of the first application in the middle layer, and the desktop interface in the lower layer to obtain the first animation.

[0143] S817. The layer synthesis module transmits the first animation to the display driver.

[0144] S818. The display driver drives the display screen to play the first animation.

[0145] In some embodiments, while executing S814, the following may also be executed:

[0146] S819. The desktop application registers the first animation end event with the layer synthesis module through the window management module.

[0147] The purpose of registering the first animation end event is that the desktop application needs to be notified of the end of the first animation (i.e., the animation of returning to the desktop) in a timely manner so as to promptly notify the window management module to hide the icon window of the first application, thereby avoiding the problem of icon ghosting when the user swipes left or right on the screen a short distance at the moment the first animation ends, as the icon window of the first application is not closed in time.

[0148] In some embodiments, after the first animation ends, the following may also be performed:

[0149] S820. The layer synthesis module notifies the desktop application through the window management module that the first animation ends.

[0150] In one example, the layer synthesis module sends a notification of the end of the first animation to the window management module, and the window management module sends a notification of the end of the first animation to the desktop application.

[0151] S821a. In response to the notification of the end of the first animation, the desktop application notifies the window management module to hide the icon window of the first application.

[0152] In one example, the desktop application notifies the window management module to hide the icon window of the first application by calling a first interface provided by the window management module. Exemplarily, the first interface is a hide interface, and the hide interface is used to trigger hiding the icon window of the first application.

[0153] S822. The window management module hides the icon window of the first application.

[0154] In one example, while executing S821a, the following may also be executed:

[0155] S821b. The desktop application notifies the window management module to close the icon window of the first application.

[0156] In one example, the desktop application notifies the window management module to close the icon window of the first application by calling the second interface provided by the window management module. Exemplarily, the second interface is a release interface, and the second interface can be used to trigger closing the icon window of the first application.

[0157] S823. The window management module closes the icon window of the first application.

[0158] In this embodiment, after the first animation ends, since the desktop application registers the first animation end event with the layer synthesis module, the desktop application can promptly learn the end of the first animation, and after the first animation ends, promptly notify the window management module to perform hiding of the icon window of the first application and closing of the icon window of the first application. Compared with closing the icon window of the first application, hiding the icon window of the first application is faster, because to hide the icon window of the first application, it is only necessary to mark the window state of the icon window of the first application as invisible, and in the next frame image, the icon window of the first application disappears immediately. However, to close the icon window of the first application, the window management module needs to perform a large number of conditional judgments (such as traversing windows), and involves communication between the application layer and the framework layer, so it takes a certain amount of time to close the icon window of the first application. In this embodiment, in response to the notification of the end of the first animation, on the basis of the original notification window management module closing the icon window of the first application, the step of notifying the window management module to hide the icon window of the first application is added, so that the icon window of the first application can be quickly hidden and the problem of icon ghosting can be avoided.

[0159] In some embodiments, the desktop application can also notify the window management module to close the interface window of the first application in response to the notification of the end of the first animation. In one example, the desktop application can trigger the window management module to close the interface window of the first application by calling a second interface (e.g., a release interface) provided by the window management module.

[0160] In some embodiments, the above display method may further include the following steps:

[0161] S824. At the moment when the first animation ends, when the interface detection module detects the second gesture event, a fourth notification message is transmitted to the desktop application, where the fourth notification message is used to notify the triggering of the second gesture event.

[0162] In this step, after the interface detection module detects the operation of the user's finger sliding the screen, it transmits a fourth notification message to the desktop application. The fourth notification message carries data such as the sliding track and sliding speed of the user's finger on the screen. Based on the data in the fourth notification message, the desktop application determines that the user has slid in the first direction (e.g., slid to the left or slid to the right) for a short distance (the screen has not been swiped away). For example, refer to Figure 5 Based on the data in the fourth notification message, the desktop application determines that the user slides a short distance to the left on the desktop interface, and the desktop application executes the process corresponding to the gesture (see S825).

[0163] S825. The desktop application calculates second animation frame data in response to the fourth notification message.

[0164] In this step, the second animation frame data refers to the animation frame data of the desktop interface sliding in the first direction, and the second animation frame data may include P frame image data, each frame image data includes the position of each element on the desktop interface, etc., where P is a positive integer. Figure 5 , the icon of the first application is displayed on the desktop interface, and the second animation frame data includes at least one frame of image data, and the frame of image data includes the position of the icon of the first application after moving a distance s from the original position.

[0165] S826. The desktop application transmits the second animation frame data to the window management module.

[0166] S827. The window management module transmits the second animation frame data to the layer synthesis module.

[0167] S828. The layer synthesis module generates a second animation based on the second animation frame data.

[0168] S829. The layer synthesis module transmits the second animation to the display driver.

[0169] S830. The display driver drives the display screen to play the second animation.

[0170] After the first animation ends, the desktop application promptly notifies the window management module to hide the icon window of the first application. Even if the window management module has not closed the icon window of the first application, the icon window of the first application will not be displayed in the second animation, and the problem of icon ghosting will not occur.

[0171] The display method shown in the embodiment of the present application is that the electronic device displays the interface of the first application, and when it is detected that the user slides up the screen from the bottom of the interface, the electronic device plays an animation of the interface of the first application gradually shrinking, and when it is detected that the user lifts the finger after sliding up, if it is determined that the position and speed of the finger lifting meet the preset conditions, the electronic device plays an animation of returning to the desktop, and the animation of returning to the desktop includes the interface window of the first application, the icon window of the first application, and the desktop interface, wherein the icon window of the first application is newly created when the finger is lifted to realize the sinking animation of the application icon, and the content displayed in the icon window is the icon of the first application. After the animation of returning to the desktop ends, the electronic device will close the icon window of the first application, but since it takes time to close the icon window of the first application, if the user slides the screen left or right for a short distance at the moment when the animation of returning to the desktop ends, the icon window of the first application is still not closed, and the icon ghosting will appear, and the upper layer displays the icon window of the first application, and the lower layer displays the icon of the first application on the desktop. In this regard, in this embodiment, after the animation of returning to the desktop ends, the following steps can be added: hiding the icon window of the first application. Since hiding the icon window of the first application only requires marking the window, the icon window of the first application will not appear in the next frame image. If the user quickly swipes left or right a short distance on the screen after the animation of returning to the desktop ends, the icon window of the first application will not be displayed because the icon window of the first application is hidden. In this way, the icon ghosting problem can be avoided.

[0172] Based on the above embodiments, the present application provides a display method, which is applied to electronic devices, such as Fig. 9 As shown, the method includes:

[0173] S901. When the first application is running in the foreground, the interface of the first application is displayed.

[0174] S902. Receive a user's operation of pressing and sliding up on the interface of the first application, and in response to the user lifting a finger, display a first animation between a first time point and a second time point.

[0175] Among them, the second time point is later than the first time point.

[0176] S903. At a second time point, the desktop interface is displayed, the icon window of the first application is displayed on the desktop interface, and the view icon of the first application on the desktop interface is blocked by the icon window of the first application.

[0177] S904. After the second time point, call a first interface of the window management module, where the first interface is used to trigger hiding of the icon window of the first application.

[0178] S905. After the second time point, in response to the user sliding in the first direction, display a second animation.

[0179] The second animation is an animation of the view icon of the first application moving in the first direction. When the second animation is displayed, the icon window of the first application is hidden.

[0180] The first time point may be regarded as the time point when the user lifts his finger, and the first animation starts to be displayed at the first time point, and the first animation is an animation of returning to the desktop.

[0181] Among them, the second time point is the time point when the first animation ends. When the first animation ends, the desktop interface is displayed, and the view icon of the first application (that is, the icon of the first application originally on the desktop) is displayed on the desktop interface. The upper layer of the desktop interface also displays the icon window of the first application. The icon window of the first application is the same size and position as the view icon of the first application, and the icon window of the first application obscures (covers) the view icon of the first application.

[0182] The user's sliding operation in the first direction may be an operation of sliding the screen left, right, upward or downward, for example, Figure 5 The user swipes left on the screen.

[0183] After the second time point, that is, after the first animation ends, the electronic device will trigger the closing of the icon window of the first application. However, it takes a certain amount of time to close the icon window of the first application. Therefore, if the user slides the screen in the first direction before the icon window of the first application is closed, the icon window of the first application is still displayed in the original position, and the view icon of the first application below the icon window of the first application will move a short distance in the first direction, that is, the view icon of the first application will deviate from its original position, and the icon ghost will appear. In order to solve this problem, in this embodiment, after the second time point, that is, after the first animation ends, the following steps are added: the electronic device triggers the hiding of the icon window of the first application by calling the first interface (hide interface), so that the icon window of the first application disappears immediately in the next frame. If the user slides the screen left or right after the first animation ends, the icon ghost will not appear because the icon window of the first application has been hidden.

[0184] In an optional embodiment, the display method further includes: after the second time point, calling a second interface of the window management module, the second interface being used to trigger closing of the icon window of the first application.

[0185] In one example, after the second time point, the electronic device calls the first interface of the window management module and calls the second interface (e.g., release interface) of the window management module at the same time. In this example, the electronic device can call the first interface and the second interface at the same time to trigger hiding and closing the icon window of the first application respectively.

[0186] In one example, after the second time point, the electronic device calls the first interface of the window management module and then calls the second interface of the window management module. In this example, the electronic device first calls the first interface and then calls the second interface, and accordingly, the icon window of the first application is first triggered to be hidden and then the icon window of the first application is triggered to be closed.

[0187] In some embodiments, closing the icon window of the first application may also be described as destroying the icon window of the first application.

[0188] In an optional embodiment, the display method further includes: hiding the icon window of the first application at a third time point; the third time point is later than the second time point; closing the icon window of the first application at a fourth time point; the fourth time point is later than the third time point.

[0189] Based on the two examples of the aforementioned embodiments, no matter whether the electronic device calls the first interface and the second interface at the same time, or calls the first interface first and then calls the second interface, the electronic device first hides the icon window of the first application and then closes the icon window of the first application. This is because hiding the icon window of the first application only requires the window management module of the electronic device to mark the icon window as invisible, so that the icon window of the first application disappears immediately in the next frame image, while closing the icon window of the first application requires the window management module to perform a large number of conditional judgments (such as traversing windows), and involves communication between the application layer and the framework layer, which takes a certain amount of time.

[0190] After the second time point, the electronic device first hides the icon window of the first application by calling the first interface, thereby avoiding the aforementioned icon ghosting problem. Subsequently, the electronic device closes the hidden icon window of the first application, and closing the icon window of the first application is a fallback step. After this step is completed, the animation effect of returning to the desktop ends.

[0191] It should be noted that Fig. 9 The positions of the various time points shown are only examples used to indicate the timing relationship of the various time points, and do not constitute a limitation on the timing relationship of the corresponding steps. For example, Fig. 9 At time T4, the icon window of the first application is closed, and the closing step may be performed during the process of displaying the second animation.

[0192] In an optional embodiment, the display method also includes: at a first time point, creating an icon window of the first application, the icon window of the first application being located above the interface window of the first application; at the first time point, the icon window of the first application is the same size as the interface window of the first application, the icon window of the first application is the same position as the interface window of the first application, the transparency of the icon window of the first application is a first value, and the transparency of the interface window of the first application is a second value.

[0193] The first value is different from the second value. The larger the value of the window transparency, the more transparent (less clear) the window is; the smaller the value of the window transparency, the clearer the window is. Exemplarily, the first value is 100% and the second value is 0%; or, the first value is 100% and the second value is a value greater than 0% and less than 100%, such as 10%.

[0194] In this embodiment, since the icon of the first application on the desktop is a view icon, the view icon cannot perform an icon sinking animation, and only the icon in the form of a window can perform an icon sinking animation. Therefore, in this embodiment, when the user lifts his finger, an icon window of the first application is created to implement a sinking animation of the first application icon returning to the desktop.

[0195] In an optional embodiment, in each frame image of the first animation, the interface window of the first application and the icon window of the first application are the same size and position; in the first animation, the transparency of the interface window of the first application gradually increases, the transparency of the icon window of the first application gradually decreases, and the transparency of the desktop interface gradually decreases.

[0196] In this embodiment, the interface window of the first application and the icon window of the first application in the first animation are scaled down in the same proportion, that is, the positions and sizes of the two are the same in each frame of the first animation. During the first animation, the interface window of the first application becomes more and more transparent, the icon window of the first application becomes clearer and clearer, and the desktop interface becomes clearer and clearer. It is understandable that when the first animation ends, the desktop interface is displayed, the icon window of the first application is displayed on the upper layer of the desktop interface, and the interface window of the first application (with a transparency of 100%) is not displayed.

[0197] In an optional embodiment, the display method also includes: in response to the user lifting up the finger operation, calling the thread of the desktop application, calculating the data of M frame images of the first animation, the data of each frame image in the M frame images includes the parameters of the interface window of the first application, the parameters of the icon window of the first application, and the parameters of each element on the desktop interface, M is a positive integer; calling the thread of the desktop application to transfer the data of the M frame images to the layer synthesis module; calling the thread of the layer synthesis module to generate the first animation based on the data of the M frame images.

[0198] The parameters of the interface window of the first application include the position, size or zoom ratio, transparency, etc. of the interface window of the first application. The parameters of the icon window of the first application include the position, size or zoom ratio, transparency, etc. of the icon window of the first application. The parameters of each element on the desktop interface include the position, size or zoom ratio, transparency, etc. of each element on the desktop.

[0199] Among them, M is related to the refresh rate of the display and the preset animation duration.

[0200] In this embodiment, the thread of the desktop application calculates the animation frame data of the first animation at one time, and transmits the calculated animation frame data of the first animation to the layer synthesis module, so that the layer synthesis module generates the first animation, instead of calculating one frame of animation frame data and transmitting one frame of animation frame data. This helps to reduce the possibility that the thread of the desktop application cannot calculate the animation frame data due to excessive load during the animation process, resulting in animation frame loss or stuck.

[0201] In an optional embodiment, the thread of the layer synthesis module is called to generate the first animation based on the data of the M frame image, including: the thread of the layer synthesis module is called to obtain the interface content of the first application, the icon content of the first application, and the content of each element on the desktop interface from the buffer; the thread of the layer synthesis module is called to generate the first animation based on the data of the M frame image, the interface content of the first application, the icon content of the first application, and the content of each element on the desktop interface.

[0202] For example, refer to Figure 4 , the layer where the icon window of the first application is located is layer 1, the layer where the interface window of the first application is located is layer 2, the layer where the desktop interface is located is layer 3, layer 1 is above layer 2, and layer 2 is above layer 3. The layer synthesis module can merge the image data of the three layers of each frame to generate the first animation.

[0203] In this embodiment, the buffer of the electronic device stores the interface content of the first application, the icon content of the first application and the content of each element on the desktop interface. The layer synthesis module can obtain the content data to be displayed in the animation from the buffer, and combine it with the data of the M frame images to generate the first animation.

[0204] In an optional embodiment, the method further includes: in response to a press and slide up operation, displaying a third animation; in the third animation, the interface window of the first application gradually shrinks; at the first time point, displaying the interface window of the first application that has been reduced to a first ratio.

[0205] In one example, a gradually clearer desktop interface is displayed below the interface window of the first application. In another example, a preset screen is displayed below the interface window of the first application, for example, the preset screen is a pure black screen.

[0206] It should be noted that the embodiment of the present application does not particularly limit the specific structure of the execution subject of a display method, as long as the code storing a display method of the embodiment of the present application can be run to perform processing according to a display method provided by the embodiment of the present application. For example, the execution subject of a display method provided by the embodiment of the present application can be a functional module in an electronic device that can call and execute a program, or a processing device applied to an electronic device, for example, the processing device is a chip.

[0207] In the above embodiments, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0208] Therefore, the modules of each example described in the embodiments of the present application can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in the form of hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0209] An embodiment of the present application provides an electronic device, including: a memory and at least one processor; the memory is used to store computer program code, and the computer program code includes instructions; when the at least one processor executes the instructions, the electronic device executes a technical solution as in any of the aforementioned embodiments, and its implementation principle and technical effect are similar to those of the above-mentioned related embodiments, which will not be repeated here.

[0210] The memory may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0211] The memory can be independent and connected to the processor through a communication line, or it can be integrated with the processor.

[0212] The processor may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0213] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the technical solution of any of the above embodiments. The implementation principle and technical effect are similar to those of the above-mentioned related embodiments and will not be repeated here.

[0214] An embodiment of the present application provides a chip, which includes a processor. The processor is used to call a computer program in a memory to execute the technical solution in any of the above embodiments. Its implementation principle and technical effect are similar to those of the above-mentioned related embodiments and will not be repeated here.

[0215] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the technical solution in any of the above embodiments. The implementation principle and technical effect are similar to those of the above-mentioned related embodiments and will not be repeated here.

[0216] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A display method, characterized in that: Applied to electronic equipment, the method comprises: When the first application is running in the foreground, the interface of the first application is displayed; Receiving a user's operation of pressing and sliding up on the interface of the first application, and in response to the user lifting a finger, displaying a first animation between a first time point and a second time point; the second time point is later than the first time point; At the second time point, a desktop interface is displayed, an icon window of the first application is displayed on the desktop interface, and a view icon of the first application on the desktop interface is blocked by the icon window of the first application; After the second time point, calling a first interface of a window management module, where the first interface is used to trigger hiding of an icon window of the first application; After the second time point, in response to the user sliding in the first direction, a second animation is displayed, where the second animation is an animation of the view icon of the first application moving in the first direction; when the second animation is displayed, the icon window of the first application is hidden.

2. The method according to claim 1, characterized in that The method further comprises: After the second time point, a second interface of the window management module is called, where the second interface is used to trigger closing of the icon window of the first application.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: At a third time point, hiding the icon window of the first application; the third time point is later than the second time point; At a fourth time point, the icon window of the first application is closed; the fourth time point is later than the third time point.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: At the first time point, creating an icon window of the first application, wherein the icon window of the first application is located above the interface window of the first application; At the first time point, the icon window of the first application is the same size as the interface window of the first application, the icon window of the first application is the same position as the interface window of the first application, the transparency of the icon window of the first application is a first value, and the transparency of the interface window of the first application is a second value.

5. The method according to any one of claims 1 to 4, characterized in that: In each frame of the first animation, the interface window of the first application and the icon window of the first application are the same in size and position; In the first animation, the transparency of the interface window of the first application gradually increases, the transparency of the icon window of the first application gradually decreases, and the transparency of the desktop interface gradually decreases.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to the user lifting up the finger, calling the thread of the desktop application, calculating the data of M frames of the first animation, wherein the data of each frame of the M frames includes the parameters of the interface window of the first application, the parameters of the icon window of the first application, and the parameters of each element on the desktop interface, where M is a positive integer; Calling the thread of the desktop application to transmit the data of the M frames of image to a layer synthesis module; The thread of the layer synthesis module is called to generate the first animation based on the data of the M frame images.

7. The method according to claim 6, characterized in that The thread calling the layer synthesis module generates the first animation based on the data of the M frame images, including: Calling the thread of the layer synthesis module to obtain the interface content of the first application, the icon content of the first application, and the content of each element on the desktop interface from the buffer; The thread of the layer synthesis module is called to generate the first animation based on the data of the M frame images, the interface content of the first application, the icon content of the first application and the content of each element on the desktop interface.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: In response to the pressing and sliding up operation, displaying a third animation; in the third animation, the interface window of the first application gradually shrinks; At the first time point, an interface window of the first application reduced to a first ratio is displayed.

9. An electronic device, characterized in that: The electronic device comprises: memory and at least one processor; The memory is used to store computer program codes, and the computer program codes include instructions; when the at least one processor executes the instructions, the electronic device executes the method according to any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by an electronic device, the method according to any one of claims 1 to 8 is implemented.