Dynamic effect display method and electronic equipment
By judging the conditions for ending multitasking animation, creating or reusing related resources, the problem of abnormal display of multitasking animation is solved, ensuring that the application window and background card are synchronized and changes are changed, and the user experience is improved.
Patent Information
- Application Number
- CN202411295968.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-14
AI Technical Summary
In electronic devices, when the multitasking effect is activated again after the multitasking effect is over, the application window displayed in the front desk does not change synchronously with the background card, resulting in user visual confusion and low experience.
By judging the conditions for the end of the last multitasking animation, create or reuse resources related to multitasking animation, ensure that the application window and background cards change synchronously when starting a new round of multitasking animation, avoiding the resource failure caused by the unclearance of resources An exception is displayed.
It effectively avoids abnormal display of multitasking animation, improves user experience, and ensures that the application window and background cards are synchronized during multitasking animation.
Smart Images

Figure CN119127020A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a motion effect display method and electronic device. Background Art
[0002] When the electronic device is in multi-tasking scheduling mode, the electronic device can simultaneously display one or more application (APP) windows in the form of floating windows to facilitate user use. After receiving the dynamic effect trigger operation input by the user, the electronic device displays the corresponding multi-tasking dynamic effect, such as following the user's sliding operation, the electronic device changes the window of the application displayed in the foreground synchronously with the background card, such as synchronously zooming, moving, etc.
[0003] However, after a multitasking animation ends, when the user triggers the electronic device to start the multitasking animation again, the multitasking animation display may be abnormal, such as the window of the application displayed in the foreground does not change synchronously with the background card, causing visual confusion to the user and a poor user experience. Summary of the invention
[0004] The embodiments of the present application provide a motion effect display method and an electronic device for solving the problem of abnormal motion effect display in multiple tasks.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a method for displaying a dynamic effect, which is applied to an electronic device, wherein the electronic device displays a first interface (such as a desktop), wherein the first interface includes a window of a first application displayed in the form of a floating window, wherein the number of the first application is one or more.
[0007] Afterwards, the electronic device receives a first operation from the user. The first operation can trigger the start of a multitasking animation. In response to the first operation, the electronic device determines whether a preset condition is met. The preset condition includes the condition for the end of the last multitasking animation. When the preset condition is met, the electronic device synchronizes the window of the first application with the first background card corresponding to the window of the first application based on the first resource. The first resource is a resource related to the display of the multitasking animation created based on the first operation. Synchronous changes include synchronous movement and / or synchronous scaling.
[0008] In the present application, when a first operation input by a user is received during the window of a first application displayed in the form of a floating window, indicating that a multi-tasking animation needs to be started, the electronic device determines whether a preset condition is met, and the preset condition includes a condition for the last multi-tasking animation to end. If the preset condition is met, it indicates that the condition for the last multi-tasking animation to end is met, that is, it indicates that the last multi-tasking animation has ended. The electronic device can synchronously move and scale the window of the first application and the first background card in which it is located based on the resources related to the multi-tasking animation display created by the first operation to ensure the normal display of the multi-tasking animation, thereby avoiding visual confusion for the user due to the fact that the window of the application displayed in the foreground does not change synchronously with the background card, and ensuring the user experience.
[0009] Optionally, the first operation can trigger the start of multi-tasking animation in multi-tasking scheduling mode. Multi-tasking scheduling mode refers to a mode in which one or more application windows can be displayed, and one or more application windows are in the form of floating windows. In addition, during the display of multi-tasking animation, the first operation can control the operation of the multi-tasking animation, such as scaling and moving.
[0010] In one possible design approach, when the conditions for the end of the last multitasking animation are not met, the electronic device can directly synchronize the change of the window of the first application and the first background card based on the second resource, wherein the second resource is a resource related to the last multitasking animation display.
[0011] Based on this, when the conditions for the end of the last multi-tasking animation are not met, it indicates that the above-mentioned first operation may have been input during the display of the last multi-tasking animation. The electronic device believes that the first operation is the input operation corresponding to the last multi-tasking animation, that is, the first operation is used to trigger and control the operation of the multi-tasking animation. Therefore, the electronic device can directly reuse the second resource corresponding to the last multi-tasking animation, and synchronously change the window of the first application and the first background card to realize the continued operation of the last multi-tasking animation, thereby ensuring that the multi-tasking animation can be displayed normally and avoiding the creation of unnecessary resources.
[0012] In one possible design, the condition for the end of the last multi-tasking animation includes the existence of a first mark or the value of the second mark is a first preset value. The first mark is set when the last multi-tasking animation ends. The value of the second mark is the first preset value and is set when the last multi-tasking animation ends. Based on this, the electronic device can determine whether the last multi-tasking animation ends accurately by the value of the first mark or the second mark.
[0013] In one possible design, after the window of the first application and the first background card corresponding to the window of the first application are changed synchronously based on the first resource, the electronic device clears the first mark or sets the value of the second mark to a second preset value, thereby indicating that the multi-tasking animation is in operation.
[0014] Correspondingly, after clearing the first mark or setting the value of the second mark to the second preset value, the electronic device receives a second operation (such as the user's finger leaves the screen), and the second operation is used to end the multitasking animation. In response to the second operation, the second interface is displayed. And the current multitasking animation becomes the previous multitasking animation. The electronic device can set the first mark, or set the value of the second mark to the first preset value to indicate that the current multitasking animation has ended, so as to avoid the electronic device mistakenly thinking that the current multitasking animation has not ended due to the failure to clear the first resource corresponding to the current multitasking animation.
[0015] Optionally, the second interface may be a desktop, a desktop including a window of the first application, a multi-tasking interface or an interface provided by a background application.
[0016] In one possible design, the electronic device includes a desktop launcher and a shell. When the multi-tasking animation ends, the electronic device responds to the first operation and clears the first resource. The first resource includes resources related to the multi-tasking animation display held by the desktop launcher and resources related to the multi-tasking animation display held by the shell (i.e., system-side resources), thereby avoiding resource occupation.
[0017] The resources held by the desktop launcher are cleared asynchronously with the system resources. In other words, the system resources and the resources held by the desktop launcher are not cleared synchronously. Optionally, the electronic device may clear the system resources first, and then clear the resources held by the desktop launcher.
[0018] In a possible design, the preset condition may also include that the electronic device is in a multi-tasking scheduling mode. In addition, if the electronic device is not in a multi-tasking scheduling mode, the first operation is not used to trigger a multi-tasking animation, but is used to trigger the display of other special effects, such as displaying a multi-tasking interface including a window of a background application.
[0019] In a possible design, the preset condition may also include the existence of a second resource. If the second resource does not exist, the electronic device does not have a resource corresponding to the multi-task animation effect that can be reused, and the electronic device needs to create the first resource to run the multi-task animation effect based on the first resource to achieve synchronous changes in the window of the first application and the first background card.
[0020] In a possible design, generally speaking, when clearing resources corresponding to multi-task animations, the instance of the animation controller is cleared last, so the electronic device can determine whether the second resource exists by judging whether there is an instance of the animation controller. If there is an instance of the animation controller, the electronic device can determine that the second resource exists. If there is no instance of the animation controller, the electronic device determines that the second resource does not exist.
[0021] In a second aspect, the present application provides an electronic device, comprising a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the display screen is used to display an image generated by the processor, and the memory is used to store computer program code, wherein the computer program code comprises computer instructions; when the processor executes the computer instructions, the electronic device executes the method described above.
[0022] In a third aspect, the present application provides a chip, the chip comprising a communication interface and at least one processor:
[0023] The communication interface is used to input and / or output signaling or data;
[0024] The at least one processor is used to execute a computer program to implement the method described above.
[0025] In a fourth aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enable the electronic device to execute the method described above.
[0026] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described above when executed by a processor.
[0027] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second aspect, the chip described in the third aspect, the computer-readable storage medium described in the fourth aspect, and the computer program product described in the fifth aspect provided above can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1A A schematic diagram of a multi-task scheduling mode provided in an embodiment of the present application;
[0029] Figure 1B A second schematic diagram of a multi-task scheduling mode provided in an embodiment of the present application;
[0030] Figure 1CA scenario diagram of a multi-task scheduling mode provided in an embodiment of the present application Figure 3 ;
[0031] Figure 1D A scenario diagram of a multi-task scheduling mode provided in an embodiment of the present application Figure 4 ;
[0032] Figure 2A A first schematic diagram of a display of a multi-task dynamic effect provided in an embodiment of the present application;
[0033] Figure 2B A second schematic diagram of a multi-task dynamic effect display provided in an embodiment of the present application;
[0034] Figure 2C A display diagram of a multi-task dynamic effect provided in an embodiment of the present application Figure 3 ;
[0035] Figure 2D A display diagram of a multi-task dynamic effect provided in an embodiment of the present application Figure 4 ;
[0036] Figure 2E A display diagram of a multi-task dynamic effect provided in an embodiment of the present application Figure 5 ;
[0037] Figure 2F A display diagram of a multi-task dynamic effect provided in an embodiment of the present application Figure 6 ;
[0038] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0039] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0040] Figure 5 A flowchart of a method for displaying dynamic effects provided in an embodiment of the present application is shown in FIG1 ;
[0041] Figure 6 A second flowchart of a method for displaying dynamic effects provided in an embodiment of the present application;
[0042] Figure 7 A schematic diagram of a method for displaying dynamic effects provided in an embodiment of the present application Figure 3 ;
[0043] Figure 8 A schematic diagram of a multi-task interface provided in an embodiment of the present application;
[0044] Fig. 9 A schematic diagram of a method for displaying dynamic effects provided in an embodiment of the present application Figure 4 ;
[0045] Fig.10 A schematic diagram of a method for displaying dynamic effects provided in an embodiment of the present application Figure 5 ;
[0046] Fig.11 A second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0047] Fig.12 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. 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 design. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "multiple" 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, which can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following items (individuals)" or similar expressions thereof refer to any combination of these items, including any combination of single items (individuals) or plural items (individuals). 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. In the embodiments of the present application, "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, the meaning of "multiple" is two or more.
[0049] To facilitate user use, electronic devices (such as tablet computers) provide a multi-tasking scheduling mode (or free screen mode). In the multi-tasking scheduling mode, the tablet computer can simultaneously display one or more application windows in the foreground in the form of floating windows. Figure 1A In response to the click operation of the switch 11, the electronic device enters the multi-tasking scheduling mode. Figure 1BThe music APP12 shown in the figure, the electronic device displays as follows Figure 1C The window 13 of the music APP shown is a floating window. When the user wants to continue to open other applications, the other applications can be triggered, and the electronic device continues to display the windows of other applications, such as Figure 1D As shown, the electronic device not only displays the window 13 of the music APP, but also displays the window 14 of the gallery APP. Figure 1A The display state of the switch 11 shown, Figure 1B The display state of the switch 15 shown changes, that is, after entering the multi-task scheduling mode, the display state of the switch used to trigger the tablet computer to enter the multi-task scheduling mode will change, so that the user can intuitively know that the tablet computer is currently in the multi-task scheduling mode. Of course, after entering the multi-task scheduling mode, the display state of the switch may not change.
[0050] During the multitasking scheduling mode, when the user slides up from the bottom of the tablet computer's desktop (i.e., the bottom of the tablet computer's screen), the tablet computer displays a multitasking animation (or alternatively describes it as a recents animation). Following the user's sliding operation, the tablet computer synchronizes the window of the recently run application with the background card where the window is located, such as synchronously scaling, moving, etc. The window of the recently run application includes the window of the application displayed in the foreground. See Figure 2A As shown, the multi-task animation includes a background card 16, the window 13 of the music APP, and the window 14 of the gallery APP. From the user's visual perspective, the window 13 of the music APP and the window 14 of the gallery APP are located in the background card 16. Among them, the music APP and the gallery APP are applications displayed in the foreground.
[0051] Following the user's sliding operation, the tablet computer synchronizes changes to the window of the application running in the foreground and the background card, such as synchronous movement and scaling. For example, see Figure 2B As the user continues to slide upward, the window 13 of the music APP, the window 14 of the gallery APP and the background card 16 move and shrink synchronously. Figure 2C As the user slides down, the window 13 of the music APP, the window 14 of the gallery APP and the background card 16 move synchronously and enlarge. In addition, optionally, the multitasking effect can also include the window of the application running in the background, see Figure 2B or Figure 2C A window 20 of a short video application in the video player. The display form of the window 20 can be a picture.
[0052] When the user lifts his hand off the screen, the multitasking animation ends, the tablet returns to the application, and continues to display the window of the application running in the foreground, such as Figure 2DThe window 13 of the music app and the window 14 of the gallery app are shown. It is understandable that the above multi-tasking animation effect is only a possible example of returning to the application at the end of the multi-tasking animation effect. At the end of the multi-tasking animation effect, the tablet computer may also return to the desktop. Or at the end of the multi-tasking animation effect, it directly switches to the multi-tasking interface, which includes the window of the application running in the background, that is, the background running task. Or, at the end of the multi-tasking animation effect, the tablet computer switches to the application running in the background and displays the window running in the background, such as displaying the window running in the background in full screen.
[0053] It should be noted that triggering an electronic device to enter a multi-tasking scheduling mode through the above-mentioned switch (such as the above-mentioned switch 11) is only an example. The tablet computer can also trigger the electronic device to enter a multi-tasking scheduling mode in other ways, such as through specific gestures, etc., and this application does not limit it. In addition, the above-mentioned switch (i.e., the icon of the switch) can be located at a specific position of the desktop, such as the edge area of the desktop, i.e., in the dock area, or it can be located at any position of the desktop, and this application does not limit it. And in the multi-tasking scheduling mode, the user can choose to open the application in the dock area to display the window of the application on the desktop. Of course, the user can also choose to open any application on the desktop, and this application also does not limit it.
[0054] After a multitasking animation ends, when the user swipes up from the bottom of the desktop again within a short period of time, it indicates that a new (or described as a new round) multitasking animation needs to be started. However, although the last multitasking animation has ended, the resources corresponding to the last multitasking animation may not have been cleaned up, causing the tablet computer to mistakenly believe that the last multitasking animation has not ended. The electronic device continues to run the last multitasking animation based on the swipe-up operation input this time. However, since the resources of the last multitasking animation are already in the cleanup stage, the tablet computer cannot be used, making it impossible for the tablet computer to continue the last multitasking animation, resulting in abnormal display of the multitasking animation, such as causing the window of the application displayed on the foreground of the tablet computer to not change synchronously with the background card, such as not scaling synchronously, and not moving synchronously, causing visual confusion for the user.
[0055] Continuing with the above example, in response to the user from the above Figure 2D When you slide up the bottom of the desktop shown, the tablet starts to display Figure 2E The multi-tasking animation shown, Figure 2E Including window 13 of the music app, window 14 of the gallery app and background card 23. The background card 23 becomes smaller, but the window 13 of the music app and the window 14 of the gallery app do not change, resulting in abnormal display of multi-task dynamic effects, visual confusion, and poor user experience.
[0056] In addition, optionally, the window of the most recently run application also includes the window of the application running in the background (referred to as the window of the background application). Correspondingly, the multi-tasking animation may also include the animation of the background task card. Since the display mechanism of the window of the application running in the background and the window of the application displayed in the foreground (referred to as the window of the foreground application) in the multi-tasking animation is different, such as the window of the application running in the background is displayed in the form of a picture (or expressed as a view), and the window of the application displayed in the foreground is displayed in the form of a layer, therefore, when the user swipes up from the bottom of the desktop again within a short time, the tablet computer can normally scale the window of the application running in the background, so that the animation of the background task card is displayed normally, see Figure 2F The short video APP window 24 shown is shrunk normally.
[0057] Therefore, in response to the above problems, the present application provides a new dynamic effect display solution. After a multi-tasking dynamic effect ends, the electronic device can set a dynamic effect end mark. Afterwards, when the electronic device receives a swipe up operation from the bottom of the desktop again, the electronic device determines whether there is a dynamic effect end mark. If there is a dynamic effect end mark, the electronic device determines that the last multi-tasking dynamic effect has ended, and the swipe up operation is used to trigger the start of a new round of multi-tasking dynamic effects, then the electronic device starts running a new round of multi-tasking dynamic effects, that is, the electronic device synchronizes the window of the application displayed in the foreground with the background card, such as synchronous scaling, movement, etc., so as to ensure the normal display of the multi-tasking dynamic effect and avoid visual confusion. If there is no dynamic effect end mark, the electronic device determines that the last multi-tasking dynamic effect has not ended, and the swipe up operation is used to trigger the continuation of the last round of multi-tasking dynamic effects. In short, the swipe up operation is the input operation of the last round of multi-tasking dynamic effects. Therefore, the electronic device can continue to run the last round of multi-tasking dynamic effects, ensure the normal display of the multi-tasking dynamic effects, and improve the user experience.
[0058] It should be noted that the swipe up operation from the bottom of the desktop described above is only an exemplary gesture operation for triggering the electronic device to start the multi-tasking animation. The multi-tasking animation can also be triggered by other trigger operations. This application does not limit the specific type of trigger operation and the input position of the trigger operation. For example, the user can trigger the electronic device to start the multi-tasking animation by inputting a swipe up operation at any position on the desktop, that is, on the screen.
[0059] Exemplarily, the electronic device in the embodiments of the present application may be a tablet computer, a mobile phone, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR)\virtual reality (VR) device, and other electronic devices with a display screen (or screen). The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0060] Figure 3 A schematic structural diagram of an electronic device 100 is shown.
[0061] 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 module 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.
[0062] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some 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.
[0063] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0064] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0065] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0066] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0067] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0068] The charging management module 140 is used to receive charging input from a charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the electronic device 100.
[0069] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0070] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0071] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as Wi-Fi (wireless fidelity) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., applied to the electronic device 100.
[0072] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0073] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects 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 that execute program instructions to generate or change display information.
[0074] 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 1 or N display screens 194, where N is a positive integer greater than 1.
[0075] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0076] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0077] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0078] Among them, 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, and the like.
[0079] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0080] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0081] The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.
[0082] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
[0083] Figure 4 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
[0084] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0085] The application layer can include a series of application packages.
[0086] like Figure 4 As shown, the application package may include camera, gallery, calendar, call, map, navigation, Bluetooth, music, video, short message, desktop launcher, desktop and other applications.
[0087] The desktop launcher is used to start the multi-tasking animation in response to the user's trigger operation. The desktop launcher can also control how the multi-tasking animation runs according to the user's trigger operation, such as controlling the window of the recently run application to change synchronously with the background card. The recently run application represents the recently run task, which may include the application displayed in the foreground as a floating window. Optionally, the recently run application may also include the application running in the background.
[0088] In addition, when the multitasking animation ends, the desktop launcher releases the resources it holds.
[0089] 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.
[0090] like Figure 4 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a shell, a core, and the like.
[0091] The shell (or wm-shell) is used to construct system resources such as animation objects (targat) when multi-task animation is started. In addition, when the multi-task animation ends, the system resources are released.
[0092] Core (or wm-core) is used for multi-tasking transitions, such as switching the foreground application to the background and the desktop application to the foreground.
[0093] The above shell and core belong to the system switching framework (shell transition).
[0094] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0095] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0096] 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.
[0097] The system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), graphics synthesizer (SurfaceFlinger), etc.
[0098] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0099] 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.
[0100] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0101] A 2D graphics engine is a drawing engine for 2D drawings.
[0102] SurfaceFlinger is used to manage layers, such as creating the layer corresponding to the window of the application displayed in the foreground in the multi-tasking animation.
[0103] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0104] The above introduces the software architecture of electronic devices in detail. The following will combine this software architecture and take the operation of swiping up from the bottom of the desktop as an example to introduce the process of displaying multi-tasking animations multiple times in a short period of time. Figure 5 As shown, the process may include:
[0105] S201. In a multi-task scheduling mode, a desktop launcher receives a down event at the bottom of the desktop.
[0106] Generally speaking, the swipe up operation is that the user first presses the finger on the screen, and then moves the finger upward. Pressing the finger corresponds to a down event, and moving the finger corresponds to a move event. Therefore, in the multitasking scheduling mode, after the user presses the finger at the bottom of the screen, that is, the bottom of the desktop, the desktop launcher receives the down event at the bottom of the desktop to trigger the multitasking animation.
[0107] S202, the desktop launcher creates a multi-task animation callback and sends a request 1 to the shell. Request 1 is used to start the multi-task animation.
[0108] S203, the shell creates an instance of the motion effect controller in response to request 1, and sends request 2 to the core. Request 2 is used to trigger the start of multi-task transition.
[0109] Among them, multi-task transition means switching the foreground application to the background and switching the desktop application to the foreground. The motion effect controller is used to control the operation of multi-task motion effects.
[0110] In addition, multi-task transitions can be called reccents transitions, and the above-mentioned motion effect controller is also called a recents controller.
[0111] S204. In response to request 2, the core traverses the windows of the application displayed in the foreground, obtains the motion effect elements, and starts the multi-task transition.
[0112] The foreground application refers to the application displayed in the foreground of the electronic device before the multi-task animation is started. That is, the application displayed in the form of a floating window in the multi-task scheduling mode. The animation element refers to the window of the application running in the foreground of the electronic device.
[0113] S205, core sends request 3 to shell. Request 3 carries an animation element, which is used to trigger system-side resources for creating multi-task animation.
[0114] S206. In response to request 3, for each animation element, the shell constructs an animation object corresponding to the animation element.
[0115] Among them, the animation object corresponds to the animation element one by one. The corresponding animation element can be controlled through the animation object, that is, the floating window displayed in the foreground can be controlled. Correspondingly, the animation object can be understood as the floating window object. In this application, the shell receives the above request 3, indicating that it is necessary to start displaying multi-task animation, and the shell traverses the animation elements to determine each animation element.
[0116] S207, the shell sends the animation object corresponding to each animation element to SurfaceFlinger.
[0117] S208. SurfaceFlinger creates a dynamic effect layer based on the dynamic effect object corresponding to the dynamic effect element.
[0118] The above mentioned animation layer is used to display animation elements, such as Figure 2A The layer where the window 13 of the music APP is shown.
[0119] S209. The shell sends the instance of the motion effect controller and the motion effect objects corresponding to each motion effect element to the desktop launcher through the above motion effect callback.
[0120] S210: After the desktop launcher obtains the instance information of the motion effect controller and the motion effect object, for each motion effect object, a motion effect simulator corresponding to the motion effect object is created.
[0121] Among them, the motion effect simulator is used to control the motion effect object of the object, thereby realizing the control of the motion effect elements.
[0122] Exemplarily, after the desktop launcher obtains the instance of the motion controller (i.e., the instance information) and the motion object (i.e., the motion object information), it indicates the need to start displaying multi-tasking motion (onAnimationStart), and then it traverses the motion objects to create a motion simulator corresponding to each motion object.
[0123] S211. The desktop launcher creates a background card 1 through an instance of the motion effect controller, and the background card 1 corresponds to the window of the application displayed in the foreground.
[0124] The above S201-S211 introduces the process of starting the multi-task animation effect in response to the down event. The following will continue to introduce the process of updating the multi-task animation effect based on the move event, that is, the process of running the multi-task animation effect.
[0125] S212. The desktop launcher receives a move event.
[0126] When the user swipes up from the bottom of the desktop, after receiving the user's down event, the desktop launcher can then receive the move event, so as to use the move event to continue running the multi-tasking animation.
[0127] S213: In response to the move event, the desktop launcher determines the motion effect information, wherein the motion effect information includes the background card 1 and the target position and target size of the window of the foreground application.
[0128] Among them, the target position and target size of the background card 1 and the window of the foreground application may belong to the foreground task animation information.
[0129] S214. The desktop launcher sends the above-mentioned motion effect information to SurfaceFlinger based on the motion effect simulator.
[0130] Exemplarily, the desktop launcher may first determine the progress of the animation corresponding to the user's sliding information. The sliding information may include information such as the user's sliding distance and sliding speed. The animation progress indicates the progress of the multi-task animation required to be played under the sliding information, that is, the target size, target position, etc. of the foreground application window and its corresponding background card 1. Afterwards, the desktop launcher may determine the animation information based on the animation progress, so as to use the animation information to control the operation of the multi-task animation, so that the display of the multi-task animation matches the animation progress.
[0131] Taking the sliding information including the sliding distance as an example, the desktop launcher can search for the dynamic progress corresponding to the sliding distance, such as 50%. The 50% corresponds to the size and position of the window of the foreground application and the background card 1, so it is necessary to scale the window of the foreground application to the size of the window of the foreground application corresponding to 50%, and move it to the position of the window of the foreground application corresponding to 50%. Similarly, it is necessary to scale the background card 1 to the size of the background card corresponding to 50%, and move it to the position of the background card corresponding to 50%, so as to achieve the synchronous scaling and movement of the window of the foreground application and its corresponding background card 1.
[0132] S215. SurfaceFlinger updates the layer where the window of the foreground application is located based on the above-mentioned dynamic effect change information.
[0133] It should be understood that the desktop launcher uses the motion simulator and SurfaceFlinger to update the window of the corresponding foreground application accordingly.
[0134] S216. The desktop launcher updates the background card 1 through the instance of the motion effect controller based on the above motion effect change information.
[0135] Exemplarily, the desktop launcher can update the background card 1 through SurfaceFlinger.
[0136] In some embodiments, the above-mentioned dynamic effect change information may also include other information, such as attribute information such as the rounded corners of the background card 1. Accordingly, the desktop launcher may update the background card 1 and the window of the foreground application accordingly.
[0137] In some embodiments, when the window of the foreground application and the background card 1 are reduced, the electronic device can also display the window of the background application. Therefore, the multi-task animation also includes the animation of the background task card. Accordingly, the animation information includes not only the foreground task animation information, but also the background task animation information. Similar to the foreground task animation information, the background task animation information can include the window of the background application and the background card 2 corresponding to the window of the background application (see Figure 2B The target size and target position of the window 20 of the short video application and the background card where it is located are shown. The desktop launcher can update the window of the background application and the background card 2 based on the background task motion effect information through the instance of the motion effect controller.
[0138] The above describes the process of controlling the running of multitasking animations as the user slides. When the user lifts his hand away from the screen, the electronic device ends the multitasking animation. The following will continue to describe the process of ending the multitasking animation.
[0139] S217: The desktop launcher receives an up event, wherein the up event is used to trigger the end of the multitasking animation.
[0140] When the user lifts his hand away from the screen, the desktop launcher receives the corresponding up event, indicating that the multitasking animation needs to be ended.
[0141] S218: The desktop launcher sends request 4 to the shell. Request 4 is used to end the multi-tasking animation.
[0142] In some embodiments, the desktop launcher can also determine the animation target based on the user's current sliding information. The animation target represents the interface displayed when the multitasking animation ends, such as returning to the application, returning to the desktop, switching to the multitasking interface, and switching to the application running in the background. For example, if the sliding distance is too small, the desktop launcher determines that the animation target is to return to the application. In short, the multitasking animation is canceled.
[0143] S219, in response to request 4, the shell cleans up system side resources and sends request 5 to the core. Request 5 is used to trigger the end of the multi-task animation transition. System side resources include the above-mentioned animation objects.
[0144] Optionally, the system side may also include other resources, such as an instance of the created motion effect controller, a layer where the window of the foreground application is located, and the like.
[0145] S220. In response to request 5, the core ends the multitasking transition.
[0146] In the embodiment of the present application, the core switches the desktop application to the background again in response to request 5. In addition, the core can also switch the foreground application equivalent to the background application (i.e., the application displayed in the form of a floating window before the multitasking transition) back to the foreground.
[0147] S221, the desktop launcher cleans up the resources held by the desktop launcher. The resources held by the desktop launcher include the above-mentioned motion effect simulator.
[0148] Optionally, the resources held by the desktop launcher may also include other resources, such as an instance of a motion effect controller, the above-mentioned background card 1, background card 2, etc. In addition, it can be understood that the instance of the motion effect controller held by the desktop launcher can be obtained by further encapsulating the instance of the motion effect controller transmitted by the shell. The change of multi-task animation depends on the instance of the motion effect controller. In addition, the desktop launcher can encapsulate the motion effect simulator or the motion effect object in the instance of the motion effect controller, so that the corresponding motion effect object, that is, the window of the foreground application, can be controlled accordingly through the instance of the motion effect controller in combination with the motion effect simulator.
[0149] The above describes the process from the start to the end of the first multitasking animation. When the first multitasking animation ends, the resources corresponding to the multitasking animation need to be cleaned up. During the cleaning period, if the user inputs an upward sliding action from the bottom of the desktop, the electronic device needs to start the second multitasking animation. The following will continue to introduce the implementation process of the electronic device starting the second multitasking animation.
[0150] S222: While clearing the resources corresponding to the multi-tasking animation effect, the desktop launcher receives a down event at the bottom of the desktop again.
[0151] The cleanup operation of the resources held by the above desktop launcher and the cleanup operation of the above system-side resources are asynchronous operations and are not performed at the same time. During the clearing of resources corresponding to the multitasking animation or clearing of system-side resources, the user may input the swipe up operation from the bottom of the desktop again. Correspondingly, the desktop launcher will receive the corresponding down event again, indicating that the multitasking animation needs to be started again.
[0152] S223, the desktop launcher determines whether the last multi-tasking animation has ended.
[0153] Exemplarily, the desktop launcher can determine whether the last (i.e., the first time mentioned above) multitasking has ended by judging whether there are resources corresponding to the multitasking animation. If there are resources held by the desktop launcher and / or system-side resources, it indicates that there are resources corresponding to the multitasking animation, and the desktop launcher determines that the last multitasking animation has not ended. If there are no resources held by the desktop launcher and no system-side resources, it indicates that there are no resources corresponding to the multitasking animation, and the desktop launcher determines that the last multitasking animation has ended.
[0154] Optionally, generally speaking, since the system side resources are cleaned up first and then the resources held by the desktop launcher are cleaned up, if there are no resources held by the desktop launcher, the desktop launcher can determine that the last multi-tasking animation has ended. If there are resources held by the desktop launcher, the desktop launcher determines that the last multi-tasking animation has not ended.
[0155] Optionally, since the instance of the motion effect controller held by the desktop launcher is generally cleaned up (i.e., cleared) last, the desktop launcher can determine whether there are resources corresponding to the last multi-tasking motion effect by judging whether there is an instance of the motion effect controller it holds. In the case that there is no instance of the motion effect controller, it is determined that there are no resources corresponding to the last multi-tasking motion effect, and the last multi-tasking motion effect has ended. In the case that there is an instance of the motion effect controller, it is determined that there are resources corresponding to the last multi-tasking motion effect, and the last multi-tasking motion effect has not ended.
[0156] S224: When the last multi-tasking animation has not ended, the desktop launcher reuses the resources corresponding to the last multi-tasking animation.
[0157] Exemplarily, the desktop launcher creates an animation callback in response to a down event, and starts to start multi-tasking animations, so as to reuse system-side resources through the animation callback.
[0158] S225. The desktop launcher completes cleaning up the resources held by the desktop launcher.
[0159] S226. In response to the move event, the desktop launcher determines the motion effect information.
[0160] S227. Based on the motion effect information, the desktop launcher does not make corresponding changes to the window of the foreground application, but makes corresponding changes to the background card 1.
[0161] In the embodiment of the present application, since the resources corresponding to the last multi-tasking animation have been cleared, the process of controlling the multi-tasking animation by the desktop launcher is interrupted, and the resources corresponding to the last multi-tasking cannot be used to make corresponding changes to the window of the foreground application, so that as the user slides, the electronic device cannot scale or move the window of the foreground application. In addition, the background card (such as the above-mentioned background card 1) changes. For example, the above-mentioned background card 1 can be understood as a view, and the desktop launcher can normally make corresponding changes to the background card 1.
[0162] Optionally, the window of the background application and its corresponding background card 2 may also be understood as a view, and the desktop launcher may normally make corresponding changes to the window of the background application and its corresponding background card 2 according to the move event.
[0163] S228. When the last multi-tasking animation ends, the desktop launcher returns to the above S214.
[0164] From the above content, it can be seen that when a multitasking animation ends, the electronic device needs to clean up the resources corresponding to the multitasking animation. The resources include system-side resources and resources held by the desktop launcher. And when the multitasking animation is started continuously, the next time the multitasking animation is started, the electronic device will determine whether the last multitasking animation has ended to determine whether the current multitasking animation can reuse the resources corresponding to the last multitasking animation.
[0165] Specifically, in the stage of cleaning up the resources corresponding to the multitasking animation, the electronic device will first clean up the system-side resources. Then, it will asynchronously clean up the resources held by the desktop launcher. Since cleaning takes a certain amount of time, if the user triggers the start of the second multitasking animation during the cleaning period, the electronic device will determine whether the previous multitasking animation has ended. If it has not ended, the electronic device uses the resources corresponding to the previous multitasking animation to display the corresponding multitasking animation this time. However, at this time, the resources corresponding to the previous animation have been cleaned up or only a few resources have not been cleaned up, resulting in the electronic device being unable to use the resources to achieve the normal display of the multitasking animation this time, such as being unable to make corresponding changes to the window of the foreground application, such as scaling or moving, resulting in abnormal display of the multitasking animation. It should be understood that when the multi-tasking animation is started again, if the electronic device determines that the last multi-tasking animation has not been completed, the electronic device will mistakenly believe that the operation of triggering the start of the multi-tasking animation this time is for the last multi-tasking animation, and the electronic device will continue to run the last multi-tasking animation based on this operation, thereby reusing the resources of the last multi-tasking animation and synchronously changing the window of the foreground application and the corresponding background card. However, since the resources of the last multi-tasking animation have actually been cleared, the change is abnormal, resulting in abnormal display of the multi-tasking animation.
[0166] In some embodiments, if an operation that triggers the start of a multitasking animation is received before the resources corresponding to the multitasking animation are cleaned up (such as receiving a down event at the bottom of the desktop), since the electronic device has not cleaned up the resources corresponding to the previous multitasking animation, the electronic device can reuse the resources corresponding to the previous multitasking animation normally, thereby achieving the normal operation of the multitasking animation and preventing interface confusion. Figure 6 As shown, after receiving the first swipe up operation from the bottom of the desktop input by the user, the electronic device starts to start the first multi-tasking animation and creates system-side resources. In addition, the electronic device also creates the resources held by the desktop launcher. Afterwards, with the user's sliding operation, the first multi-tasking animation is run (that is, the window of the foreground application and the corresponding background card are controlled to change synchronously). Afterwards, after the electronic device receives the swipe up operation from the bottom of the desktop for the second time, it determines that the first multi-tasking animation has not ended. Afterwards, the electronic device responds to the second swipe up operation, and based on the resources corresponding to the first multi-tasking animation, continues to run the first multi-tasking animation, and the window of the foreground application changes synchronously with the background card, and there will be no interface confusion. Afterwards, after the user raises his hand to leave the screen, the electronic device ends the first multi-tasking animation, cleans up the system-side resources, and then cleans up the resources held by the desktop launcher in the electronic device.
[0167] Based on this, in order to solve the problem of abnormal display of multi-task animation effects when the multi-task animation effects are triggered multiple times continuously, this application provides an animation display solution to ensure the normal display of multi-task animation effects. Figure 7 S301-S309 shown.
[0168] S301: The electronic device displays a window of application 1. The window of application 1 is displayed in a floating window.
[0169] The number of the above-mentioned application 1 (or referred to as the first application) can be one or more. The interface where the window of the application 1 is located, that is, the desktop, can be referred to as the first interface.
[0170] S302: The electronic device receives a swipe up operation from the bottom of the desktop, wherein the swipe up operation from the bottom of the desktop is used to trigger the multi-tasking animation.
[0171] Among them, the swiping up from the bottom of the desktop is only one possible operation that can trigger the first operation of starting the multitasking animation effect.
[0172] S303: In response to the above sliding up operation, the electronic device determines whether it is in a multi-tasking scheduling mode.
[0173] When the device is not in the multi-tasking scheduling mode, it indicates that the above-mentioned sliding up operation is not used to trigger the multi-tasking animation effect, but is used to trigger other animation effects, and the electronic device can execute S304.
[0174] In the case of being in the multi-tasking scheduling mode, it indicates that the above-mentioned sliding up operation is used to trigger the multi-tasking animation, and the electronic device can execute S305.
[0175] S304: The electronic device displays a multi-tasking interface.
[0176] For example, when the multitasking mode is not in progress, if the user slides up from the bottom of the desktop, the electronic device receives the upward sliding operation from the bottom of the desktop, and the electronic device displays the multitasking interface, such as Figure 8 In some implementations, displaying the multitasking interface can also be understood as the animation of starting a background task card.
[0177] S305: The electronic device determines whether there are resources corresponding to the multi-task animation effect.
[0178] In the embodiment of the present application, when there are no resources corresponding to the multi-tasking animation effect, the electronic device directly starts a new round of multi-tasking animation effect, and the electronic device can execute S306.
[0179] When there are resources corresponding to the multi-tasking animation, it indicates that the last multi-tasking animation may not have ended. The sliding up action from the bottom of the desktop in the above S302 may be input during the running of the last multi-tasking animation, or may be input during the cleaning of the resources corresponding to the last multi-tasking animation. Therefore, the electronic device can execute S307 and further judgment is needed to determine whether the resources corresponding to the last multi-tasking animation are available.
[0180] Among them, the process of the electronic device determining whether there are resources corresponding to the multi-task animation effect can refer to the relevant description above, such as the example of determining whether there is an animation effect controller, which will not be repeated here.
[0181] S306: The electronic device creates resources corresponding to the multi-task animation effect, and based on the resources corresponding to the multi-task animation effect, synchronously changes the window of application 1 and the background card where the window of application 1 is located.
[0182] For example, in the absence of resources corresponding to the multi-task animation effect, the electronic device directly starts a new multi-task animation effect, such as creating resources corresponding to the multi-task animation effect, so as to utilize the resources and control the normal operation of the multi-task animation effect, so that as the user slides, the window of application 1 and the background card (or first background card) where the window of application 1 is located are synchronously scaled and moved. Specifically, the electronic device can execute the above S202-S217.
[0183] S307: The electronic device determines whether there is an animation end mark, wherein the animation end mark is set when the last multi-task animation ends.
[0184] In the case where there is an animation end mark (or called the first mark), it indicates that the last multi-tasking animation has ended, and the above-mentioned sliding up action from the bottom of the desktop is input during the period of clearing the resources corresponding to the last multi-tasking animation, then the electronic device cannot directly reuse the resources corresponding to the last multi-tasking animation, otherwise the electronic device may display abnormal multi-tasking animations. Therefore, the electronic device needs to start a new multi-tasking animation, and the electronic device can execute S308.
[0185] In the absence of an animation end mark, it indicates that the last multitasking animation has not ended. The above sliding up action from the bottom of the desktop was input during the last multitasking animation. Therefore, refer to the above Figure 6 In the process shown, the electronic device can continue the last multi-tasking animation based on the resources corresponding to the last multi-tasking animation to ensure the normal display of the multi-tasking animation, and the electronic device can execute S309.
[0186] In some embodiments, the above-mentioned determination of whether there is an animation end mark is only an example of determining whether the last multi-tasking animation has ended, and the electronic device can also determine whether the last multi-tasking animation has ended by the value of the second mark. When the value of the second mark is the first preset value, it indicates that the last multi-tasking animation has ended, and when the value of the second mark is the second preset value, it indicates that the last multi-tasking has not ended. In other words, the electronic device can determine whether the conditions for the end of the last multi-tasking animation are met. If the conditions for the end of the last multi-tasking animation are met, the electronic device can execute S308 below. If the conditions for the end of the last multi-tasking animation are not met, the electronic device can execute S309 below.
[0187] The conditions for the end of the last multitasking animation include the existence of a first mark, or the value of the second mark is a first preset value. Among them, when the last multitasking animation ends, the electronic device can set the first mark, and accordingly, the electronic device has the first mark. Alternatively, the electronic device can set the value of the second mark to the first preset value. During the display of the last multitasking animation, that is, before the user raises his hand to leave the screen, the electronic device does not have the first mark, or the value of the second mark is the second preset value.
[0188] In some embodiments, after the above S307, the electronic device has determined that the last multi-tasking animation has ended and the first mark or the first preset value can no longer be used, then the electronic device can clear the first mark or set the second mark to the second preset value to accurately indicate that the current multi-tasking animation is in operation. Correspondingly, after the user lifts his hand away from the screen, the electronic device can end the multi-tasking animation, then the electronic device sets the first mark again so that the electronic device has the first mark, or updates the second mark to the first preset value to indicate that the current multi-tasking animation is over.
[0189] Optionally, the user raising his hand away from the screen is only one possible operation to trigger the second operation of receiving the multi-tasking animation effect. The second operation can also be other operations, such as the user's finger remaining still on the screen for a long time.
[0190] S308: The electronic device creates resources corresponding to the multi-task animation effect, and based on the created resources corresponding to the multi-task animation effect, synchronously changes the window of application 1 and the background card where the window of application 1 is located.
[0191] The resource corresponding to the created multi-task animation effect may be referred to as the first resource, which is related to the display of the multi-task animation effect. The implementation process of S308 may refer to the relevant introduction of S306 above, which will not be repeated here.
[0192] S309: The electronic device synchronously changes the window of application 1 and the background card where the window of application 1 is located based on the resources corresponding to the last multi-tasking animation.
[0193] Among them, the resource corresponding to the last multi-tasking animation effect can be called a second resource, which is related to the display of the last multi-tasking animation effect.
[0194] In some embodiments, the pseudo code involved in the above S303-S309 includes:
[0195] if (multi-task scheduling mode && there is an end mark for the dynamic effect) {
[0196] Start a new multitasking effect
[0197] }else{
[0198] Continue the last multitasking animation
[0199] }.
[0200] In some embodiments, when the electronic device changes the window of application 1 and the background card where the window of application 1 is located synchronously, the window of the background application and the background card corresponding thereto may also be changed accordingly. In other words, the multi-tasking animation effect of the electronic device may also include the animation effect of the background task card.
[0201] In the dynamic effect display scheme provided in the present application, when a multi-task dynamic effect ends, the electronic device sets the dynamic effect end mark, and then cleans up the resources corresponding to the multi-task dynamic effect. Afterwards, when receiving a swipe up operation from the bottom of the desktop, the electronic device can determine whether there are resources corresponding to the multi-task dynamic effect and whether it is in the multi-task scheduling mode to avoid unnecessary dynamic effect end mark judgment. When the electronic device has resources corresponding to the multi-task dynamic effect and the electronic device is in the multi-task scheduling mode, it indicates that the electronic device currently needs to start a new round of multi-task dynamic effects, and the electronic device determines whether there is a multi-task dynamic effect mark. If it exists, it indicates that the previous round of multi-task dynamic effects has ended, then the electronic device can start a new round of multi-task dynamic effects, that is, create resources corresponding to new multi-task dynamic effects, so as to use the resources to run multi-task dynamic effects, and ensure that the multi-task dynamic effects are displayed normally, thereby avoiding the asynchronous cleanup of resources that causes the electronic device to mistakenly believe that the resources corresponding to the previous round of multi-task dynamic effects can be used to run the current round of multi-task dynamic effects, thereby preventing the interface confusion caused by abnormal interruption of multi-task dynamic effects and improving user satisfaction.
[0202] It should be noted that the numbering of the above steps does not represent the execution order of the steps. For example, the above S303 can be executed first, and then the above S305 can be executed. Alternatively, the above S305 can be executed first, and when there are resources corresponding to the multi-task animation, the above S303 can be executed to determine whether it is in the multi-task scheduling mode. Alternatively, the above S303 and S305 can be executed at the same time, that is, the electronic device determines in parallel whether there are resources corresponding to the multi-task animation and whether it is in the multi-task scheduling mode. When there are resources corresponding to the multi-task animation and it is in the multi-task scheduling mode, the electronic device can execute S307 to determine whether there is an animation end mark.
[0203] In addition, the above S303 and S305 are optional steps. The electronic device may not determine whether there are resources corresponding to the multi-tasking animation, but directly determine whether there is an animation end mark. Based on this, in some embodiments, the electronic device may execute the above S308 if the preset conditions are met. The preset conditions may include the conditions for the end of the last multi-tasking animation. Optionally, the preset conditions may also include that the electronic device is in a multi-tasking scheduling mode, and / or that the electronic device has resources corresponding to the last multi-tasking animation.
[0204] It should be understood that, generally speaking, if there is no end mark for the animation effect, it indicates that the electronic device is currently running a multi-task animation effect, and the electronic device has resources corresponding to the multi-task animation effect. Correspondingly, if it is determined that it is in a multi-task scheduling mode, if there is no end mark for the animation effect, the electronic device can directly reuse the resources corresponding to the multi-task animation effect.
[0205] The above is based on the entire electronic device as the execution subject, and introduces the process of setting the end mark of the animation to avoid interface confusion during the operation of multi-task animation in the scenario of triggering the multi-task animation multiple times continuously. Figure 4 The software structure introduced in this paper details the specific implementation process of this process. Fig. 9 As shown, the implementation process may include S401-S426.
[0206] S401: In a multi-task scheduling mode, a desktop launcher receives a down event at the bottom of the desktop.
[0207] S402, the desktop launcher creates a multi-task animation callback and sends a request 1 to the shell. Request 1 is used to start the multi-task animation.
[0208] S403: In response to request 1, the shell creates an instance of the motion effect controller and sends request 2 to the core, wherein request 2 is used to trigger the start of multi-task transition.
[0209] S404. In response to request 2, the core traverses the windows of the application displayed in the foreground, obtains the motion effect elements, and starts the multi-task transition.
[0210] S405: core sends request 3 to shell. Request 3 carries an animation element, which is used to trigger system-side resources for creating multi-task animation.
[0211] S406. In response to request 3, for each animation element, the shell constructs an animation object corresponding to the animation element.
[0212] S407, the shell sends the animation object corresponding to each animation element to SurfaceFlinger.
[0213] S408. SurfaceFlinger creates a dynamic effect layer based on the dynamic effect object corresponding to the dynamic effect element.
[0214] The above mentioned animation layer is used to display animation elements, such as Figure 2A The layer where the window 13 of the music APP is shown.
[0215] S409. The shell sends the instance of the motion effect controller and the motion effect objects corresponding to each motion effect element to the desktop launcher through the above motion effect callback.
[0216] S410: After the desktop launcher obtains the instance information of the motion effect controller and the motion effect object, for each motion effect object, a motion effect simulator corresponding to the motion effect object is created.
[0217] S411. The desktop launcher creates a background card 1 through an instance of the motion effect controller, and the background card 1 corresponds to the window of the application displayed in the foreground.
[0218] S412: The desktop launcher receives a move event.
[0219] S413: In response to the move event, the desktop launcher determines the motion effect information, wherein the motion effect information includes the background card 1 and the target position and target size of the window of the foreground application.
[0220] S414. The desktop launcher sends the above-mentioned motion effect information to SurfaceFlinger based on the motion effect simulator.
[0221] S415. SurfaceFlinger updates the layer where the window of the foreground application is located based on the above-mentioned dynamic effect change information.
[0222] S416. The desktop launcher updates the background card 1 through the instance of the motion effect controller based on the above motion effect change information.
[0223] S417: The desktop launcher receives an up event, wherein the up event is used to trigger the end of the multitasking animation.
[0224] Among them, the implementation process of the above S401-S417 can refer to the implementation process of the above S201-S217, which will not be repeated here.
[0225] S418. The desktop launcher sets the animation end mark.
[0226] S419: The desktop launcher sends request 4 to the shell. Request 4 is used to indicate the end of the multi-task animation effect.
[0227] S420: In response to request 4, the shell cleans up system resources and sends request 5 to the core. Request 5 is used to trigger the end of the multi-task animation transition. System resources include the above-mentioned animation objects.
[0228] S421. In response to request 5, the core ends the multi-tasking transition.
[0229] S422: The desktop launcher cleans up the resources held by the desktop launcher, including the above-mentioned motion effect simulator.
[0230] The above describes the process from the start to the end of the first multitasking animation. After the first multitasking animation ends, if the electronic device receives a swipe up action from the bottom of the desktop input by the user, the second multitasking animation needs to be started. The following will continue to describe the implementation process of the electronic device starting the second multitasking animation.
[0231] S423: While clearing the resources corresponding to the multi-tasking animation effect, the desktop launcher receives a down event at the bottom of the desktop again.
[0232] Among them, the implementation process of the above S419-S423 can refer to the implementation process of the above S218-S222, which will not be repeated here.
[0233] S424: The desktop launcher determines that there is an animation end marker.
[0234] S425: The desktop launcher completes cleaning up the resources held by the desktop launcher.
[0235] S426. The desktop launcher returns to S402.
[0236] In some embodiments, after determining that there is an animation end marker, the desktop launcher may clear the animation end marker.
[0237] In an embodiment of the present application, when the desktop launcher determines that there is an animation end marker, it recreates the resources corresponding to the multi-tasking animation, so as to utilize the created resources corresponding to the multi-tasking animation to run the multi-tasking animation, so as to synchronize the changes of the foreground application window and the background card with the user's sliding operation.
[0238] It is understandable that the operation performed by the desktop launcher before determining that there is an end mark of the animation effect is only an example, that is, the desktop launcher returning to S402 is only an example. For example, before determining that there is an end mark of the animation effect, the desktop launcher has already responded to the down event, created an animation callback, and started to start the multi-task animation effect.
[0239] In this application, if Fig.10As shown, after receiving the first swipe up operation from the bottom of the desktop input by the user, the electronic device starts to start the first multi-tasking animation and creates system-side resources. In addition, the electronic device also creates resources held by the desktop launcher. Afterwards, as the user slides, the first multi-tasking animation runs. After the user lifts his hand and leaves the screen, the electronic device ends the first multi-tasking animation and sets the animation end mark. And the electronic device cleans up the resources corresponding to the first multi-tasking animation, that is, asynchronously cleans up the system-side resources and resources held by the desktop launcher corresponding to the first multi-tasking animation. Afterwards, after the electronic device receives the swipe up operation from the bottom of the desktop for the second time, it determines that there is an animation end mark, then the electronic device creates new system-side resources and resources held by the desktop launcher, that is, creates system-side resources corresponding to the second multi-tasking animation and resources held by the desktop launcher. Afterwards, the electronic device runs the second multi-tasking animation based on the system-side resources corresponding to the second multi-tasking animation and the resources held by the desktop launcher to ensure the normal display of the second multi-tasking animation.
[0240] It should be noted that the operations performed by the software modules in the above-mentioned electronic devices (such as the above-mentioned desktop launcher, shell, core, SurfaceFlinger) may also be operations performed by other software modules. This application does not limit them, but the operations performed by the software modules are actually performed by electronic devices. In other words, the executor of the motion effect display method introduced in this application is an electronic device.
[0241] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.
[0242] The present application is an embodiment that can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0243] like Fig.11 FIG. 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1000 can be used to implement the methods performed by the electronic devices described in the above method embodiments. For example, the electronic device 1000 may include a processing unit 1001, a communication unit 1002, and a display unit 1003. The processing unit 1001 is used to support the electronic device 1000 to perform the methods described in FIG. 1 to FIG. Fig.10 The processing function of any of the electronic devices described above, the communication unit 1002 is used to support the communication function of the electronic device 1000. The display unit 1003 is used to support the display function of the electronic device 1000.
[0244] Optional, Fig.11 The electronic device 1000 shown may also include a storage unit ( Fig.11 (not shown), the storage unit stores a program or instruction. When the processing unit 1001 executes the program or instruction, Fig.11 The electronic device 1000 shown can execute the method described in the above method embodiment.
[0245] Fig.11 The technical effects of the electronic device 1000 shown can refer to the technical effects described in the above method embodiment, and will not be repeated here. Fig.11 The processing unit 1001 involved in the electronic device 1000 shown can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing module. The communication unit 1002 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver module. The display unit 1003 can be implemented by display screen-related components.
[0246] The present application also provides a chip system, such as Fig.12 As shown, the chip system includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 can be interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices. For another example, the interface circuit 1102 can be used to send signals to other devices (such as processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in a memory and send the instructions to the processor 1101. When the instructions are executed by the processor 1101, the electronic device can execute the various steps performed by the electronic device in the above-mentioned embodiment. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0247] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0248] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0249] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0250] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0251] An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the motion effect display method described in the above method embodiment.
[0252] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, when the computer program or instructions are run on an electronic device, the electronic device executes the animation method described in the above method embodiment.
[0253] In addition, the embodiments of the present application also provide a device, which may be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory, so that the device executes the dynamic effect display method in the above-mentioned method embodiments. Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above, so the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0254] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0255] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The various embodiments can be combined with each other or referenced to each other without conflict. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0256] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0257] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0258] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0259] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for displaying a dynamic effect, characterized in that: Applied to electronic equipment, the method comprises: Display a first interface; wherein the first interface includes a window of a first application displayed in the form of a floating window; Receiving a first operation of a user; wherein the first operation can trigger the start of a multi-tasking animation effect; In response to the first operation, when preset conditions are met, based on a first resource, the window of the first application and the first background card corresponding to the window of the first application are changed synchronously; wherein the preset conditions include the conditions for the end of the last multi-tasking animation; the first resource is a resource related to the multi-tasking animation display created based on the first operation; the synchronous change includes synchronous movement and / or synchronous scaling.
2. The method according to claim 1, characterized in that The method further comprises: When the condition for ending the last multitasking animation is not met, the window of the first application and the first background card are changed synchronously based on a second resource; wherein the second resource is a resource related to the last multitasking animation display.
3. The method according to claim 1 or 2, characterized in that: The condition for the last multi-tasking animation to end includes the existence of a first mark or the value of a second mark being a first preset value; wherein, the first mark is set when the last multi-tasking animation ends; and the value of the second mark is the first preset value and is set when the last multi-tasking animation ends.
4. The method according to claim 3, characterized in that After synchronously changing the window of the first application and the first background card corresponding to the window of the first application based on the first resource, the method further includes: Clearing the first mark or setting the value of the second mark to a second preset value; After clearing the first flag or setting the value of the second flag to a second preset value, the method further includes: Receiving a second operation; wherein the second operation is used to end the multi-tasking animation; In response to the second operation, a second interface is displayed, the first mark is set, or the value of the second mark is set to a first preset value.
5. The method according to claim 4, characterized in that The electronic device includes a desktop launcher and a shell; after receiving the second operation, the method further includes: Clear the first resource; wherein the first resource includes resources related to multi-tasking dynamic effect display held by the desktop launcher and resources related to multi-tasking dynamic effect display held by the shell; the resources held by the desktop launcher and the resources held by the shell are cleared asynchronously.
6. The method according to any one of claims 1 to 5, characterized in that The preset condition also includes that the electronic device is in a multi-task scheduling mode; wherein the multi-task scheduling mode represents a mode capable of displaying windows of one or more applications, and the windows of the one or more applications are in the form of floating windows.
7. The method according to any one of claims 1 to 6, characterized in that The preset condition also includes the existence of a second resource.
8. The method according to claim 7, characterized in that The method further comprises: In the case where there is an instance of the motion effect controller, determining that the second resource exists; In the case that there is no instance of the motion effect controller, it is determined that the second resource does not exist.
9. An electronic device, characterized in that: The electronic device includes a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the display screen is used to display an image generated by the processor, and the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the motion effect display method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: It includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the motion effect display method as described in any one of claims 1 to 8.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the motion effect display method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Sliding loading method for Web page based on Android platform browser
CN102929941A
Floating window display method and electronic equipment
CN116820314A
Upper sliding effect exception handling method and electronic equipment
CN116991274A
Dynamic effect display method and electronic equipment
CN117724783A
Display method, graphical interface and related device
CN117827300A
Cited By
Dynamic effect feedback method and device for interface interaction
CN121116145A
