Display control method and electronic equipment
By unified control of the animation display of window layer display elements from different levels, the visual lag problem in Recents animation is solved, and a smoother interface switching experience is achieved.
Patent Information
- Application Number
- CN202510517695.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, Recents animation has visual lag problems in the operating system, resulting in poor user interface switching.
By obtaining the target element, including display elements from window layers at different levels, and uniformly controlling the animation display of all display elements based on preset animation control parameters, ensuring that at least some animation control parameters are the same, especially the startup time is consistent.
It improves the execution efficiency of interface switching animations, reduces frequent state switching and calculations, enhances the overall sense of the interface and user experience, and ensures the smoothness of the animation.
Smart Images

Figure CN120371189A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and more particularly, to a display control method and an electronic device. Background Art
[0002] The Recents animation is an animation process when presenting a list of recently used applications in an operating system. This animation helps users quickly locate and switch to a target application through dynamic visual effects. However, there is a common problem of visual jitter when triggering the Recents animation. Summary of the Invention
[0003] In view of this, the present disclosure provides a display control method and an electronic device.
[0004] One aspect of the present disclosure provides a display control method, including:
[0005] In response to an interface switching animation trigger event, obtaining a target element, where the target element represents all display elements participating in the animation, and at least some of the display elements come from different hierarchical window layers;
[0006] Based on preset animation control parameters, controlling the animation display of all the display elements, at least some of the animation control parameters of all the display elements are the same, and the at least some animation control parameters include a start time.
[0007] According to an embodiment of the present disclosure, the target element includes at least two of a first type of element, a second type of element, and a third type of element. The first type of element comes from an application window layer, the second type of element comes from a floating window layer, and the third type of element comes from a system window layer.
[0008] According to an embodiment of the present disclosure, the obtaining a target element in response to an interface switching animation trigger event includes:
[0009] In response to an interface switching animation trigger event, creating a state transition object through a window management shell, where the state transition object includes the animation control parameters;
[0010] Obtaining a window state list through a window management service, where the window state list includes the target element and display control information associated with the target element.
[0011] According to an embodiment of the present disclosure, the method further includes:
[0012] Associating the target element in the window state list with the state transition object through an application layer;
[0013] The controlling the animation display of all the display elements based on preset animation control parameters includes:
[0014] The application layer controls the animated display of all the display elements according to the animation control parameters and the display control information.
[0015] According to an embodiment of the present disclosure, the obtaining of the window state list by the window management service includes:
[0016] The window management service obtains the target element and the display control information associated with the target element;
[0017] The window management service calls a preset callback method to encapsulate the target element and the display control information according to the different levels.
[0018] According to an embodiment of the present disclosure, the encapsulating of the target element and the display control information according to the different levels includes:
[0019] For each window layer of each level, a remote animation target array corresponding to the window layer is created;
[0020] The display elements of the window layer and the display control information of the display elements are encapsulated into the corresponding remote animation target array.
[0021] According to an embodiment of the present disclosure, the first element includes at least one application window, the second element includes at least one of a floating window, a raised window, and a split window, and the third element includes at least one of a wallpaper, a task bar window, a status bar window, and a navigation bar window.
[0022] According to an embodiment of the present disclosure, when it is detected that the animation progress value of a display element exceeds a preset threshold, a compensation animation is started, and the compensation animation is used to make the animation progress value of the window layer of the display element the same as that of all window layers.
[0023] According to an embodiment of the present disclosure, the window management shell returns the window state list to the application layer.
[0024] Another aspect of the present disclosure provides a display for displaying an interface and an animation;
[0025] A processor, configured to obtain a target element in response to an interface switching animation trigger event, where the target element represents all display elements participating in the animation, and at least some of the display elements come from window layers of different levels; and control the animated display of all the display elements based on preset animation control parameters, at least some of the animation control parameters of all the display elements are the same, and the at least some animation control parameters include a start time.
[0026] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method described above when executed.
[0027] Another aspect of the present disclosure provides a computer program product, which includes computer-executable instructions, and the instructions are used to implement the method described above when executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become clearer. In the drawings:
[0029] Figure 1 Schematically shows an application scenario where a display control method and an electronic device can be applied according to an embodiment of the present disclosure;
[0030] Figure 2 Schematically shows a flowchart of a display control method according to an embodiment of the present disclosure;
[0031] Figure 3 Schematically shows a schematic diagram of a target element in an interface switching animation according to an embodiment of the present disclosure;
[0032] Figure 4 Schematically shows a schematic architecture diagram of a display control method according to an embodiment of the present disclosure;
[0033] Figure 5 Schematically shows a block diagram of a display control device according to an embodiment of the present disclosure;
[0034] Figure 6 Schematically shows a block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0035] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present disclosure.
[0036] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0037] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0038] In cases where expressions similar to "at least one of A, B, and C, etc." are used, generally, it should be interpreted according to the meaning commonly understood by those of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0039] In the embodiments of the present disclosure, in aspects such as the collection, update, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information), they all comply with the provisions of relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data, and to safeguard the security of user personal information, network security, and national security.
[0040] In the embodiments of the present disclosure, before obtaining or collecting user personal information, the authorization or consent of the user is obtained.
[0041] Figure 1 Schematically shows an application scenario where the display control method and the electronic device according to the embodiments of the present disclosure can be applied.
[0042] It should be noted that Figure 1 What is shown is only an example of the application scenario where the embodiments of the present disclosure can be applied, to help those of ordinary skill in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments, or scenarios. For example, in another embodiment, the exemplary application scenario where the display control method and the electronic device can be applied may include a terminal device, but the terminal device can implement the display control method and the electronic device provided by the embodiments of the present disclosure without interacting with the server.
[0043] As Figure 1 shown, the application scenario 100 according to this embodiment may include a terminal device 101, a network 102, and a server 103. The network 102 is used to provide a medium for the communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired and / or wireless communication links, etc.
[0044] Users can use the terminal device 101 to interact with the server 103 via the network 102 to receive or send messages, etc. Users can use the terminal device 101 to execute an interface switching animation to trigger a visual effect. The terminal device 101 obtains a target element in response to an interface switching animation trigger event, and controls the animation display of all display elements based on preset animation control parameters.
[0045] Various communication client applications can be installed on the terminal device 101 and have application windows, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only for example).
[0046] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, desktop computers, and so on.
[0047] The server 103 can be a server that provides various services. For example, it is a server that sets animation control parameters for the target element and / or controls the animation display of all display elements based on preset animation control parameters. Another example is a background management server that supports the websites browsed by users using the terminal device 101 (only for example). The background management server can analyze and process data such as user requests received, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0048] It should be noted that the display control method provided by the embodiments of the present disclosure can generally be executed by the server 103. Correspondingly, the display control device provided by the embodiments of the present disclosure can generally be set in the server 103. The display control method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 103 and capable of communicating with the terminal device 101 and / or the server 103. Correspondingly, the display control device provided by the embodiments of the present disclosure can also be set in a server or a server cluster different from the server 103 and capable of communicating with the terminal device 101. Or, the display control method provided by the embodiments of the present disclosure can also be executed by the terminal device 101, or can also be executed by other terminal devices different from the terminal device 101. Correspondingly, the display control device provided by the embodiments of the present disclosure can also be set in the terminal device 101, or set in other terminal devices different from the terminal device 101.
[0049] For example, the target element may originally be stored in the terminal device 101, or stored on an external storage device and imported into the terminal device 101. Then, the terminal device 101 may locally execute the display control method provided by the embodiments of the present disclosure, or send the target element to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the target element execute the display control method provided by the embodiments of the present disclosure.
[0050] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in
[0051] Figure 2 is merely illustrative. According to the implementation requirements, there may be any number of terminal devices, networks, and servers.
[0052] As Figure 2 shown, the method 200 includes operations S210 to S220.
[0053] In operation S210, in response to an interface switching animation trigger event, obtain the target element.
[0054] According to the embodiments of the present disclosure, the interface switching animation may refer to an animation effect provided by the system or application when the user switches between different interfaces. The interface switching animation may be a Recents animation, a system-level animation, a content transition animation, etc. The interface switching animation trigger event may be triggered by various user operations or system events. For example, various user operations may be that the user clicks the back button, uses a gesture to open an application, etc. For example, system events may be the startup of an application, multitasking switching, etc.
[0055] According to the embodiments of the present disclosure, the target element represents all display elements participating in the animation. For example, in the recents animation, the target element may include an application window, a floating window, a wallpaper, a task bar window, a status bar window, etc.
[0056] According to the embodiments of the present disclosure, at least some display elements come from different hierarchical window layers. For example, different hierarchical window layers may be divided into a basic window layer, a content window layer, a modal window layer, a floating window layer, and a system window layer according to the Z-axis order of the window layers. For another example, different hierarchical window layers may be divided into a focus window layer, a non-focus window layer, and an active window layer according to the priority of the user's current interaction behavior. For still another example, different hierarchical window layers may be divided into an application window layer, a floating window layer, and a system window layer according to the functional use of the window.
[0057] In operation S220, based on preset animation control parameters, control the animation display of all display elements.
[0058] According to an embodiment of the present disclosure, the animation control parameters are used to uniformly control the animation effects of display elements in different window layers. The animation control parameters may include time-related parameters, easing function parameters, visual effect parameters, layout and positioning parameters, etc. For example, the time-related parameters may include animation duration, start time, delay time, number of repetitions, etc. For example, the visual effect parameters may include transparency, transformation, color, etc. For example, the layout and positioning parameters may include position, level, etc.
[0059] According to an embodiment of the present disclosure, at least some of the animation control parameters of all display elements are the same, and at least some of the animation control parameters include the start time. For example, the start times of the display elements from the application window layer, the floating window layer, and the system window layer are the same.
[0060] According to an embodiment of the present disclosure, by making the start times of all display elements participating in the animation the same, and at least some of the display elements come from window layers of different levels, it can be ensured that the display elements from window layers of different levels execute the animation at the same start time. On the one hand, it can reduce the complexity of the animation control logic, improve the execution efficiency of the animation, and avoid frequent state switches and calculations caused by different start times of different elements. On the other hand, it can make the entire interface switching animation coordinated and smooth, enhancing the overall sense of the interface and the user experience.
[0061] The following refers to Figures 3 - 4 , and further illustrates the Figure 2 shown method in combination with specific embodiments.
[0062] Figure 3 Schematically shows a schematic diagram of a target element in an interface switching animation according to an embodiment of the present disclosure.
[0063] As Figure 3 shown, in the display interface 300A of the terminal device, the user can trigger an interface switching animation event by using a sliding operation that pulls up from the bottom of the display interface 300A. The terminal device responds to the sliding operation and obtains the target element.
[0064] According to an embodiment of the present disclosure, the target element may include at least two of a first type of element 310, a second type of element 320, and a third type of element 330. The first type of element comes from the application window layer, which is the main interface for users to interact with the application. For example, the first type of element 310 may include at least one application window, and the application window includes buttons, text boxes, picture views, and so on. The second type of element 320 comes from the floating window layer, which may be a sub-window layer of the application window layer or a window layer independent of the application window layer. The floating window layer is usually used to display temporary, non-modal interface elements. For example, when the floating window layer is a sub-window layer of the application window layer, the second type of element 320 may include floating windows, raised windows, split windows in a split-screen interface, etc. displayed in the application window. For example, when the floating window layer is a window layer independent of the application window layer, the second type of element may be a floating window such as a multi-task card title, a floating notification, a tool panel, etc. The third type of element 330 comes from the system window layer, which is managed by the operating system and is usually used to display system-level interface elements. For example, the third type of element 330 may include at least one of a wallpaper, a task bar window, a status bar window, and a navigation bar window.
[0065] It can be understood that in the case where the wallpaper is provided by the application, the wallpaper can also be the first type of element. Therefore, the above division is only a schematic illustration. Those skilled in the art can make other classifications according to the actual situation.
[0066] Figure 4 Schematically shows an architecture diagram of a display control method according to an embodiment of the present disclosure.
[0067] As Figure 4 shown, the architecture 400 of the display control method provided in this embodiment includes an application layer 410, a window management shell (Wmshell, Window Manager Shell) 420, and a window management service (WMS, Window Manager Server) 430. The application layer 410 may include a launcher application.
[0068] The Launcher is responsible for managing the home screen interface and the startup of the application. In the Recents animation, the Launcher can be used as an entry for user interaction, used to trigger window switching animation events, and coordinate the WMS 430 and the window animation engine WMShell 420 to complete the animation effect. When the user enters the Recents interface through gestures (such as swiping) or keys (such as the multi-task key), the Launcher will notify the WMShell 420 to start executing the window transition animation.
[0069] WMshell420 is used to process window transition animations, control the transition effects of windows, and connect Launcher and WMS430 as an intermediate layer. In the Recents animation, WMShell420 creates and manages the state transition objects (Transitions) of the animation transaction, coordinates the display order and animation effects of windows, and ensures smooth animations.
[0070] WMS430 is responsible for window creation, destruction, layout, and hierarchical management. In the Recents animation, WMS430 responds to requests from WMShell420, adjusts the Z-order of windows, and ensures that windows in the animation are displayed at the correct layer.
[0071] Users can trigger the Recents animation through gestures (such as swiping up from the bottom of the screen) or buttons. Launcher detects the user operation and sends an animation start request to WMShell420. During this process, the window of Launcher can be pulled to the top layer to ensure a smooth transition of the animation. After receiving the request, WMShell420 creates a state transition object (Transition) to define animation control parameters. For example, the animation control parameters include start time, duration, easing function, etc. WMShell420 requests the hierarchical information of the current window from WMS430 to determine the starting state of the animation.
[0072] At the start of the animation, WMS430 pulls the window of Launcher to the top layer to ensure that Launcher participates in the animation process. During the execution of the animation, WMS430 collects a list of window states, which includes the display control information of all display elements participating in the animation, and passes the display control information to WMShell420. WMShell420 obtains the display control information from WMS430 and passes the window state list from WMS430 to the application layer 410 for the application to execute the animation. For example, the application is Launcher or the target application. During the process of WMShell420 returning the display control information to the application layer 410, the display control information can be classified according to the layer, and then the classified display control information is returned to the application layer. The application layer controls the animation display of all display elements according to the animation control parameters and display control information.
[0073] After the animation ends, WMS430 can adjust the window order, place the target window on the top layer, and complete the interface switch. During this process, Launcher may be adjusted to the background so that the target window takes over the foreground.
[0074] The display control information may include an initial state, a target state, a transition path, etc. The initial state may be the position, size, transparency, etc. at the start of the animation. The target state may be the position, size, transparency, etc. at the end of the animation. The transition path may be the change path of the displayed element during the animation, such as translation, scaling, rotation, etc.
[0075] In some embodiments, the target element in the window state list can be associated with the state transition object through the application layer. The window state list contains all target elements participating in the animation and their display control information. The state transition object contains animation control parameters, which are used to define the animation behavior of each displayed element. This enables the application layer to control the animation behavior of the target element using the animation control parameters defined in the state transition object, ensuring that the displayed elements at different window levels can be animated with the same start time, improving the consistency of the animation and the user experience.
[0076] Among them, the application layer can bind each displayed element to the state transition object by traversing the window state list. The binding can usually be implemented using a data structure mapping or a callback function. For example, the data structure mapping can map the unique identifier of the displayed element to the parameters of the state transition object. Another example is that the callback function can register an animation callback for each target element to ensure that the logic in the state transition object can be correctly triggered when the animation starts, updates, or ends.
[0077] In some embodiments, controlling the animation display of the target element can be achieved by the application layer controlling the animation display of all displayed elements according to the animation control parameters and the display control information. This converts the abstract animation control parameters into specific visual effects, ensuring that all displayed elements start to execute according to the same start time in the state transition object.
[0078] The application layer extracts the animation control parameters from the state transition object, such as: start time, duration, easing function, delay time, etc. Next, the application layer extracts the display control information of each target element from the window state list. Then, the application layer calculates the state of each displayed element in each frame according to the animation control parameters and the display control information to achieve a smooth visual transition. For example, position calculation: calculate the intermediate position in each frame according to the initial position, target position, duration, and easing function. Another example is transparency calculation: calculate the intermediate transparency in each frame according to the initial transparency, target transparency, and duration. Finally, the application layer applies the calculation result to the target element by calling the system animation framework or custom animation logic.
[0079] In some embodiments, the target element and the display control information associated with the target element can be obtained through the WMS. The preset callback method is called through the WMS, and the target element and the display control information are encapsulated according to different levels, which can organize and manage the target element more clearly and facilitate subsequent animation control.
[0080] In the scenario of the interface switching animation, the preset callback method can be used to receive the target element and the display control information returned by the WMS. The display control information is encapsulated according to the level of the window layer to form a recognizable data structure. This data structure can be an array, a list, a set, etc. This data structure is used to store all the display elements and their display control information within this window layer. For example, the RemoteAnimationTarget data structure of the remote animation target array.
[0081] Specifically, for each level of the window layer, a corresponding remote animation target array is created for the window layer, and the display elements of the window layer and the display control information of the display elements are encapsulated into the corresponding remote animation target array. During the execution of the animation, the array of a specific window layer can be directly accessed without traversing all elements, thereby improving the efficiency of animation processing.
[0082] For example, using the RemoteAnimationTarget data structure to encapsulate the first type of elements, the second type of elements, and the third type of elements can be respectively represented as RemoteAnimationTarget[] appTargets, RemoteAnimationTarget [] floatTargets, RemoteAnimationTarget[] systemTargets.
[0083] In some embodiments, when it is detected that the animation progress value of a display element exceeds a preset threshold, a compensation animation is started. The compensation animation is used to make the animation progress value of the window layer of the display element the same as that of all window layers.
[0084] The animation progress value generally represents the ratio of the time elapsed from the start of the animation to the current moment to the total duration of the animation. During the execution of the animation, the animation progress value of each display element can be monitored in real time. Specifically, it can be achieved by calculating and recording the current progress value of each element when each frame of the animation is updated. When each frame is updated, the animation progress value of each display element is compared with the preset threshold and the progress values of other elements. If there is a significant difference (i.e., exceeding the preset threshold) in the progress value of a certain element from other display elements, it is determined that the animation progress of the display element is abnormal.
[0085] The compensation animation can make the animation progress of the abnormally displayed element consistent with that of other elements, that is, adjust the animation progress of the abnormally displayed element to be the same as the average animation progress value of all window layers.
[0086] For example, the amount of animation progress to be compensated can be calculated based on the difference between the current progress value of the abnormally displayed element and the average progress value of all window layers. For example, if the progress value of the abnormal element is 0.7 and the average progress value is 0.5, the amount of progress to be compensated is -0.2 (that is, the animation of this element needs to "go back" 0.2 of the progress).
[0087] Figure 5 A block diagram of a display control device according to an embodiment of the present disclosure is schematically shown.
[0088] As Figure 5 shown, the display control device 500 includes an acquisition module 510 and a control module 520.
[0089] The acquisition module 510 is configured to acquire a target element in response to an interface switching animation trigger event, where the target element represents all display elements participating in the animation, and at least some of the display elements come from window layers of different levels. In one embodiment, the acquisition module 510 can be used to perform the operation S210 described above, which will not be elaborated here.
[0090] The control module 520 is configured to control the animation display of all the display elements based on preset animation control parameters, where at least some of the animation control parameters of all the display elements are the same, and the at least some animation control parameters include the start time. In one embodiment, the control module 520 can be used to perform the operation S220 described above, which will not be elaborated here.
[0091] Any one or more of the modules, sub - modules, units, and sub - units according to the embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, sub - modules, units, and sub - units according to the embodiments of the present disclosure can be split into multiple modules for implementation. Any one or more of the modules, sub - modules, units, and sub - units according to the embodiments of the present disclosure can be at least partially implemented as a hardware circuit, such as a field - programmable gate array (FPGA), a programmable logic array (PLA), a system - on - chip, a system - on - substrate, a system - on - package, an application - specific integrated circuit (ASIC), or can be implemented by any other reasonable way of integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, one or more of the modules, sub - modules, units, and sub - units according to the embodiments of the present disclosure can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.
[0092] For example, any number of the acquisition module 510 and the control module 520 can be combined and implemented in one module / unit / sub - unit, or any one of the module / unit / sub - unit can be split into multiple modules / units / sub - units. Alternatively, at least part of the functions of one or more of these modules / units / sub - units can be combined with at least part of the functions of other modules / units / sub - units and implemented in one module / unit / sub - unit. According to the embodiments of the present disclosure, at least one of the acquisition module 510 and the control module 520 can be at least partially implemented as a hardware circuit, such as a field - programmable gate array (FPGA), a programmable logic array (PLA), a system - on - chip, a system - on - substrate, a system - on - package, an application - specific integrated circuit (ASIC), or can be implemented by any other reasonable way of integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the acquisition module 510 and the control module 520 can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.
[0093] It should be noted that the display control device part in the embodiments of the present disclosure corresponds to the display control method part in the embodiments of the present disclosure. For the description of the display control system part, please refer to the display control method part specifically, and details will not be elaborated here.
[0094] Figure 6 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 6The illustrated electronic device is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0095] As Figure 6 shown, the electronic device 600 according to an embodiment of the present disclosure includes a display 601 and a processor 602. The display 601 is configured to display an interface and animations. The processor 602 is configured to, in response to an interface switching animation trigger event, obtain target elements, where the target elements represent all display elements participating in the animation, and at least some of the display elements come from different hierarchical window layers; and based on preset animation control parameters, control the animation display of all display elements, where at least some of the animation control parameters of all display elements are the same, and at least some of the animation control parameters include start times.
[0096] The processor 602 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), and so on. The processor 602 may also include on-board memory for caching purposes. The processor 602 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0097] The processor 602 executes various operations of the method flow according to an embodiment of the present disclosure by executing programs in a read-only memory (ROM) and / or a random access memory (RAM). It should be noted that the programs may also be stored in one or more memories other than the ROM and the RAM. The processor 602 may also execute various operations of the method flow according to an embodiment of the present disclosure by executing programs stored in the one or more memories.
[0098] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface, and the input / output (I / O) interface is also connected to the bus. The electronic device 600 may further include one or more of the following components other than the display 604 connected to the input / output (I / O) interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), etc. and a speaker, etc.; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A driver is also connected to the input / output (I / O) interface as needed. A removable medium, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the driver as needed so that a computer program read from it can be installed into the storage part as needed.
[0099] According to an embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a processor 602, the above functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0100] The present disclosure also provides a computer-readable storage medium, which can be included in the device / device / system described in the above embodiment; or can exist alone without being assembled into the device / device / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0101] According to an embodiment of the present disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. For example, it can include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
[0102] For example, according to an embodiment of the present disclosure, the computer-readable storage medium can include one or more memories other than the above-described ROM and / or RAM and / or ROM and RAM.
[0103] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program includes program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the method provided by the embodiment of the present disclosure.
[0104] When the computer program is executed by a processor 602, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described systems, devices, modules, units, etc. can be implemented by computer program modules.
[0105] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part, and / or installed from a removable medium. The program code included in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0106] According to embodiments of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedures and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, by using an Internet service provider to connect through the Internet).
[0107] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions. Those skilled in the art can understand that the features described in various embodiments and / or claims of the present disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in various embodiments and / or claims of the present disclosure can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.
[0108] The embodiments of the present disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present disclosure.
Claims
1. A display control method, the method comprising: In response to an interface switching animation trigger event, obtaining a target element, the target element representing all display elements participating in the animation, and at least some of the display elements coming from window layers of different levels; Based on preset animation control parameters, controlling the animation display of all the display elements, at least some of the animation control parameters of all the display elements being the same, and the at least some animation control parameters including a start time.
2. The display control method according to claim 1, wherein, The target element includes at least two of a first type of element, a second type of element, and a third type of element, the first type of element coming from an application window layer, the second type of element coming from a floating window layer, and the third type of element coming from a system window layer.
3. The display control method according to claim 1, wherein, The obtaining the target element in response to an interface switching animation trigger event includes: In response to an interface switching animation trigger event, creating a state transition object through a window management shell, the state transition object including the animation control parameters; Obtaining a window state list through a window management service, the window state list including the target element and display control information associated with the target element.
4. The display control method according to claim 3, wherein, The method further includes: Associating the target element in the window state list with the state transition object through an application layer; The controlling the animation display of all the display elements based on preset animation control parameters includes: Controlling the animation display of all the display elements through the application layer according to the animation control parameters and the display control information.
5. The display control method according to claim 3, wherein, The obtaining the window state list through the window management service includes: Obtaining the target element and display control information associated with the target element through the window management service; Invoking a preset callback method through the window management service to encapsulate the target element and the display control information according to the different levels.
6. The display control method according to claim 3, wherein, The encapsulating the target element and the display control information according to the different levels includes: For each window layer level, creating a corresponding remote animation target array; Encapsulating the display elements of the window layer and the display control information of the display elements into the corresponding remote animation target array.
7. The display control method according to any one of claims 2 to 6, wherein, The first element includes at least one application window, the second element includes at least one of a floating window, a raised window, and a split window, and the third element includes at least one of a wallpaper, a task bar window, a status bar window, and a navigation bar window.
8. The display control method according to claim 1, wherein, The method further includes: When it is detected that the animation progress value of a display element exceeds a preset threshold, starting a compensation animation, the compensation animation being used to make the window layer of the display element have the same animation progress value as all window layers.
9. The display control method according to claim 3, wherein, The method further includes: Returning the window state list to the application layer through the window management shell.
10. An electronic device, comprising: A display for displaying an interface and an animation; A processor for obtaining a target element in response to an interface switching animation trigger event, the target element representing all display elements participating in the animation, and at least some of the display elements coming from window layers of different levels; Based on preset animation control parameters, control the animated display of all the display elements, at least some of the animation control parameters of all the display elements being the same, and the at least some animation control parameters including the start time.