Motion effect display method and electronic device
By determining the end marker of multitasking animations in electronic devices, the application window and background card change synchronously, solving the problem of visual chaos after multitasking animations end and improving the user experience.
Patent Information
- Application Number
- CN202411295968.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-09-14
AI Technical Summary
In multi-task scheduling mode, when the multi-task animation of an electronic device ends and it is restarted, the application window and background card displayed in the foreground do not change synchronously, resulting in visual confusion for the user and a poor user experience.
Electronic devices determine whether to start a new round of multitasking animations by judging preset conditions, including the marker that the previous multitasking animation ended, to ensure that the application window and background card change synchronously, or to reuse the resources of the previous multitasking animation to continue running, thus avoiding the duplication of resource creation.
This effectively avoids abnormal display of multi-tasking animation effects, improves user experience, and ensures the normal display and smooth operation of multi-tasking animation effects.
Smart Images

Figure CN119127020B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a motion display method and electronic device. Background Technology
[0002] When an electronic device is in multitasking mode, it can simultaneously display one or more application (APP) windows as floating windows for user convenience. Upon receiving a user-triggered animation, the electronic device displays corresponding multitasking animations. For example, following the user's swipe, the electronic device synchronizes the foreground application window with the background card, such as scaling or moving them synchronously.
[0003] However, after a multitasking animation ends, if the user triggers the electronic device to start the multitasking animation again, abnormal display of the multitasking animation may occur, such as the application window displayed in the foreground not changing in sync with the background card, causing visual confusion for the user and a poor user experience. Summary of the Invention
[0004] This application provides a motion effect display method and electronic device to solve the problem of abnormal multi-task motion effect display.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, this application provides a motion effect display method applied to an electronic device, the electronic device displaying a first interface (such as a desktop), the first interface including a window of a first application displayed in the form of a floating window. The number of first applications is one or more.
[0007] Subsequently, the electronic device receives the user's first operation. This first operation triggers the initiation of a multitasking animation. In response to the first operation, the electronic device determines whether preset conditions are met. These preset conditions include the conditions for the previous multitasking animation to end. If the preset conditions are met, the electronic device, based on a first resource, synchronizes the changes of the window of the first application and its corresponding first background card. The first resource is a resource created based on the first operation and related to the display of the multitasking animation. Synchronized changes include synchronized movement and / or synchronized scaling.
[0008] In this application, during the display of a first application window in the form of a floating window, if a first operation is received from the user indicating a need to activate multitasking animation, the electronic device determines whether preset conditions are met. These preset conditions include the condition that the previous multitasking animation ended. If the preset conditions are met, indicating that the condition for the previous multitasking animation to end has been met, the electronic device can synchronously move and scale the window of the first application and its surrounding first background card based on the resources created by the first operation related to the display of multitasking animation. This ensures the normal display of multitasking animation and avoids visual confusion for the user caused by the foreground application window not changing synchronously with the background card, thus ensuring a good user experience.
[0009] Optionally, the first operation described above can trigger the launch of multi-task animations in multi-task scheduling mode. Multi-task scheduling mode refers to a mode that can display windows of one or more applications, where the windows of the one or more applications are in the form of floating windows. In addition, during the display of multi-task animations, the first operation can control the operation of multi-task animations, such as scaling and moving.
[0010] In one possible design approach, if the conditions for the previous multitasking animation to end are not met, the electronic device can directly synchronize the window of the first application with the first background card based on the second resource, wherein the second resource is a resource related to the display of the previous multitasking animation.
[0011] Based on this, if the conditions for the end of the previous multi-tasking animation are not met, it indicates that the first operation may have been input during the display of the previous multi-tasking animation. The electronic device considers the first operation to be the input operation corresponding to the previous 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 previous multi-tasking animation, synchronize the window of the first application with the first background card, and realize the continued operation of the previous 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 approach, the conditions for the termination of the previous multi-tasking animation include the presence of a first marker or a second marker with a value set to a first preset value. The first marker is set when the previous multi-tasking animation ended. The value of the second marker is also set to the first preset value when the previous multi-tasking animation ended. Based on this, the electronic device can determine the accurate conclusion of whether the previous multi-tasking animation has ended by using the values of the first or second marker.
[0013] In one possible design approach, after the window of the first application and the corresponding first background card of the first application window are synchronized and changed 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 current multi-tasking animation is in operation.
[0014] Accordingly, after clearing the first marker or setting the value of the second marker to the second preset value, the electronic device receives a second operation (such as the user's finger leaving the screen). The second operation is used to end the multitasking animation. In response to the second operation, a second interface is displayed. Furthermore, the current multitasking animation becomes the previous one. The electronic device can set the first marker or set the value of the second marker to the first preset value to indicate that the current multitasking animation has ended, preventing the electronic device from mistakenly indicating that the current multitasking animation has not ended due to the first resource corresponding to the current multitasking animation not being completely cleared.
[0015] Optionally, the second interface can be a desktop, a desktop including the window of the first application, a multitasking interface, or an interface provided by a background application.
[0016] In one possible design, the electronic device includes a desktop launcher and a shell. Upon ending the current multitasking animation, in response to the first operation described above, the electronic device also clears a first set of resources. These first resources include resources held by the desktop launcher related to the multitasking animation display and resources held by the shell related to the multitasking animation display (i.e., system-side resources), thereby avoiding resource consumption.
[0017] In this configuration, the resources held by the desktop launcher are cleared asynchronously from the system-side resources; in other words, the system-side resources and the resources held by the desktop launcher are not cleared synchronously. Optionally, the electronic device can clear the system-side resources first, and then clear the resources held by the desktop launcher.
[0018] In one possible design approach, the aforementioned preset conditions may also include the electronic device being in a multitasking mode. Alternatively, if not in a multitasking mode, the first operation is not used to trigger multitasking animations, but rather to trigger the display of other effects, such as displaying a multitasking interface that includes windows for background applications.
[0019] In one possible design approach, the preset condition may also include the existence of a second resource. If the second resource does not exist, and the electronic device does not have a resource corresponding to the reusable multi-task animation effect, the electronic device needs to create a first resource to run the multi-task animation effect based on the first resource, thereby synchronizing the window of the first application with the first background card.
[0020] In one possible design approach, generally, when clearing resources corresponding to multi-task motion effects, the instance of the motion effect controller is cleared last. Therefore, the electronic device can determine whether a second resource exists by checking if an instance of the motion effect controller exists. If an instance of the motion effect controller exists, the electronic device can determine that a second resource exists. If no instance of the motion effect controller exists, the electronic device determines that a second resource does not exist.
[0021] In a second aspect, this application provides an electronic device, the electronic device including 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, the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs the method described above.
[0022] Thirdly, this application provides a chip, the chip including a communication interface and at least one processor:
[0023] The communication interface is used for inputting and / or outputting signaling or data;
[0024] The at least one processor is used to execute a computer program to implement the method described above.
[0025] Fourthly, this application provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method described above.
[0026] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0027] It is understood that the beneficial effects 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 can be referred to the beneficial effects in the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description
[0028] Figure 1A A schematic diagram of a multi-task scheduling mode provided in an embodiment of this application;
[0029] Figure 1B A second schematic diagram illustrating a multi-task scheduling mode provided in an embodiment of this application;
[0030] Figure 1CA scenario illustration of a multi-task scheduling mode provided in this application embodiment. Figure 3 ;
[0031] Figure 1D A scenario illustration of a multi-task scheduling mode provided in this application embodiment. Figure 4 ;
[0032] Figure 2A A schematic diagram illustrating a multi-tasking animation provided in an embodiment of this application;
[0033] Figure 2B A second schematic diagram illustrating a multi-tasking animation provided in an embodiment of this application;
[0034] Figure 2C This application provides a schematic diagram of a multi-tasking animation display. Figure 3 ;
[0035] Figure 2D This application provides a schematic diagram of a multi-tasking animation display. Figure 4 ;
[0036] Figure 2E This application provides a schematic diagram of a multi-tasking animation display. Figure 5 ;
[0037] Figure 2F This application provides a schematic diagram of a multi-tasking animation display. Figure 6 ;
[0038] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0039] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0040] Figure 5 A flowchart illustrating a motion effect display method provided in an embodiment of this application;
[0041] Figure 6 A flowchart illustrating a motion effect display method provided in an embodiment of this application is shown in Figure 2.
[0042] Figure 7 A flowchart illustrating a motion effect display method provided in this application embodiment. Figure 3 ;
[0043] Figure 8 A schematic diagram of a multi-tasking interface provided in an embodiment of this application;
[0044] Figure 9 A flowchart illustrating a motion effect display method provided in this application embodiment. Figure 4 ;
[0045] Figure 10 A flowchart illustrating a motion effect display method provided in this application embodiment. Figure 5 ;
[0046] Figure 11 A second schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0047] Figure 12 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0048] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "exemplary" or "for example" are used in the embodiments of this application to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a specific manner. In the embodiments of this application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. In the embodiments of this application, "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0049] To enhance user experience, electronic devices (such as tablets) offer a multitasking mode (or free-screen mode). In multitasking mode, the tablet can simultaneously display one or more application windows in the foreground as floating windows. For example, when a user clicks on a tablet... Figure 1A The switch 11 is shown on the desktop 10. In response to a click on switch 11, the electronic device enters a multitasking mode. Then, the user clicks as shown... Figure 1BThe music app 12 shown is displayed on the electronic device as follows. Figure 1C The music app window shown is 13, which is a floating window. When the user wants to open other applications, these other applications can be triggered, and the electronic device will continue to display the windows of those other applications, such as... Figure 1D As shown, the electronic device displays not only the music app window 13, but also the gallery app window 14. Furthermore, compared to... Figure 1A The display status of switch 11 shown. Figure 1B The display state of switch 15 changes. That is, after entering multitasking mode, the display state of the switch that triggers the tablet to enter multitasking mode will change, allowing the user to intuitively know that the tablet is currently in multitasking mode. Of course, the display state of this switch may not change after entering multitasking mode.
[0050] While in multitasking mode, when the user swipes up from the bottom of the tablet's home screen (i.e., the bottom of the tablet's screen), the tablet displays a multitasking animation (or alternatively, a "recents" animation). Following the user's swipe, the tablet synchronizes the windows of recently run applications with the background cards containing those windows, such as scaling and moving them. The windows of these recently run applications include the windows of the applications displayed in the foreground. See also... Figure 2A As shown, the multitasking animation includes a background card 16, the music app window 13, and the gallery app window 14. From the user's visual perspective, the music app window 13 and the gallery app window 14 are located within the background card 16. The music app and the gallery app are the applications displayed in the foreground.
[0051] Following the user's swipe gestures, the tablet synchronizes changes to the windows of foreground applications and background cards, such as moving and scaling. For example, see... Figure 2B As the user continues to swipe upwards, the music app window 13, the gallery app window 14, and the background card 16 move and shrink simultaneously. See also... Figure 2C As the user swipes down, the music app window 13, the gallery app window 14, and the background card 16 move and enlarge synchronously. Alternatively, the multitasking animation may also include the windows of background applications, see [link to example]. Figure 2B or Figure 2C Window 20 of the short video application. The display format of window 20 can be an image.
[0052] When the user lifts their hand off the screen, the multitasking animation ends, the tablet returns to the application, and the window of the application running in the foreground is displayed again, such as... Figure 2DThe examples shown are window 13 of the music app and window 14 of the gallery app. It's understandable that the above-described multitasking animation returning to the application upon completion is just one possible example. The tablet may also return to the home screen after the multitasking animation ends. Alternatively, it may directly switch to the multitasking interface, which includes the windows of background applications—that is, background tasks. Or, the tablet may switch to the background applications and display their windows, such as displaying them in full-screen mode.
[0053] It should be noted that triggering an electronic device into multitasking mode via the aforementioned switch (such as switch 11) is merely an example. Tablet computers can also trigger multitasking mode in other ways, such as through specific gestures, and this application does not limit this. Furthermore, the aforementioned switch (i.e., the switch icon) can be located in a specific location on the desktop, such as the edge of the desktop, i.e., within the dock area, or it can be located anywhere on the desktop; this application does not limit this. In multitasking mode, the user can choose to open an application in the dock area to display the application's window on the desktop. Of course, the user can also choose to open any application on the desktop; this application also does not limit this.
[0054] After a multitasking animation ends, if the user swipes up from the bottom of the screen again shortly afterward, it indicates a need to start a new (or a new round) of multitasking animation. However, although the previous multitasking animation has ended, the resources associated with it may not have been completely cleared. This causes the tablet to mistakenly believe that the previous multitasking animation has not ended, and based on the current swipe-up input, it continues running the previous multitasking animation. But because the resources of the previous multitasking animation are already being cleared, the tablet is unusable and cannot continue with the previous multitasking animation, resulting in abnormal multitasking animation display. For example, the application window displayed in the foreground on the tablet may not change in sync with the background card, such as not scaling or moving synchronously, causing visual confusion for the user.
[0055] Continuing with the above examples, in response to the user's actions mentioned above... Figure 2D When you swipe up from the bottom of the desktop as shown, the tablet begins to display... Figure 2E The multi-tasking animation shown is Figure 2E This includes the music app window 13, the gallery app window 14, and the background card 23. The background card 23 is shrunk, but the music app window 13 and the gallery app window 14 remain unchanged, resulting in abnormal multitasking animation display, visual clutter, and a poor user experience.
[0056] Alternatively, the aforementioned recently run application window may also include the background application window (hereinafter referred to as the background application window). Correspondingly, the aforementioned multitasking animation may also include the animation of the background task card. Because the display mechanisms of the background application window and the foreground application window (hereinafter referred to as the foreground application window) in the multitasking animation are different—for example, the background application window is displayed as an image (or described as a view), while the foreground application window is displayed as a layer—when the user swipes up from the bottom of the desktop again within a short period, the tablet can normally scale the background application window, ensuring the background task card animation displays correctly. See [link to relevant documentation]. Figure 2F The window of the short video app shown is normally shrunk.
[0057] Therefore, to address the aforementioned issues, this application provides a novel animation display scheme. After a multi-tasking animation ends, the electronic device can set an animation end marker. Subsequently, when the electronic device receives another swipe-up operation from the bottom of the desktop, it determines whether an animation end marker exists. If an animation end marker exists, the electronic device determines that the previous multi-tasking animation has ended. The swipe-up operation triggers the start of a new round of multi-tasking animation, and the electronic device begins running the new round of multi-tasking animation. In other words, the electronic device synchronizes changes to the foreground application window and background card, such as synchronous scaling and movement, thereby ensuring the normal display of the multi-tasking animation and avoiding visual confusion. If no animation end marker exists, the electronic device determines that the previous multi-tasking animation has not ended. The swipe-up operation triggers the continuation of the previous round of multi-tasking animation. Simply put, the swipe-up operation is the input operation for the previous round of multi-tasking animation; therefore, the electronic device can continue running the previous round of multi-tasking animation, ensuring the normal display of the multi-tasking animation and improving the user experience.
[0058] It should be noted that the swipe-up gesture from the bottom of the desktop described above is merely an exemplary gesture for triggering multitasking animations on electronic devices. Other triggering actions can also be used to initiate multitasking animations. This application does not impose any restrictions on the specific type of triggering action or the input location of the triggering action. For example, a user can trigger multitasking animations on the electronic device by swiping up from any location on the desktop, i.e., the screen.
[0059] For example, the electronic device in the embodiments of this application may be a tablet computer, mobile phone, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, and personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc., which are electronic devices with a display screen (or screen). The embodiments of this application do not impose any special restrictions on the specific form of the electronic device.
[0060] Figure 3 A schematic diagram of the structure of the electronic device 100 is shown.
[0061] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc.
[0062] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0063] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0064] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0065] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, 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. Interfaces 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 understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0068] The charging management module 140 receives charging input from the charger. The power management module 141 connects to the battery 142, and the charging management module 140 connects to 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 electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[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 one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0071] Mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on electronic device 100. Wireless communication module 160 can provide wireless communication solutions, including wireless local area networks (WLANs) (such as Wi-Fi), Bluetooth, Global Navigation Satellite System (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies, for use on 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 networks and other devices through wireless communication technology.
[0073] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0074] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0075] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0076] The external storage 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 storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0077] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0078] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0079] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0080] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0081] Motor 191 can generate vibration alerts. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card.
[0082] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0083] Figure 4 This is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
[0084] A layered architecture divides software into several layers, each with a clear role and function. 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 libraries, and the kernel layer.
[0085] The application layer can include a series of application packages.
[0086] like Figure 4 As shown, the application package can include applications such as camera, gallery, calendar, call, map, navigation, Bluetooth, music, video, SMS, launcher, and desktop.
[0087] The desktop launcher is used to initiate multitasking animations in response to user triggers. Furthermore, the launcher can control how the multitasking animations run based on user actions, such as controlling the synchronized changes of recently run application windows and background cards. Recently run applications refer to recently running tasks, which can include applications displayed in the foreground as floating windows. Optionally, recently run applications can also include applications running in the background.
[0088] Additionally, the desktop launcher releases its resources when the multitasking animation ends.
[0089] The application framework layer provides application programming interfaces (APIs) and a programming framework for 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, content provider, view system, phone manager, resource manager, notification manager, shell, core, etc.
[0091] The shell (or wm-shell) is used to construct system-side resources such as animation objects (targat) when multi-task animations start. Additionally, it releases system-side resources when multi-task animations end.
[0092] Core (or wm-core) is used for multitasking transitions, such as switching a foreground application to the background or a desktop application to the foreground.
[0093] The shell and core mentioned above belong to the system switching framework (shell transition).
[0094] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0095] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0096] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0097] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), graphics compositors (e.g., SurfaceFlinger), etc.
[0098] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0099] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[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 graphics engine for 2D drawing.
[0102] SurfaceFlinger is used to manage layers, such as the layer corresponding to the foreground window of an application in a multitasking animation.
[0103] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0104] The software architecture of electronic devices has been detailed above. Below, we will use this architecture as an example, taking the action of swiping up from the bottom of the desktop to trigger multitasking animations, to illustrate the process of displaying multitasking animations multiple times in a short period. Figure 5 As shown, the process may include:
[0105] S201. In multi-task scheduling mode, the desktop launcher receives a down event at the bottom of the desktop.
[0106] Generally speaking, a swipe-up action involves the user first pressing their finger on the screen, and then moving their finger upwards. Pressing the finger corresponds to a "down" event, and moving it corresponds to a "move" event. Therefore, in multitasking mode, when the user presses their finger at the bottom of the screen (the bottom of the desktop), the launcher receives a "down" event from the bottom of the desktop to trigger the multitasking animation.
[0107] S202. The desktop launcher creates a multi-tasking animation callback and sends request 1 to the shell. Request 1 is used to start the multi-tasking animation.
[0108] S203. In response to request 1, the shell creates an instance of the motion controller and sends request 2 to the core. Request 2 is used to trigger the start of a multi-task transition.
[0109] Among them, multi-task transitions involve switching a foreground application to the background and a 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 aforementioned motion controller is also known as the reccents controller.
[0111] S204 and core respond to request 2 by traversing the windows of the application displayed in the foreground, obtaining the animation elements, and starting the multi-task transition.
[0112] The applications displayed in the foreground mentioned above refer to those on the electronic device before the multitasking animation is activated. In other words, they are displayed as floating windows in multitasking mode. The animation elements represent the windows of the applications running in the foreground of the electronic device.
[0113] S205, core sends request 3 to shell. Request 3 carries a motion effect element, which is used to trigger system-side resources for creating multi-task motion effects.
[0114] S206. In response to request 3, for each animation element, the shell constructs the corresponding animation object for that animation element.
[0115] In this application, each motion effect object corresponds one-to-one with a motion effect element. The motion effect object allows control over the corresponding motion effect element, which in turn allows control over the floating window displayed in the foreground. Accordingly, the motion effect object can also be understood as the floating window object. In this application, the shell receives request 3, indicating a need to start displaying multi-tasking motion effects. The shell iterates through the motion effect elements to determine each element.
[0116] S207. Shell sends the animation objects corresponding to each animation element to SurfaceFlinger.
[0117] S208, SurfaceFlinger creates motion effect layers based on the motion effect object corresponding to the motion effect element.
[0118] The aforementioned animation layer is used to display animation elements, as described above. Figure 2A The layer where window 13 of the music app shown is located.
[0119] S209. Shell sends the instance of the animation controller and the corresponding animation objects of each animation element to the desktop launcher through the above animation callback.
[0120] S210: After obtaining the instance information of the motion controller and the motion object, the desktop launcher creates a motion simulator corresponding to each motion object.
[0121] Among them, the motion simulator is used to control the motion objects of the object, thereby realizing the control of motion elements.
[0122] For example, after the desktop launcher obtains the instance of the motion controller (i.e., the information of the instance) and the motion object (i.e., the information of the motion object), it indicates that it needs to start displaying multi-task motion effects (onAnimationStart). Then it iterates through the motion objects to create the motion simulator corresponding to each motion object.
[0123] S211. The desktop launcher creates a background card 1 through an instance of the motion controller. This background card 1 corresponds to the window of the application displayed in the foreground.
[0124] The above S201-S211 describes the process of starting multi-task animation in response to the down event. The following section continues to describe the process of updating multi-task animation based on the move event, that is, running multi-task animation.
[0125] S212, The desktop launcher receives the move event.
[0126] When a user swipes up from the bottom of the desktop, after receiving the user's down event, the desktop launcher can then receive a move event, which can be used to continue running the multitasking animation.
[0127] S213. In response to the move event, the desktop launcher determines the animation information. The animation information includes background card 1, the target position of the foreground application window, and the target size.
[0128] Among them, the target position and target size of the background card 1 and the window of the foreground application can belong to the foreground task animation information.
[0129] S214. The desktop launcher sends the aforementioned animation information to SurfaceFlinger based on the animation simulator.
[0130] For example, the launcher can first determine the animation progress corresponding to the user's swipe information. This swipe information may include the user's swipe distance, swipe speed, and other information. The animation progress represents the required playback progress of the multi-tasking animation under this swipe information, that is, the target size and target position of the foreground application window and its corresponding background card 1. Then, the launcher can determine the animation information based on the animation progress, so as to control the operation of the multi-tasking animation using the animation information, so that the display of the multi-tasking animation matches the animation progress.
[0131] Taking the sliding information, including the sliding distance, as an example, the desktop launcher can find the animation progress corresponding to that sliding distance, such as 50%. This 50% corresponds to the size and position of the foreground application window and background card 1. Therefore, it is necessary to scale the foreground application window to the size corresponding to 50% and move it to the position corresponding to 50% of the foreground application window. Similarly, it is necessary to scale background card 1 to the size corresponding to 50% of the background card and move it to the position corresponding to 50% of the background card, thereby achieving synchronous scaling and movement of the foreground application window and its corresponding background card 1.
[0132] S215. Based on the above animation change information, SurfaceFlinger updates the layer where the foreground application window is located.
[0133] It should be understood that the desktop launcher uses an animation simulator and SurfaceFlinger to update the windows of the corresponding foreground applications.
[0134] S216. The desktop launcher updates the background card 1 based on the above-mentioned animation change information through an instance of the animation controller.
[0135] For example, the desktop launcher can update background card 1 via SurfaceFlinger.
[0136] In some embodiments, the aforementioned animation change information may also include other information, such as the rounded corners of the background card 1. Accordingly, the desktop launcher can update the background card 1 and the foreground application window accordingly.
[0137] In some embodiments, when the foreground application window and background card 1 are minimized, the electronic device can also display the background application window. Therefore, the aforementioned multitasking animation effect also includes the animation effect of the background task card. Correspondingly, the aforementioned animation effect information not only includes the foreground task animation effect information but may also include background task animation effect information. Similar to the foreground task animation effect information, the background task animation effect information may include the background application window and the background card 2 corresponding to the background application window (see...). Figure 2B The target size and target position of the short video application window 20 and its surrounding background card are shown. The desktop launcher can update the background application window and background card 2 based on the background task animation information through an instance of the animation controller.
[0138] The above described the process of controlling the multitasking animation as the user swipes across the screen. The multitasking animation ends when the user lifts their hand off the screen. The following section will describe the process of ending the multitasking animation.
[0139] S217. The desktop launcher receives the up event. The up event is used to trigger the multitasking termination animation.
[0140] When the user raises their hand off the screen, the desktop launcher receives the corresponding up event, indicating that the multitasking animation needs to end.
[0141] S218, The desktop launcher sends request 4 to the shell. Request 4 is used to end the multitasking animation.
[0142] In some embodiments, the launcher can also determine the animation target based on the user's current swipe information. This 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, or switching to a background application. For example, if the swipe distance is too small, the launcher determines the animation target to be returning to the application. Simply put, 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 aforementioned animation objects.
[0144] Optionally, the system side may also include other resources, such as instances of the created motion controllers, the layer where the foreground application window is located, etc.
[0145] S220, in response to request 5, the core ends the multi-task transition.
[0146] In this embodiment, in response to request 5, core switches the desktop application back to the background. Additionally, core can also switch a foreground application (i.e., an application displayed as a floating window before a multitasking transition) that is essentially a background application 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 aforementioned animation emulator.
[0148] Optionally, the resources held by the desktop launcher may also include other resources, such as instances of motion controllers, like background card 1 and background card 2 mentioned above. Furthermore, it can be understood that the instances of motion controllers held by the desktop launcher can be further encapsulated from the instances of motion controllers passed by the shell. Changes in multitasking animations depend on the instances of motion controllers. Additionally, the desktop launcher can encapsulate motion simulators or motion objects within instances of motion controllers, thereby using the instances of motion controllers in conjunction with the motion simulator to control the corresponding motion objects, i.e., the windows of the foreground application.
[0149] The above describes the process of the first multitasking animation from start to finish. When the first multitasking animation ends, the resources corresponding to it need to be cleared. During this clearing process, if a user input of a swipe-up gesture from the bottom of the desktop is received, the electronic device needs to initiate the second multitasking animation. The following section will describe the process of initiating the second multitasking animation on the electronic device.
[0150] S222. During the process of clearing the resources corresponding to the multitasking animation, the desktop launcher receives the down event again at the bottom of the desktop.
[0151] The cleanup of resources held by the desktop launcher and the cleanup of system resources are asynchronous operations and are not performed simultaneously. While clearing resources corresponding to the multitasking animation or clearing system resources, the user may again input the swipe-up action from the bottom of the desktop. Correspondingly, the desktop launcher will receive a down event again, indicating that the multitasking animation needs to be restarted.
[0152] S223: The desktop launcher determines whether the previous multitasking animation has ended.
[0153] For example, the desktop launcher can determine whether the previous (i.e., the first) multitasking event has ended by checking if the resources corresponding to the multitasking animation exist. If the resources held by the desktop launcher and / or system-side resources exist, indicating the existence of resources corresponding to the multitasking animation, the desktop launcher determines that the previous multitasking animation has not ended. If neither the resources held by the desktop launcher nor system-side resources exist, indicating the absence of resources corresponding to the multitasking animation, the desktop launcher determines that the previous multitasking animation has ended.
[0154] Alternatively, generally, since system resources are cleared first, followed by those held by the desktop launcher, the desktop launcher can determine that the previous multitasking animation has ended if no resources held by it exist. If resources held by the desktop launcher exist, the desktop launcher determines that the previous multitasking animation has not ended.
[0155] Optionally, since the instances of motion controllers held by the desktop launcher are generally the last to be cleaned up (i.e., cleared), the desktop launcher can determine whether the resources corresponding to the previous multi-tasking motion effect exist by checking whether an instance of the motion controller it holds exists. If no instance of the motion controller exists, it is determined that the resources corresponding to the previous multi-tasking motion effect do not exist, and the previous multi-tasking motion effect has ended. If an instance of the motion controller exists, it is determined that the resources corresponding to the previous multi-tasking motion effect exist, and the previous multi-tasking motion effect has not ended.
[0156] S224. If the previous multitasking animation has not ended, the desktop launcher reuses the resources corresponding to the previous multitasking animation.
[0157] For example, the desktop launcher responds to the down event, creates an animation callback, and starts a multi-tasking animation to reuse system-side resources through the animation callback.
[0158] S225. The desktop launcher has finished cleaning up the resources held by the desktop launcher.
[0159] S226. In response to the move event, the desktop launcher determines the animation information.
[0160] S227. The desktop launcher, based on the animation information, does not make corresponding changes to the window of the foreground application, but makes corresponding changes to the background card 1.
[0161] In this embodiment, since the resources corresponding to the previous multitasking animation have been cleared, the process of the desktop launcher controlling the multitasking animation is interrupted. It cannot utilize the resources corresponding to the previous multitasking to make corresponding changes to the foreground application window, causing the electronic device to be unable to scale or move the foreground application window as the user slides. Additionally, the background card (such as background card 1 mentioned above) changes. For example, background card 1 can be understood as a view, and the desktop launcher can normally make corresponding changes to background card 1.
[0162] Optionally, the window of the background application and its corresponding background card 2 can also be understood as a view. The desktop launcher can normally make corresponding changes to the window of the background application and its corresponding background card 2 according to the move event.
[0163] S228. After the previous multitasking animation ends, the desktop launcher returns to S214 above.
[0164] As described above, when a multitasking animation ends, the electronic device needs to clear the resources corresponding to the animation. These resources include system-side resources and resources held by the desktop launcher. Furthermore, when launching multitasking animations consecutively, the electronic device will determine whether the previous animation has ended before launching it again, to ascertain whether the current multitasking animation can reuse the resources corresponding to the previous one.
[0165] Specifically, during the resource cleanup phase for multitasking animations, the electronic device first cleans up system-side resources. Then, it asynchronously cleans up the resources held by the desktop launcher. Since cleanup takes time, if the user triggers a second multitasking animation during this period, the electronic device will determine whether the previous multitasking animation has ended. If it hasn't ended, the electronic device uses the resources corresponding to the previous multitasking animation to display the current one. However, at this point, the resources corresponding to the previous animation have already been cleaned up, or only a few resources remain to be cleaned up. This prevents the electronic device from utilizing the resources to achieve the normal display of the current multitasking animation, such as the inability to make corresponding changes to the foreground application window, like scaling or moving it, resulting in abnormal multitasking animation display. It should be understood that when multitasking animations are restarted, if the electronic device determines that the previous multitasking animation has not finished running, the electronic device will mistakenly believe that the operation that triggered the restart of multitasking animations this time is for the previous multitasking animation. Therefore, the electronic device will continue to run the previous multitasking animation based on this operation, thereby reusing the resources of the previous multitasking animation to synchronize changes to the foreground application window and the corresponding background card. However, since the resources of the previous multitasking animation have actually been cleared, this change is abnormal, causing the display of multitasking animations to be abnormal.
[0166] In some embodiments, if an operation triggering the multitasking animation is received before the resources corresponding to the multitasking animation are cleared (such as receiving a down event at the bottom of the desktop), the electronic device can reuse the resources corresponding to the previous multitasking animation because it has not cleared them. This ensures the normal operation of the multitasking animation and prevents interface clutter. For example, as shown... Figure 6 As shown, after receiving the first swipe-up gesture from the bottom of the screen, the electronic device initiates the first multitasking animation, creating system-side resources. It also creates resources held by the desktop launcher. Following the user's swipe, the first multitasking animation runs (synchronously changing the foreground application window and its corresponding background card). Upon receiving a second swipe-up gesture, the electronic device determines that the first multitasking animation is not yet finished. Responding to the second swipe, the device continues running the first multitasking animation based on the resources provided, ensuring synchronized changes to the foreground application window and background card without any interface clutter. Finally, when the user lifts their hand from the screen, the electronic device ends the first multitasking animation, clears system-side resources, and then clears the resources held by the desktop launcher.
[0167] Therefore, to address the issue of abnormal display of multi-task animation effects in scenarios where they are triggered multiple times consecutively, this application provides an animation display solution to ensure the normal display of multi-task animation effects. For example, the animation display solution includes... Figure 7 S301-S309 are shown.
[0168] S301, The electronic device displays the window of application 1. The window of application 1 is displayed as a floating window.
[0169] The number of application 1 (or first application) mentioned above can be one or more. The interface where the window of application 1 is located, i.e., the desktop, can be referred to as the first interface.
[0170] S302, The electronic device receives an upward swipe operation from the bottom of the desktop. The upward swipe operation from the bottom of the desktop is used to trigger a multitasking animation.
[0171] Among them, swiping up from the bottom of the desktop is only one possible first action that can trigger the multitasking animation.
[0172] S303. In response to the above swipe operation, the electronic device determines whether it is in a multi-task scheduling mode.
[0173] If the device is not in multi-task scheduling mode, it indicates that the above swipe operation is not used to trigger multi-task animations, but to trigger other animations. In this case, the electronic device can execute S304.
[0174] In the multi-task scheduling mode, if the above sliding operation is used to trigger multi-task animation, then the electronic device can execute S305.
[0175] S304, Electronic devices display a multi-tasking interface.
[0176] For example, when not in multitasking mode, if a user swipes up from the bottom of the screen, the electronic device receives the swipe action and displays a multitasking interface, such as... Figure 8 As shown. In some implementations, displaying the multitasking interface can also be understood as the animation of launching background task cards.
[0177] S305. The electronic device determines whether there are resources corresponding to multi-task animation effects.
[0178] In this embodiment of the application, when there are no resources corresponding to the multi-task animation, the electronic device directly starts a new round of multi-task animation, and the electronic device can execute S306.
[0179] If the resources corresponding to the multi-task animation exist, it indicates that the previous multi-task animation may not have ended. The swipe-up action from the bottom of the desktop in S302 may have been entered during the previous multi-task animation or during the clearing of the resources corresponding to the previous multi-task animation. Therefore, the electronic device can execute S307, which requires further judgment to determine whether the resources corresponding to the previous multi-task animation are available.
[0180] The process by which electronic devices determine whether there are resources corresponding to multi-task animation effects can be referred to in the relevant description above, such as determining whether there is an instance of an animation effect controller, which will not be repeated here.
[0181] S306. The electronic device creates resources corresponding to the multi-task animation effects, and based on the resources corresponding to the multi-task animation effects, synchronizes the changes of the window of application 1 with the background card where the window of application 1 is located.
[0182] For example, in the absence of resources corresponding to the multi-tasking animation effect, the electronic device directly initiates a new multi-tasking animation effect, such as creating resources corresponding to the multi-tasking animation effect for use in controlling the normal operation of the multi-tasking animation effect. This allows the window of application 1 and the background card (or first background card) containing the window of application 1 to be scaled and moved synchronously with the user's swipe operation. Specifically, the electronic device can execute the above S202-S217.
[0183] S307. The electronic device determines whether there is an animation end marker. The animation end marker is set when the previous multi-task animation ended.
[0184] If an animation end marker (or first marker) is present, it indicates that the previous multitasking animation has ended. The aforementioned swipe-up action from the bottom of the desktop was input during the cleanup of resources corresponding to the previous multitasking animation. Therefore, the electronic device cannot directly reuse resources corresponding to the previous multitasking animation; otherwise, the electronic device may experience abnormal multitasking animation display. Thus, the electronic device needs to start a new multitasking animation, and the electronic device can execute S308.
[0185] If there is no animation end marker, it indicates that the previous multitasking animation has not ended. The above-mentioned upward swipe action from the bottom of the desktop was entered during the previous multitasking animation run. Therefore, see the above. Figure 6 As shown in the process, the electronic device can continue the previous multi-task animation based on the resources corresponding to the previous multi-task animation, ensuring the normal display of the multi-task animation. Then the electronic device can execute S309.
[0186] In some embodiments, the above-described determination of whether an animation end marker exists is merely an example of determining whether the previous multi-tasking animation has ended. The electronic device can also determine whether the previous multi-tasking animation has ended based on the value of the second marker. If the value of the second marker is a first preset value, it indicates that the previous multi-tasking animation has ended; if the value of the second marker is a second preset value, it indicates that the previous multi-tasking has not ended. In other words, the electronic device can determine whether the conditions for the previous multi-tasking animation to end are met. If the conditions for the previous multi-tasking animation to end are met, the electronic device can execute S308 below. If the conditions for the previous multi-tasking animation to end are not met, the electronic device can execute S309 below.
[0187] The conditions for the previous multitasking animation to end include the presence of a first marker or the value of a second marker being a first preset value. Specifically, if the previous multitasking animation ended, the electronic device could set the first marker, and thus the first marker would be present on the device. Alternatively, the electronic device could set the value of the second marker to the first preset value. During the previous multitasking animation display period, i.e., before the user lifted their hand from the screen, the electronic device either did not have the first marker or the value of the second marker was the second preset value.
[0188] In some embodiments, after S307 described above, if the electronic device has determined that the previous multitasking animation has ended and can no longer use the first marker or the first preset value, the electronic device can clear the first marker or set the second marker to the second preset value to accurately indicate that the current multitasking animation is in progress. Correspondingly, after the user raises their hand from the screen, the electronic device can end the multitasking animation, and then the electronic device can set the first marker again to maintain the first marker, or update the second marker to the first preset value to indicate that the current multitasking animation has ended.
[0189] Optionally, the user raising their hand off the screen is only one possible operation for triggering the second action of receiving multitasking animations. This second action could also be other operations, such as the user's finger remaining still on the screen for an extended period.
[0190] S308. The electronic device creates resources corresponding to the multi-task animation effects. Based on the created resources corresponding to the multi-task animation effects, the window of application 1 and the background card where the window of application 1 is located are synchronously changed.
[0191] The resource corresponding to the created multi-task animation effect can be called the first resource, which is related to the display of this multi-task animation effect. The implementation process of S308 can be referred to the relevant introduction of S306 above, and will not be repeated here.
[0192] S309. The electronic device synchronizes the changes of the window of application 1 and the background card of application 1 based on the resources corresponding to the previous multi-task animation.
[0193] Among them, the resource corresponding to the previous multi-tasking animation can be called the second resource, which is related to the display of the previous multi-tasking animation.
[0194] In some embodiments, the pseudocode involved in S303-S309 above includes:
[0195] if (multi-task scheduling mode && animation end marker exists) {
[0196] Launch a new multitasking animation
[0197] }else{
[0198] Continuing with the previous multi-tasking animation
[0199] }
[0200] In some embodiments, when the electronic device synchronizes the changes of the window of application 1 with the background card containing the window of application 1, it can also make corresponding changes to the window of the background application and its corresponding background card. In other words, the multitasking animation effects running on the electronic device can also include the animation effects of the background task cards.
[0201] In the animation display scheme provided in this application, when a multi-task animation ends, the electronic device sets an animation end marker and then cleans up the resources corresponding to the multi-task animation. Afterwards, upon receiving a swipe-up operation from the bottom of the desktop, the electronic device can determine whether resources corresponding to the multi-task animation exist and whether it is in multi-task scheduling mode to avoid unnecessary checks for animation end markers. If resources corresponding to the multi-task animation exist and the electronic device is in multi-task scheduling mode, it indicates that the electronic device needs to start a new round of multi-task animations, and the electronic device then checks whether a multi-task animation marker exists. If it exists, it indicates that the previous round of multi-task animations has ended, and the electronic device can start a new round of multi-task animations, that is, create new resources corresponding to the multi-task animations for use in running the multi-task animations. This ensures normal display of multi-task animations and avoids the electronic device mistakenly believing it can use resources from the previous round of multi-task animations due to asynchronous resource cleanup, thus preventing interface chaos caused by abnormal interruptions of multi-task animations and improving user satisfaction.
[0202] It should be noted that the step numbers above do not represent the execution order. For example, S303 can be executed first, followed by S305. Alternatively, S305 can be executed first, and if resources corresponding to the multi-task animation exist, S303 can be executed to determine whether it is in multi-task scheduling mode. Or, S303 and S305 can be executed simultaneously, meaning the electronic device checks in parallel whether resources corresponding to the multi-task animation exist and whether it is in multi-task scheduling mode. If resources corresponding to the multi-task animation exist and it is in multi-task scheduling mode, the electronic device can execute S307 to determine whether an animation end marker exists.
[0203] Furthermore, steps S303 and S305 above are optional. The electronic device may not need to determine whether there are resources corresponding to the multi-task animation, but may directly determine whether there is an animation end marker. Based on this, in some embodiments, the electronic device may execute step S308 above if preset conditions are met. The preset conditions may include the conditions for the end of the previous multi-task animation. Optionally, the preset conditions may also include the electronic device being in a multi-task scheduling mode, and / or the electronic device having resources corresponding to the previous multi-task animation.
[0204] It should be understood that, generally speaking, the absence of an animation end marker indicates that the electronic device is currently running a multi-task animation, and therefore the electronic device possesses the resources corresponding to the multi-task animation. Correspondingly, if it is determined to be in multi-task scheduling mode, and there is no animation end marker, the electronic device can directly reuse the resources corresponding to the multi-task animation.
[0205] The above describes how, in scenarios where multiple tasks are triggered consecutively, an electronic device as the main execution unit, setting an animation end marker can prevent UI clutter during the execution of multi-task animations. The following section continues this discussion. Figure 4 The software structure described is followed by a detailed explanation of the specific implementation process. For example... Figure 9 As shown, the implementation process may include S401-S426.
[0206] S401. In multi-task scheduling mode, the desktop launcher receives a down event at the bottom of the desktop.
[0207] S402: The desktop launcher creates a multi-tasking animation callback and sends request 1 to the shell. Request 1 is used to start the multi-tasking animation.
[0208] S403: In response to request 1, the shell creates an instance of the motion controller and sends request 2 to the core. Request 2 is used to trigger the start of a multi-task transition.
[0209] S404 and core respond to request 2, traverse the windows of the application displayed in the foreground, obtain the animation elements, and start the multi-task transition.
[0210] S405, core sends request 3 to shell. Request 3 carries a motion effect element, which is used to trigger system-side resources for creating multi-task motion effects.
[0211] S406. In response to request 3, for each animation element, the shell constructs the corresponding animation object for that animation element.
[0212] S407. Shell sends the animation objects corresponding to each animation element to SurfaceFlinger.
[0213] S408, SurfaceFlinger creates motion effect layers based on the motion effect object corresponding to the motion effect element.
[0214] The aforementioned animation layer is used to display animation elements, as described above. Figure 2A The layer where window 13 of the music app shown is located.
[0215] S409. Shell sends the instance of the animation controller and the corresponding animation objects of each animation element to the desktop launcher through the above animation callback.
[0216] After obtaining the instance information of the motion controller and the motion object, the S410 desktop launcher creates a motion simulator corresponding to each motion object.
[0217] S411. The desktop launcher creates a background card 1 through an instance of the motion controller. This background card 1 corresponds to the window of the application displayed in the foreground.
[0218] S412, the desktop launcher receives move events.
[0219] S413. In response to the move event, the desktop launcher determines the animation information. This animation information includes background card 1, the target position of the foreground application window, and the target size.
[0220] S414. The desktop launcher, based on the animation simulator, sends the aforementioned animation information to SurfaceFlinger.
[0221] S415 and SurfaceFlinger update the layer containing the foreground application window based on the above animation change information.
[0222] S416. The desktop launcher updates the background card 1 based on the above-mentioned animation change information through an instance of the animation controller.
[0223] S417, The desktop launcher receives the up event. The up event is used to trigger the multitasking termination animation.
[0224] The implementation process of S401-S417 can be referred to the implementation process of S201-S217, and will not be repeated here.
[0225] S418, Desktop launcher settings animation end marker.
[0226] S419, The desktop launcher sends request 4 to the shell. Request 4 is used to indicate that the multitasking animation has ended.
[0227] S420, 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 aforementioned animation objects.
[0228] S421, In response to request 5, the core ends the multi-task transition.
[0229] S422. The desktop launcher cleans up the resources held by the desktop launcher. The resources held by the desktop launcher include the aforementioned animation emulator.
[0230] The above describes the process of the first multitasking animation from start to finish. After the first multitasking animation ends, if the electronic device receives a user input of a swipe-up action from the bottom of the desktop, it needs to initiate a second multitasking animation. The following section will continue to describe the implementation process of the electronic device initiating the second multitasking animation.
[0231] S423. During the process of clearing the resources corresponding to the multitasking animation, the desktop launcher receives the down event again at the bottom of the desktop.
[0232] The implementation process of S419-S423 can be referred to the implementation process of S218-S222, and will not be repeated here.
[0233] S424. The desktop launcher has been confirmed to have an animation end marker.
[0234] S425. The desktop launcher has finished cleaning up the resources held by the desktop launcher.
[0235] S426, Desktop launcher returns to S402.
[0236] In some embodiments, the desktop launcher may clear the animation end marker after determining that an animation end marker exists.
[0237] In this embodiment, when the desktop launcher determines that there is an animation end marker, it recreates the resources corresponding to the multi-task animation, so as to run the multi-task animation using the created resources, and synchronize the changes of the foreground application window and background card with the user's swipe operation.
[0238] It is understandable that the actions performed by the desktop launcher before determining the existence of the animation end marker are only one example; that is, the desktop launcher returning to S402 is only one example. For instance, before determining the existence of the animation end marker, the desktop launcher may have already responded to the down event, created an animation callback, and started the multitasking animation.
[0239] In this application, such as Figure 10As shown, after receiving the first user input of a swipe-up gesture from the bottom of the screen, the electronic device initiates the first multitasking animation, creating system-side resources. The electronic device also creates resources held by the desktop launcher. Subsequently, with each swipe, the first multitasking animation runs. After the user lifts their hand off the screen, the electronic device ends the first multitasking animation, sets an animation end marker, and cleans up the resources corresponding to the first multitasking animation—that is, asynchronously cleans up the system-side resources and resources held by the desktop launcher. Then, upon receiving a second swipe-up gesture from the bottom of the screen, the electronic device confirms the existence of an animation end marker, and creates new system-side resources and resources held by the desktop launcher—that is, creates the system-side resources and resources held by the desktop launcher corresponding to the second multitasking animation. Finally, based on the system-side resources and resources held by the desktop launcher corresponding to the second multitasking animation, the electronic device runs the second multitasking animation, ensuring its proper display.
[0240] It should be noted that the operations performed by the software modules in the aforementioned electronic devices (such as the aforementioned desktop launcher, shell, core, and SurfaceFlinger) can 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 the electronic devices. In other words, the execution subject of the animation display method described in this application is the electronic device.
[0241] The above primarily describes the solutions provided by the embodiments of this application from a methodological perspective. It is understood that, in order to achieve the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Based on the units and algorithm steps of the various examples described in the embodiments disclosed in this application, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by a computer driving 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 solutions of the embodiments of this application.
[0242] This application provides embodiments for dividing an electronic device into functional modules based on the above method examples. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into a single processing unit. The integrated unit can be implemented in hardware or as a software functional module. It should be noted that the unit division in this application embodiment is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used.
[0243] like Figure 11 The diagram shown is a structural schematic of an electronic device according to an embodiment of this application. This electronic device 1000 can be used to implement the methods executed 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 in executing the methods shown in Figures 1 to 1003. Figure 10 The electronic device described in any one of the following embodiments includes a communication unit 1002 for supporting the communication function of the electronic device 1000, and a display unit 1003 for supporting the display function of the electronic device 1000.
[0244] Optional, Figure 11 The illustrated electronic device 1000 may also include a storage unit ( Figure 11 (not shown in the image), this storage unit stores a program or instruction. When the processing unit 1001 executes the program or instruction, it causes... Figure 11 The electronic device 1000 shown can perform the method described in the above-described method embodiments.
[0245] Figure 11 The technical effects of the electronic device 1000 shown can be referred to the technical effects described in the above method embodiments, and will not be repeated here. Figure 11 The processing unit 1001 in the illustrated electronic device 1000 can be implemented by a processor or processor-related circuit components, and can be a processor or processing module. The communication unit 1002 can be implemented by a transceiver or transceiver-related circuit components, and can be a transceiver or transceiver module. The display unit 1003 can be implemented by display screen-related components.
[0246] This application also provides a chip system, such as... Figure 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 are interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices. As another example, the interface circuit 1102 can be used to send signals to other devices (e.g., the processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in memory and send those instructions to the processor 1101. When the instructions are executed by the processor 1101, the electronic device can perform the various steps performed by the electronic device in the above embodiments. Of course, the chip system may also include other discrete components, and this application embodiment does not specifically limit this.
[0247] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0248] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application does not limit this. For example, 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 disposed separately on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor.
[0249] For example, the chip system may 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 micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0250] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0251] This application also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the motion display method described in the above method embodiments.
[0252] This application provides a computer program product, which includes a computer program or instructions that, when executed on an electronic device, cause the electronic device to perform the motion effect method described in the above method embodiments.
[0253] In addition, this application embodiment also provides an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the apparatus to perform the motion effect display methods in the above-described method embodiments. The electronic devices, computer storage media, computer program products, or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to in the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0254] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0255] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The embodiments can be combined with or referenced to each other without conflict. The apparatus embodiments described above are merely illustrative; for example, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0256] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0257] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0258] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0259] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for displaying animation effects, characterized in that, Applied to electronic devices, the method includes: Display a first interface; wherein the first interface includes a window of a first application displayed as a floating window; Receive the user's first operation; wherein the first operation can trigger the start of multi-task animation; In response to the first operation, under the condition that preset conditions are met, the window of the first application and the first background card corresponding to the window of the first application are synchronously changed based on the first resource; wherein, the preset conditions include the condition that the previous multi-task animation ended; the first resource is a resource related to the display of multi-task animation 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 includes: If the conditions for the previous multi-tasking animation to end are not met, the window of the first application and the first background card are synchronized based on the second resource; wherein, the second resource is a resource related to the display of the previous multi-tasking animation.
3. The method according to claim 1 or 2, characterized in that, The conditions for the end of the previous multi-task animation include the presence of a first marker or the value of a second marker being a first preset value; wherein, the first marker is set when the previous multi-task animation ends; and the value of the second marker is set when the previous multi-task animation ends.
4. The method according to claim 3, characterized in that, After synchronizing the changes of 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 method further includes: Clear the first marker or set the value of the second marker to a second preset value; After clearing the first marker or setting the value of the second marker to a second preset value, the method further includes: Receive a second operation; wherein the second operation is used to terminate the multi-task animation. In response to the second operation, a second interface is displayed, and the first marker is set, or the value of the second marker 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 multitasking animation display held by the desktop launcher and resources related to multitasking animation 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 claim 1 or 2, characterized in that, The preset conditions also include the electronic device being in a multi-task scheduling mode; wherein, the multi-task scheduling mode represents a mode that can display 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 claim 1 or 2, characterized in that, The preset conditions also include the existence of a second resource.
8. The method according to claim 7, characterized in that, The method further includes: If an instance of a motion controller exists, it is determined that the second resource exists; If no instance of the motion controller exists, 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 processors are coupled; the display screen is used to display images generated by the processor, the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs the motion 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 that, when executed on an electronic device, cause the electronic device to perform the motion 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 the processor, it implements the motion display method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Floating window display method and electronic equipment
CN116820314A
Upper sliding effect exception handling method and electronic equipment
CN116991274A