Window display method, electronic equipment and computer storage medium

By adjusting the parameters of window attribute change, the problem of inconsistent window movement in multiple window attribute change scenarios is solved, the visual effect is improved, and the harmonious unity of window animation is achieved.

CN119645540APending Publication Date: 2025-03-18HUAWEI DEVICE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311206884.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the scene where the attribute changes of multiple windows, the attribute changes of each window are separated from each other, and the movements are not uniform, resulting in poor visual effects.

Method used

By detecting a trigger event, the attribute change parameters of each window are obtained, and the parameters of the passive change window are adjusted according to the parameters of the active change window to ensure the harmonious and unified animation process of all windows.

Benefits of technology

It effectively solves the problem of inconsistent window movements, improves the visual effect, and enables the multi-window animation process to be started and ended synchronously.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645540A_ABST
    Figure CN119645540A_ABST
Patent Text Reader

Abstract

The invention provides a window display method, electronic equipment and a computer storage medium, the method is applied to the electronic equipment, and the method comprises the following steps: displaying a first window of a first application; detecting a first event, wherein the first event is used for triggering a preparation process of a second window of a second application; obtaining a first attribute change parameter of the first window and a second attribute change parameter of the second window; adjusting the first attribute change parameter according to the second attribute change parameter, and obtaining a third attribute change parameter of the first window; and displaying the animation process of the first window according to a third attribute change parameter, and displaying the animation process of the second window according to the second attribute change parameter. For example, the animation process of the second window is an approach process. According to the method and the device, the problems that attribute changes of the windows are mutually split and motion is not uniform in a multi-window attribute change scene can be solved, and the visual effect is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] At present, electronic devices such as smart phones can display windows of multiple applications at the same time. In one scenario, when the electronic device displays window 1 of application 1, in response to the received input event, it prepares window 2 of application 2 to implement the entry process of window 2. In this case, the position, angle and other properties of window 1 and window 2 may change, but the displacement trajectories of the two windows are separated and do not move synchronously, so an abrupt visual effect will be produced. In other words, in the scenario where the attributes of multiple windows change, the attribute changes of each window are separated from each other, and the movement is not uniform, resulting in poor visual effects. Summary of the invention

[0003] The present application discloses a window display method, an electronic device and a computer storage medium, which can solve the problem that the attribute changes of each window are separated from each other and the movement is not uniform in the scene of multi-window attribute changes, and effectively improve the visual effect.

[0004] In a first aspect, the present application provides a window display method, applied to a first device, the first device including a display screen, the method including: displaying a first window of a first application; detecting a first event, the first event being used to trigger a preparation process of a second window of a second application; obtaining a first attribute change parameter of the first window and a second attribute change parameter of the second window; adjusting the first attribute change parameter according to the second attribute change parameter, and obtaining a third attribute change parameter of the first window; displaying an animation process of the first window according to the third attribute change parameter, and displaying an animation process of the second window according to the second attribute change parameter.

[0005] In some examples, the preparation process includes obtaining display content of the second window, such as drawing the second window. The preparation process is used to implement an animation process of the second window, for example, the preparation process is a preparation process of an animation process of the second window. The animation process of the second window is an entry process of the second window, and the entry process of the second window, for example, includes moving a display area from an edge of the display screen to within the display screen.

[0006] In the above method, the first event detected by the first device is used to trigger the preparation process of the second window, so the second window is actively changed, and the other first windows are passively changed. The first device can adjust the attribute change parameters of the passively changed first window according to the attribute change parameters of the actively changed second window, and then display the animation process of the first window and the second window according to the attribute change parameters, so as to ensure that the animation process of the first window and the second window is harmonious and unified, and there will be no problems such as mutual occlusion, displacement trajectory fragmentation, control jitter, position abnormality, etc., that is, it solves the problem of the attribute changes of each window being separated from each other and the movement being inconsistent in the scenario of multi-window attribute changes, thereby effectively improving the visual effect.

[0007] In a possible implementation, the attribute change parameter includes at least one of the following: a displacement parameter, a magnification or reduction scale parameter, transparency, a rotation value, and an interpolator, wherein the interpolator is used to indicate a rate of change of an animation process.

[0008] In some examples, the property change parameters are the property change parameters of the window preset by the first device. Therefore, the property change parameters of the window of each application are in a unified format, which makes it convenient for the first device to adjust the property change parameters of the first window according to the property change parameters of the second window, and to synchronously display the animation process of the first window and the second window.

[0009] In a possible implementation, the displaying of the first window of the first application includes: displaying the first window in a first area; the adjusting the first attribute change parameter according to the second attribute change parameter includes: when the first area is different from the second area, and / or the first window located in the first area overlaps with the second window located in a third area, adjusting the first attribute change parameter according to the second attribute change parameter, the second area being the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area being the area where the second window is located after the animation process is executed according to the second attribute change parameter; the method also includes: when the first area is the same as the second area, and the first window located in the first area and the second window located in the third area do not overlap, displaying the animation process of the first window according to the first attribute change parameter, and displaying the animation process of the second window according to the second attribute change parameter.

[0010] In some examples, the first area is different from the second area, indicating that the animation process performed by the first window according to the first attribute change parameter includes moving the display area. In some examples, when the first window located in the first area overlaps with the second window located in the third area, the content of the first window in the overlapping area is blocked by the second window.

[0011] In the above method, the first device will adjust the attribute change parameters of the passively changing first window according to the attribute change parameters of the actively changing second window only under specific circumstances (i.e., the animation process performed by the first window according to the first attribute change parameter includes moving the display area, and / or, when overlapping, the content of the first window is blocked by the second window), and in non-specific circumstances (i.e., the display area remains unchanged when the first window performs the animation process according to the first attribute change parameter, and the content of the first window will not be blocked by the second window when overlapping), the obtained attribute change parameters can be directly used to display the animation process. Among them, in the above specific circumstances, if the obtained attribute change parameters are directly used to display the animation process, there may be problems such as inconsistent movement between windows and / or the content of the passively changing first window being blocked, that is, poor visual effect, but in non-specific circumstances, only the second window moves (the display area of ​​the first window remains unchanged), and will not block the content of the first window, and there is no problem of poor visual effect. Therefore, the above implementation method can avoid unnecessary processing while solving the poor visual effect, thereby avoiding the waste of processing resources and saving power consumption.

[0012] In a possible implementation, the displaying of the first window of the first application includes: displaying the first window in a first area; adjusting the first attribute change parameter according to the second attribute change parameter includes: when the first area is different from the second area, and the first window located in the first area overlaps with the second window located in a third area, determining whether the first attribute change parameter and the second attribute change parameter both include a first parameter, the second area being the area where the first window is located after the animation process is executed according to the first attribute change parameter, the third area being the area where the second window is located after the animation process is executed according to the second attribute change parameter, and the first parameter being a displacement parameter in a first direction and / or A scale parameter for enlarging or reducing in a first direction; when the first attribute change parameter and the second attribute change parameter both include the first parameter, the interpolator parameter in the first attribute change parameter is set to the interpolator parameter in the second attribute change parameter, the interpolator parameter in the third attribute change parameter is the same as the interpolator parameter in the second attribute change parameter, and the parameters in the third attribute change parameter other than the interpolator parameter are the same as the corresponding parameters in the first attribute change parameter; when the first attribute change parameter and / or the second attribute change parameter do not include the first parameter, the first attribute change parameter is set to the second attribute change parameter, and the third attribute change parameter is the same as the second attribute change parameter.

[0013] In some examples, the animation process performed by the first window according to the first property change parameter does not include an exit process of the first window.

[0014] In some examples, when the first attribute change parameter and the second attribute change parameter both include the first parameter, the first window and the second window have the same displacement direction and / or the same enlargement or reduction direction.

[0015] In the above method, the first device can determine whether the displacement direction and / or scaling direction of the first window and the second window are consistent, and adjust the attribute change parameters of the first window "according to local conditions" according to the judgment result. If they are consistent, the interpolator parameters of the first window are set to the interpolator parameters of the second window, that is, when the change direction during the animation process is consistent, the change rate is also consistent. If they are inconsistent, the attribute change parameters of the first window are set to the attribute change parameters of the second window, that is, when the change direction during the animation process is inconsistent, the change direction and change rate during the animation process are consistent. Therefore, in the above two cases, the change direction and change rate of the first window and the second window during the animation process are consistent, achieving a harmonious and unified effect of movement.

[0016] In a possible implementation, the displaying of the first window of the first application includes: displaying the first window in a first area; adjusting the first attribute change parameter according to the second attribute change parameter includes: when the first area is different from the second area, and when the first window located in the first area overlaps with the second window located in a third area, setting the first attribute change parameter to the second attribute change parameter, the third attribute change parameter is the same as the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter.

[0017] In some examples, the animation process performed by the first window according to the first property change parameter does not include an exit process of the first window.

[0018] In the above method, the first device, under a specific situation (i.e., the animation process executed by the first window according to the first attribute change parameter includes moving the display area, and the content of the first window is blocked by the second window when overlapping), can directly set the attribute change parameter of the first window to the attribute change parameter of the second window, and use the simplest and most direct processing logic to implement: the change direction and change rate remain consistent during the animation process of multiple windows, so as to achieve a harmonious and unified effect of movement and reduce processing resources.

[0019] In a possible implementation, the displaying of the first window of the first application includes: displaying the first window in a first area; adjusting the first attribute change parameter according to the second attribute change parameter includes: when the first area is different from the second area, and when the first window located in the first area overlaps with the second window located in a third area, adding an exit parameter to the first attribute change parameter, and setting the interpolator parameter in the first attribute change parameter to the interpolator parameter in the second attribute change parameter, wherein the exit parameter is determined according to the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter.

[0020] In some examples, the animation process performed by the first window according to the first property change parameter includes an exit process of the first window.

[0021] In a possible implementation manner, the exit parameter is a displacement parameter in the second attribute change parameter.

[0022] In the above method, the first device can add the displacement parameters of the second window to the displacement parameters of the first window, thereby preventing the second window from blocking the first window during the animation of the first window and the second window, and allowing the first window and the second window to move in the same direction. In addition, the interpolator parameters of the first window can be set to the interpolator parameters of the second window, ensuring that the change rate of the first window and the second window remains consistent during the animation, thereby effectively improving the user's visual experience.

[0023] In a possible implementation, the displaying of the first window of the first application includes: displaying the first window in a first area; adjusting the first attribute change parameter according to the second attribute change parameter includes: when the first area is the same as the second area, and the first window located in the first area overlaps with the second window located in a third area, setting the first attribute change parameter to the second attribute change parameter, the third attribute change parameter is the same as the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter.

[0024] In the above method, the first device can set the attribute change parameters of the first window to the attribute change parameters of the second window in another specific situation (i.e., the animation process executed by the first window according to the first attribute change parameters does not include moving the display area, and the content of the first window is blocked by the second window when overlapping), and the set attribute parameters include, for example, displacement parameters and interpolator parameters. In this way, the animation process of the first window can include moving the display area, and the moving distance and change rate are consistent with the animation process of the second window, which not only achieves the effect of harmonious and unified movement, but also avoids the second window blocking the first window during the animation process of the first window and the second window, effectively improving the user's visual effect.

[0025] In a possible implementation, the displaying of the first window of the first application includes: displaying the first window in a first area; adjusting the first attribute change parameter according to the second attribute change parameter includes: when the first area and the second area are different, and the first window located in the first area and the second window located in the third area do not overlap, setting the interpolator parameters in the first attribute change parameter to the interpolator parameters in the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter, the interpolator parameters in the third attribute change parameter are the same as the interpolator parameters in the second attribute change parameter, and the parameters in the third attribute change parameter other than the interpolator parameters are the same as the corresponding parameters in the first attribute change parameter.

[0026] In the above method, the first device, under another specific situation (i.e., the animation process executed by the first window according to the first attribute change parameter includes moving the display area, and the content of the first window will not be blocked by the second window), can set the interpolator parameters of the first window to the interpolator parameters of the second window. Regardless of whether the movement directions of the first window and the second window are consistent, the movement change rate remains consistent. In this way, while achieving the unification of multi-window movements, the original change method of the first window can be retained as much as possible, which is more in line with user habits.

[0027] In a possible implementation, the displaying of the first window of the first application includes: displaying the first window in a first area; adjusting the first attribute change parameter according to the second attribute change parameter includes: setting the second parameter in the first attribute change parameter to a corresponding parameter in the second attribute change parameter, the second parameter being a parameter in the first attribute change parameter other than a displacement parameter; or setting the displacement parameter in the first attribute change parameter to a third parameter, a fourth area being located in the display screen, a distance between the fourth area and one side edge of the display screen being a preset distance, and the fourth area being the area where the first window is located after being moved according to the third parameter.

[0028] In some examples, the animation process performed by the first window according to the first property change parameter does not include an exit process of the first window.

[0029] In some examples, the setting of the second parameter in the first property change parameter to the corresponding parameter in the second property change parameter is performed when: part or all of the fifth area is not located in the display screen. In some examples, the setting of the displacement parameter in the first property change parameter to the third parameter is performed when: part or all of the fifth area is not located in the display screen. The fifth area is the area where the first window is located after it is moved according to the displacement parameter in the second property change parameter.

[0030] In the above method, the first device can set the displacement parameter of the first window to the displacement parameter of the second window without the first window exiting the display. However, before making this setting, it can be determined whether the fifth area (i.e., the area where the first window is located after being moved according to the displacement parameter of the second window) exceeds the range of the display screen. If it exceeds the range, other adjustment methods can be selected, such as setting the second parameter in the first attribute change parameter to the corresponding parameter in the second attribute change parameter (i.e., keeping the displacement parameter of the first window unchanged, and other parameters can be adjusted), or setting the displacement parameter in the first attribute change parameter to the third parameter (i.e., setting the displacement parameter of the first window to a value that the display area after movement will not exceed the range of the display screen, and other parameters can be adjusted), so that the display area of ​​the first window is always located within the display screen, avoiding the following situation: in order to achieve the unified movement of multiple windows, the user cannot see the content of the first window, thereby further improving the user experience.

[0031] In a possible implementation, the animation process of the first window is displayed according to the third attribute change parameter, and the animation process of the second window is displayed according to the second attribute change parameter, including: when the vertical synchronization signal of the next frame arrives, using the same rendering thread to draw and render the animation process of the first window and the animation process of the second window.

[0032] In the above method, the first window and the second window can be animated in a unified manner, which solves problems such as view jitter and abnormal displacement distance during the animation process, ensures the coordination of multiple windows during the animation process, and allows the animation process of multiple windows to achieve the effect of "synchronous start and end", effectively improving the user experience.

[0033] In a possible implementation, the animation process of the second window includes an entry process of the second window, the entry process of the second window includes the display area moving from the edge of the display screen to the inside of the display screen, and the preparation process corresponds to the entry process of the second window. In some examples, when the display area is at the edge of the display screen, one side edge of the display area overlaps with one side edge of the display screen, and the content of the display area is not within the display screen.

[0034] In a possible implementation, the first window includes an input box control, and the detecting the first event includes: receiving a first user operation acting on the input box control in the first window; the second window of the second application is a keyboard window of an input method application.

[0035] In one possible implementation, the first device and the second device are connected; the first event is detected, including: displaying a multi-device multi-tasking center interface, the multi-device multi-tasking center interface including multiple applications running by the second device; receiving a second user operation acting on the second application of the second device in the multi-device multi-tasking center interface; in response to the second user operation, sending a first request message to the second device; and receiving a data stream of the second window sent by the second device.

[0036] In a possible implementation manner, the first event includes a first notification message, and the second window is used to display the first notification message.

[0037] In the above method, the second window can be a keyboard window of the input method application of the first device "awakened" by the user operation, the second window can also be a window of an application running on other devices (such as the second device), and the second window can also be a notification window for displaying notification messages, with a wide range of application scenarios.

[0038] In a possible implementation, the first window and the second window are both activities of an application; or, the first window and the second window are both views of an application; or, the first window is the activity of the application and the second window is the view of the application; or, the first window is the view of the application and the second window is the activity of the application.

[0039] In some examples, an activity of an application corresponds to a window, and a view of the application corresponds to at least one control in the window.

[0040] In the above method, the first window can be an activity or view of an application, and the second window can also be an activity or view of an application. That is, the method provided in this application is a system-level solution, which can be applied to the animation process of any type of window. It can be implemented without the active adaptation of the application developer, ensuring that the animation effects of multiple windows in different scenarios on the same device are consistent, thereby improving the user experience.

[0041] In a second aspect, the present application provides another window display method, which is applied to a first device, wherein the first device includes a display screen, and the method includes: displaying a first window of a first application and a second window of a second application; detecting a first event, wherein the first event is used to trigger an exit process of the second window; obtaining a first attribute change parameter of the first window and a second attribute change parameter of the second window; adjusting the first attribute change parameter according to the second attribute change parameter, and obtaining a third attribute change parameter of the first window; displaying an animation process of the first window according to the third attribute change parameter, and displaying an animation process of the second window according to the second attribute change parameter.

[0042] In some examples, the animation process of the second window is the exit process of the second window, and the exit process of the second window includes, for example, the display area moving from the inside of the display screen to the edge of the display screen. In some examples, when the display area is at the edge of the display screen, one side edge of the display area overlaps with one side edge of the display screen, and the content of the display area is not within the display screen.

[0043] Possible implementations of the second aspect are similar to possible implementations of the first aspect. For details, please refer to the description of any implementation of the first aspect, and no further details will be given.

[0044] In a third aspect, the present application provides an electronic device comprising a processor and a memory; the memory is used to store a computer program, and the processor calls the computer program to execute the window display method provided by the first aspect, the second aspect, and any one of the implementation methods of the first aspect and the second aspect.

[0045] In a fourth aspect, the present application provides a computer storage medium storing a computer program, which, when executed by a processor, is used to execute the window display method provided by the first aspect, the second aspect, and any one of the implementations of the first aspect and the second aspect.

[0046] In a fifth aspect, the present application provides a computer program product. When the computer program product runs on a device, the device executes a window display method provided by the first aspect, the second aspect, and any one of the implementations of the first aspect and the second aspect.

[0047] In a sixth aspect, the present application provides an electronic device, the electronic device comprising a method or device for executing any aspect or implementation of the present application. The above electronic device is, for example, a chip.

[0048] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single implementation. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one implementation. Therefore, the description of technical features, technical solutions or beneficial effects in this application does not necessarily refer to the same implementation. Furthermore, the technical features, technical solutions and beneficial effects described in this application can also be combined in any appropriate manner. Those skilled in the art will understand that this application can be implemented without one or more specific technical features, technical solutions or beneficial effects of a specific implementation. In other implementations, additional technical features and beneficial effects can also be identified in specific implementations that do not embody all implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The following is an introduction to the drawings used in this application.

[0050] Figure 1 It is a hardware structure diagram of an electronic device provided by the present application;

[0051] Figure 2 It is a schematic diagram of the software architecture of an electronic device provided by this application;

[0052] Figure 3A-3D is a schematic diagram of some user interfaces provided by this application;

[0053] Figure 4A-4D are schematic diagrams of some further user interfaces provided by this application;

[0054] Figure 5A-5D are schematic diagrams of some further user interfaces provided by this application;

[0055] Figure 6A-6F are schematic diagrams of some further user interfaces provided by this application;

[0056] Figure 7A-7D are schematic diagrams of some further user interfaces provided by this application;

[0057] Figure 8 It is a flowchart of a window display method provided by the present application;

[0058] Figure 9A-9C is a schematic diagram of some interpolators provided in this application;

[0059] Fig.10 It is a flowchart of another window display method provided by the present application;

[0060] Fig.11It is a flowchart of another window display method provided by the present application. DETAILED DESCRIPTION

[0061] The technical solution in the embodiment of the present application will be described below in conjunction with the accompanying drawings. In the description of the embodiment of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiment of the present application, "multiple" means two or more than two.

[0062] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0063] When an electronic device displays window 1 of application 1 (hereinafter referred to as application window or window), if an input event related to window 2 of application 2 is detected, the display area, size, angle, transparency and other properties of window 1 and window 2 will change, for example, both will move / displace. In one scenario, the electronic device can respond to the above input event to display the entry process of window 2, and the entry process includes a change from non-display to display, such as a movement process from the edge of the display screen to the inside of the display screen. In another scenario, the electronic device can respond to the above input event to display the exit process of window 2, and the exit process includes a change from display to non-display, such as a movement process from the inside of the display screen to the edge of the display screen. It can be understood that when the properties of the application window change, there is an actively changing application window (i.e., the application window corresponding to the input event detected by the electronic device), and optionally at least one passively changing application window, for example, the above-mentioned window 2 of application 2 is actively changed, and the window 1 of application 1 is passively changed.

[0064] For the convenience of explanation, when describing the display area of ​​a window in the following embodiments, any position in the display area may be used to represent the display area. Therefore, the position of the window described in the following embodiments is actually the display area of ​​the window.

[0065] At present, when the properties of an application window change, the passively changing window will be displayed in accordance with the end position of the property change of the actively changing window. For example, when an electronic device displays a chat application window, the user triggers the window of the input method application (assuming it pops up from the bottom of the screen). The window of the input method application will shift upward and finally display at position A. The passively changing chat application window will jump directly to position A for display. The displacement trajectories of the actively changing window and the passively changing window are separated, and they do not move synchronously, so an abrupt visual effect will be produced, and there may also be problems such as abnormal position and control jitter. In other words, in the scenario where the properties of multiple windows change, the property changes of each window are separated from each other, and the movement is not uniform, resulting in poor visual effects.

[0066] Although there is a solution at present: third-party applications can monitor the position data of the system view (WindowInsets) (the system view includes the window of the input method application, the status bar (usually displayed at the top), and the navigation bar) through the WindowInsetsAnimation.Callback class, and adjust the properties of the application accordingly according to the monitored position data. It can be understood as "the system view moves, and the window of the third-party application moves with it", which is still asynchronous movement. This can only alleviate the problem of abrupt visual effects, but cannot fundamentally solve the problem. This solution requires the developer of the third-party application to add the above-mentioned monitoring and adjustment functions related to the WindowInsetsAnimation.Callback class through coding. If it is not actively adapted, it cannot be achieved. However, it is actually impossible to guarantee that all third-party applications of electronic devices will actively adapt. In addition, this solution can only be applied to the attribute change scenarios of the application window and the system view, and cannot be applied to the attribute change scenarios of multiple application windows. Therefore, the application scenarios of this solution are limited, and the attribute change effects of multiple windows in different scenarios in the same device are likely to be inconsistent (some are better, some are worse), resulting in a poor user experience.

[0067] The embodiment of the present application provides a window display method, which is applied to electronic devices. The electronic device can be preset with uniform type of attribute change parameters, for example, horizontal displacement, vertical displacement, horizontal magnification or reduction ratio, vertical magnification or reduction ratio, rotation value, transparency, interpolator (used to define the rate of change of the attribute change process, such as the distance moved per second). When the electronic device detects a trigger event, the attribute change parameters of the actively changing window and the passively changing window can be obtained, and the attribute change parameters of the passively changing window can be adjusted according to the attribute change parameters of the actively changing window. The electronic device can determine the attribute change process (also referred to as the animation process) of each window according to the attribute change parameters of each window, and uniformly draw and render animations of multiple windows. The actively changing window and the passively changing window can be referred to as windows that need to be linked. Among them, the attribute change parameters of the passively changing window obtained by the above electronic device can be empty, that is, before adjustment, the passively changing window will not actually change its attributes, and the attribute change parameters of the passively changing window obtained by the above electronic device can also not be empty, that is, before adjustment, the passively changing window will change its attributes.

[0068] In an embodiment of the present application, multiple application windows of an electronic device can be animated in a unified manner, so that the property changes of multiple windows can be triggered synchronously to achieve the effect of "synchronous start and end", and the property change parameters of the passively changed window are determined based on the property change parameters of the actively changed window. Therefore, it can be ensured that the windows that need to be linked will not block each other, and it can also be ensured that the windows that need to be linked move in a coordinated manner during the property change period (i.e., during the animation process), the controls have no jitter, and the displacement distance has no deviation, effectively solving the problems of the property changes of each window being separated from each other, the inconsistent movements, and the abrupt visual effects, and the animation effect viewed by the user is unified and harmonious.

[0069] The application window in the embodiment of the present application can be an application activity (Activity) or a view (View) included in the application activity. For the convenience of explanation, the application activity will be referred to as activity in the following description. Among them, an application of an electronic device can include at least one Activity, and an Activity can include at least one View. In one embodiment, Activity is an interface for interaction between a user and an application. Activity is for the application to draw an interface in it. Activity can fill the screen (expressed as full-screen display), or it can be smaller than the screen and float on top of other Activities (expressed as a floating window or a small window, for example). In one embodiment, an Activity is something that a user can interact with intuitively, which can be expressed as a user interface, and can be understood as one Activity corresponding to one user interface (which can include at least one control). In one embodiment, View is an abstraction of a control of a user interface, and a View can be a control or a group of controls composed of multiple controls.

[0070] The "system-level solution" provided in the embodiments of the present application can be applied to any scenario where the attributes of a window change (for example, scenarios where the Activities of multiple applications need to be linked, for specific examples, see Scenarios 1 to 3 below; scenarios where the Views of multiple applications need to be linked, and scenarios where the Activities of certain applications and the Views of certain applications need to be linked, for specific examples, see Scenarios 4 below). It can be implemented without the need for active adaptation by application developers. It can be understood as optimizing "active application adaptation" to "active system adaptation" to ensure that the animation effects of multiple windows in different scenarios on the same device are consistent, thereby improving the user experience.

[0071] In the embodiment of the present application, the short side direction of the electronic device 100 may be referred to as the horizontal direction, and the long side direction of the electronic device 100 may be referred to as the vertical direction. The horizontal direction and the vertical direction may also be understood as the X-axis direction and the Y-axis direction, and the lower left corner of the electronic device may be regarded as the origin of the coordinate axis, and the X-axis is extended to the right from the origin, and the Y-axis is extended upward from the origin.

[0072] In the embodiments of the present application, the electronic device may be a device equipped with a display screen, and may be, but is not limited to, a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), as well as smart home devices such as smart TVs and smart screens, wearable devices such as smart bracelets, smart watches, and smart glasses, extended reality (XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR), vehicle-mounted devices or smart city devices. The embodiments of the present application do not impose any special restrictions on the specific types of electronic devices.

[0073] Next, the electronic device in the embodiment of the present application is exemplarily introduced.

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

[0075] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the following embodiments, or a combination of multiple interface connection methods.

[0076] Figure 1 A schematic diagram of the hardware structure of an electronic device 100 is exemplarily shown.

[0077] like Figure 1As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0078] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0079] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0080] The processor 110 may also be provided with a memory for storing instructions and data. In one embodiment, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0081] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging implementations, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging implementations, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.

[0082] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In another embodiment, the power management module 141 can also be set in the processor 110. In another embodiment, the power management module 141 and the charging management module 140 can also be set in the same device.

[0083] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0084] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In another embodiment, the antenna can be used in combination with a tuning switch.

[0085] The mobile communication module 150 can provide wireless communication solutions including second generation (2G) / third generation (3G) / fourth generation (4G) / fifth generation (5G) / sixth generation (6G) applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In one embodiment, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In one embodiment, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0086] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0087] In one embodiment, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0088] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0089] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In one embodiment, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0090] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0091] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, etc. of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In one embodiment, the ISP can be set in the camera 193.

[0092] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In one embodiment, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0093] A digital signal processor is used to process digital signals.

[0094] Video codecs are used to compress or decompress digital video.

[0095] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0096] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0097] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0098] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0099] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In one embodiment, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0100] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0101] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0102] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In another embodiment, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In another embodiment, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0103] The earphone jack 170D is used to connect a wired earphone.

[0104] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In one embodiment, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In one embodiment, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0105] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .

[0106] The air pressure sensor 180C is used to measure air pressure. In one embodiment, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0107] The magnetic sensor 180D includes a Hall sensor, and the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.

[0108] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0109] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In one embodiment, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0110] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.

[0111] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.

[0112] The fingerprint sensor 180H is used to collect fingerprints.

[0113] The temperature sensor 180J is used to detect temperature. In one embodiment, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.

[0114] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In another embodiment, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0115] Bone conduction sensor 180M can obtain vibration signals.

[0116] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0117] Motor 191 can generate vibration prompts.

[0118] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0119] The SIM card interface 195 is used to connect a SIM card.

[0120] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. For example, the software system of the layered architecture can be an Android system, or a Harmony operating system (OS), or other software systems, or a system constructed by the above-mentioned multiple software systems. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 100.

[0121] Figure 2 A schematic diagram of a software architecture of an electronic device 100 is exemplarily shown.

[0122] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In one embodiment, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0123] The application layer can include a series of application packages.

[0124] like Figure 2 As shown, the application package may include music, video, call, chat, input method, setting, navigation, Bluetooth, browser and other applications. The application in this application may also be replaced by other software such as applets and atomic services. In the embodiment of this application, an application / application window may correspond to a process. For example, the animation process of the application window is implemented by the corresponding process.

[0125] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0126] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a property manager, and the like.

[0127] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0128] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0129] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0130] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0131] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0132] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, the electronic device 100 vibrates, an indicator light flashes, etc.

[0133] The property manager can be used to load uniform (type) property change parameters for the application window of the electronic device, for example, lateral displacement, longitudinal displacement, lateral enlargement or reduction ratio, longitudinal enlargement or reduction ratio, rotation value, transparency, interpolator (used to define the rate of change of the animation process), etc. In one embodiment, the property manager may include multiple sub-modules, one application may correspond to one sub-module (it can also be understood that one application corresponds to one process), and the property change parameters of each application window can be loaded by the corresponding sub-module. In one embodiment, the property manager can also adjust the property change parameters of the passively changing application window according to the property change parameters of the actively changing application window, for example, setting the property change parameters of the passively changing application window to the property change parameters of the actively changing application window.

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

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

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

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

[0138] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

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

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

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

[0142] The rendering module can be used to uniformly draw and render images for multiple windows that need to be linked, such as uniformly drawing and rendering animations during an animation process. In one embodiment, the rendering module can uniformly draw and render images for multiple windows that need to be linked when a vertical synchronization (vsync) signal of each frame arrives.

[0143] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0144] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with a multi-window attribute change scenario.

[0145] Assume that the display screen 194 displays the window of the chat application in full screen. When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, timestamp of the touch operation and other information). The original input event is stored in the kernel layer. The application framework layer obtains the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch single-click operation, and the control corresponding to the single-click operation as an input box in the window of the chat application as an example, the input method application calls the interface of the application framework layer, starts the input method application, and then controls the display driver by calling the kernel layer, and displays the animation of the chat application window and the input method application window through the display screen 194 (i.e., an animation of upward displacement, in which the display area of ​​the input method application window gradually increases).

[0146] The following describes an application scenario and a user interface example for the scenario.

[0147] Scenario 1: When the electronic device 100 displays the window of the first application in full screen, it can display the process of the window of the second application entering the screen in response to the received input event, and the window of the first application will not exit the screen. For example, the first application is a chat application (hereinafter the window of the chat application is referred to as the chat window), the second application is an input method application (hereinafter the window of the input method application is referred to as the input method window), and the above input event includes user input acting on the input box of the chat window.

[0148] For example, Figure 3AAs shown, the electronic device 100 can display a user interface 310, and the user interface 310 can include a window of a chat application (displayed in full screen in the user interface 310), and the user interface 310 does not display windows of other applications. The user interface 310 may include a title 311 "Wallpaper Sharing", indicating that the user interface 310 is a dialogue interface of the subscription account "Wallpaper Sharing". The user interface 310 may include multiple contents pushed by the subscription account "Wallpaper Sharing", such as content 312 of "November 1 Wallpaper Sharing" and content 313 of "November 2 Wallpaper Sharing". The user interface 310 may also include an operation bar 314, and the controls in the operation bar 314 are, for example, from left to right: a control for switching the content of the operation bar 314, a control for inputting voice, a text input box 314A, a control for inputting expressions, a control for inputting other information, etc. The electronic device 100 can receive a user operation (such as a touch operation) acting on the text input box 314A. In response to the user operation, the electronic device 100 can display the entry process of the input method window. The state of the input method window after the entry process is executed (which can also be understood as the end of the attribute change) can be seen in the following figure. Figure 3B Window 321 is shown.

[0149] like Figure 3B As shown, the user interface 320 may include: a chat window (displayed in full screen in the user interface 320) whose attributes have not changed (i.e., in the original position), and a window 321 of the input method application after the entry process is executed. Figure 3A The user interface 310 shown is similar to the one shown in the figure, except that the user interface 320 also includes a window 321 of the input method application. The approach process of the window 321 may include: the window 321 (the top) gradually moves upward from the bottom of the display screen (assuming that the interpolator 1 indicates the rate of change of the movement process), and reaches position 1 after moving a distance Y1. During the approach process, the display area and display content of the window 321 gradually increase. Position 1 is the position of the top of the window 321 when the attribute change ends. From Figure 3B It can be seen that the window 321 of the input method application at position 1 blocks the content 313 of the chat application at the original position.

[0150] In scenario 1, after the electronic device 100 receives the above user operation, if the original attribute change scheme is used, the chat window will obtain the position of the input method window at the end of the attribute change (which can be referred to as the end position, for example Figure 3B After the position 1 shown in the figure, directly copy the content of the chat window (for example Figure 3B The bottom position of the content 322 shown is set to the end position. That is, the input method window is "slowly moving upwards" and the chat window is "suddenly moving upwards", the displacement directions of the two are consistent, the displacement trajectories are split, and the visual effect is abrupt.

[0151] In the embodiment of the present application, the electronic device 100 may first load and analyze the attribute change parameters of the input method window (assuming that they include longitudinal displacement 1 and interpolator 1), and the attribute change parameters of the chat window (assuming that they include longitudinal displacement 1), wherein longitudinal displacement 1 is the upward movement distance Y1. Among them, the input method window is actively changed, and the chat window is passively changed. The chat window is directly moved to the end position after the end position of the input method window is obtained, so the attribute change parameters include longitudinal displacement 1. The electronic device 100 may determine whether the input method window at the time of attribute change (such as when the attribute change ends) and the chat window at the original position (i.e., the position before the attribute change) overlap based on the analysis results.

[0152] exist Figure 3B In the case shown, the electronic device 100 can determine that the input method window at the end of the attribute change overlaps with the chat window at the original position. At this time, the electronic device 100 can determine whether the attribute change directions (e.g., displacement direction, direction of reduction and / or enlargement) of the two windows are consistent based on the analysis results. Since the attribute change parameters of the two windows have the same longitudinal displacement 1, the displacement directions are consistent. At this time, the electronic device 100 can use the interpolator parameters of the input method window (active change) to cover the interpolator parameters of the chat window (passive change), that is, add the interpolator parameters to the attribute change parameters of the chat window, and the added interpolator parameters are interpolator 1 in the attribute change parameters of the input method window. At the same time, the electronic device 100 can keep other attribute change parameters of the chat window unchanged. Therefore, the attribute change parameters of the chat window adjusted by the electronic device 100 according to the attribute change parameters of the input method window include: longitudinal displacement 1 and interpolator 1.

[0153] Then, the electronic device 100 can draw and render the corresponding animation according to the (adjusted) attribute change parameters of the two windows. For example, see Figure 3C and Figure 3D For example, the electronic device 100 may first display Figure 3A The user interface 310 shown in FIG. 10A receives the user operation on the text input box 314A, and the chat window and the input method window can move based on the same attribute change parameters (i.e., longitudinal displacement 1 and interpolator 1). In this process, the electronic device 100, for example, displays Figure 3C The user interface 330 shown in FIG. 3 shows that the content 322 of the chat window and the window 321 of the input method application have both moved upward by Y2 (less than Y1). At the end of the process, the electronic device 100 displays, for example, Figure 3DIn the user interface 340 shown, the content 322 of the chat window and the window 321 of the input method application have both moved upward by Y1. It can be understood that the chat window and the input method window are rendered simultaneously using the same attribute change parameters, so they will be displaced synchronously, and the displacement distance, displacement direction and displacement change rate are all consistent, so that during the animation process, the displacement trajectories of the two application windows are coordinated and consistent, and no occlusion occurs, which can provide users with good visual effects.

[0154] In the above-mentioned implementation, the attribute change parameter of the input method window includes a longitudinal displacement of 1, and the attribute change parameter of the chat window before adjustment also includes a longitudinal displacement of 1, that is, the two application windows will move in the same direction and the same distance. Therefore, the electronic device 100 only uses the interpolator parameter of the input method window to cover the interpolator parameter of the chat window, so that the two application windows will not block each other during the animation process, and the displacement trajectories are coordinated and consistent. Not limited to this, in another implementation, the displacement parameter in the attribute change parameter of the chat window before adjustment is 0 or a longitudinal displacement of 2, wherein the longitudinal displacement 2 and the longitudinal displacement 1 have the same displacement direction (both upward), but the displacement distance of the longitudinal displacement 2 is less than the displacement distance of the longitudinal displacement 1. In this case, the electronic device 100 can also use the displacement parameter of the input method window to cover the displacement parameter of the chat window, that is, adjust the displacement parameter of the chat window from the longitudinal displacement 2 to the longitudinal displacement 1, so as to avoid the two application windows blocking each other during the animation process.

[0155] Not limited to the scenario 1 of the above example, in other examples, the attribute change directions of the actively changing application window and the passively changing application window are different. For specific examples, please refer to the following scenario 2.

[0156] Scenario 2: When the electronic device 100 displays the floating window of the first application, it can display the process of the window of the second application entering the scene in response to the received input event, and the window of the first application will not exit the scene. For example, the first application is a chat application, the second application is an input method application, and the above input event includes user input acting on the input box of the chat window.

[0157] For example, Figure 4AAs shown, the electronic device 100 can display a user interface 410, and the user interface 410 can include a window of a video application (displayed in full screen in the user interface 410), and a window 411 of a chat application (displayed as a floating window in the user interface 410), wherein the chat application window 411 is displayed on the upper layer of the video application window. Window 411 may include the name of the chat object "Xiao Wang", a chat interface, and a text input box 411A. The electronic device 100 can receive a user operation (such as a touch operation) acting on the text input box 411A. In response to the above user operation, the electronic device 100 can display the entry process of the input method window. The state of the input method window after the entry process is executed (which can also be understood as the end of the attribute change) can be seen below. Figure 4B Window 421 is shown.

[0158] like Figure 4B As shown, the user interface 420 may include: a chat application window 411 (displayed as a floating window) whose attributes have not changed (i.e., in the original position), and a window 421 (displayed as a floating window) of the input method application when the attribute change is completed. Figure 4A The user interface 410 shown is similar to the one shown in the figure, except that the user interface 420 also includes a window 421 of the input method application. The approach process of the window 421 may include: the bottom of the display screen of the window 421 (the top) gradually moves upward (assuming that the interpolator 2 indicates the rate of change of the moving process), and reaches position 2 after moving a distance Y3. Position 2 is the position of the top of the window 421 when the attribute change ends. Figure 4B It can be seen that the window 421 of the input method application at position 2 blocks the window 411 of the chat application at the original position (the left side is at position 3).

[0159] In scenario 2, after the electronic device 100 receives the above user operation, if the original attribute change scheme is used, the chat window will directly set the left position of the chat window to the position to the right of the end position when the end position of the input method window is obtained (assuming that Figure 4B The distance between position 4 and position 3 is Y4). In other words, the input method window is "moving slowly upwards" and the chat window is "moving suddenly to the right". The displacement directions of the two are inconsistent, the displacement trajectories are split, and the visual effect is abrupt.

[0160] In the embodiment of the present application, the electronic device 100 can first load and analyze the attribute change parameters of the input method window (assuming that it includes the longitudinal displacement 3 and the interpolator 2), and the attribute change parameters of the chat window (assuming that it includes the transverse displacement 1), the longitudinal displacement 3 is the upward movement distance Y3, and the transverse displacement 1 is the rightward movement distance Y4. Among them, the input method window is actively changed, and the chat window is passively changed. After the end position of the input method window is obtained, the chat window is directly moved to the right side of the end position. Therefore, the attribute change parameters include the transverse displacement 1. The electronic device 100 can determine whether the input method window and the chat window at the original position overlap based on the analysis results when the attributes are changed.

[0161] exist Figure 4B In the case shown, the electronic device 100 can determine that the input method window at the end of the attribute change overlaps with the chat window at the original position. At this time, the electronic device 100 can determine whether the attribute change directions of the two windows are consistent based on the analysis results. Since the attribute change parameters of the input method application window include a longitudinal displacement of 3, and the attribute change parameters of the chat application window include a lateral displacement of 1, the displacement directions are different. At this time, the electronic device 100 can choose to set the attribute change parameters of the chat window (passive change) as the attribute change parameters of the input method window (active change). However, it is understandable that before the electronic device 100 performs such an adjustment, it will first determine whether the position of the chat application window after such adjustment at the end of the attribute change exceeds the range of the display screen, for example Figure 4B As shown, the distance between the window 411 of the chat application in the original position and the top of the display screen is Y5, and Y5 is less than Y3 (i.e., the displacement distance of the longitudinal displacement 3). Therefore, after the window 411 of the chat application moves upward by Y3, the position will exceed the range of the display screen. When the electronic device 100 determines that it will exceed the range of the display screen, the electronic device 100 will not make such adjustments. In some examples, the electronic device 100 can keep the displacement parameters of the chat window (i.e., horizontal displacement 1) unchanged, but other parameters (such as the enlargement / reduction ratio, rotation value, transparency, interpolator) will use the parameters of the window of the input method application (such as interpolator 2 will still be added to the attribute change parameters of the window of the chat application). Therefore, the attribute change parameters of the chat window adjusted by the electronic device 100 according to the attribute change parameters of the input method window include: horizontal displacement 1 and interpolator 2.

[0162] Then, the electronic device 100 can draw and render corresponding animations according to the attribute change parameters of the two windows. For example, see Figure 4C and Figure 4D For example, the electronic device 100 may first display Figure 4AIn the user interface 410 shown in FIG. 1 , after receiving the user operation on the text input box 411A, the chat window can gradually move to the right by a distance Y4, and the input method window can gradually move upward by a distance Y3. In this process, the electronic device 100, for example, displays Figure 4C In the user interface 430 shown, the window 421 of the input method application has moved upward by Y6 (less than Y3), and the window 411 of the chat application has moved rightward by Y7 (less than Y4). At the end of the process, the electronic device 100 displays, for example Figure 4D In the user interface 440 shown, the chat application window 421 has been displaced upward by Y3, and the input method application window 411 has been displaced to the right by Y4. It can be understood that the chat window and the input method window are rendered simultaneously using the same attribute change parameters, and although the displacement directions are different, the same interpolator 2 is used, so the displacement will occur synchronously, and the displacement change rate is consistent, so that during the animation process, the displacement trajectories of the two application windows are relatively coordinated, and no occlusion will occur, which can provide users with good visual effects.

[0163] Without limitation thereto, in other examples, when the electronic device 100 determines that it will exceed the range of the display screen, the electronic device 100 may also determine the end position of the side of the chat window that exceeds the range of the display screen as: (edge ​​of the corresponding side of the display screen - N pixels), determine the displacement parameters of the corresponding direction based on the end position, and the displacement parameters of other directions remain unchanged, and other parameters (such as the zoom in / out ratio, rotation value, transparency, interpolator) still use the parameters of the input method window. For example, in scenario 2, when the property change of the window 411 of the adjusted chat application ends, the upper position exceeds the upper edge of the display screen, so the upper position can be determined as position 5: (upper edge of the display screen - N pixels), and accordingly, the property change parameters of the window 411 of the adjusted chat application include: horizontal displacement 1 (remains unchanged), vertical displacement 4 (moves upward to position 5), and interpolator 2 (using the interpolator parameters of the input method window).

[0164] Not limited to the above examples, in other examples, when the electronic device 100 determines that the attribute change directions of the input method window and the chat window (scenario 2 is the displacement direction) are different, the attribute change parameters of the input method window can be adjusted: while retaining the original displacement parameters (i.e., the horizontal displacement 1 remains unchanged), the attribute change parameters of the input method window (active change) are used to cover the attribute change parameters of the chat window (passive change) (i.e., adding a longitudinal displacement 3 to the displacement parameters, and adding an interpolator 2 to the interpolator parameters).

[0165] Not limited to the above-mentioned scenarios 1 and 2, in other examples, when the electronic device 100 determines that the actively changing application window overlaps with the passively changing application window at the original position when the attribute changes (such as when the attribute change ends), regardless of whether the attribute change directions of the two windows are consistent, the attribute change parameters of the actively changing application window can be selected to cover the attribute change parameters of the passively changing application window. However, it can be understood that the electronic device 100 will first determine whether the position of the passively changing application window after such adjustment exceeds the range of the display screen at the end of the attribute change. If the judgment result is no, the electronic device 100 will adjust accordingly. For specific examples, please refer to the following scenario 3. If the judgment result is otherwise, it will not be adjusted in this way. The adjustment method at this time is similar to the adjustment method when the electronic device 100 determines that it will exceed the range of the display screen in the above scenario 2, and will not be repeated.

[0166] Scenario 3: When the electronic device 100 displays the floating window of the first application, it can display the process of the window of the second application entering the scene in response to the received input event, and the window of the first application will not exit the scene. Exemplarily, the first application is a setting application (hereinafter the window of the setting application is referred to as the setting window), the second application is an input method application, and the above input event includes user input acting on the input box of the setting window.

[0167] For example, Figure 5A As shown, the electronic device 100 can display a user interface 510, and the user interface 510 can include a window of a browser application (displayed in full screen in the user interface 510), and a window 511 of a settings application (displayed in the form of a floating window in the user interface 510), wherein the window 511 of the settings application is displayed on the upper layer of the window of the browser application. Window 511 may include a functional area 511A at the top, a return control 511B, and a text input box 511C. The functional area 511A, for example, includes a control that is displayed in full screen, a control that is reduced to a floating ball, a control for moving the window, a control for closing the window, and the like. The electronic device 100 can receive a user operation (such as a touch operation) acting on the text input box 511C. In response to the above user operation, the electronic device 100 can display the entry process of the input method window. After the entry process is executed (which can also be understood as the end of the attribute change), the state of the input method window can be seen below. Figure 5B Window 521 is shown.

[0168] like Figure 5B As shown, the user interface 520 may include: a window 511 (displayed as a floating window) of the setting application whose properties have not changed (ie, in the original position), and a window 521 of the input method application when the property change is completed. Figure 5AThe user interface 510 shown is similar to the one shown in the figure, except that the user interface 520 also includes a window 521 of the input method application. The process of the window 521 entering the screen may include: the window 521 (the top) gradually moves upward from the bottom of the display screen (assuming that the interpolator 3 indicates the rate of change of the moving process), and reaches position 6 after moving a distance Y8. Position 6 is the position of the top of the window 521 when the attribute change ends. Figure 5B It can be seen that the window 521 of the input method application at position 6 blocks the window 511 of the setting application at the original position.

[0169] In scenario 3, after the electronic device 100 receives the above user operation, if the original attribute change scheme is used, when the setting window obtains the end position of the input method window, the bottom position of the setting window is directly set to the end position. In other words, the input method window is "moving slowly upwards" and the setting window is "moving suddenly upwards". The displacement directions of the two are consistent, the displacement trajectories are separated, and the visual effect is abrupt.

[0170] In the embodiment of the present application, the electronic device 100 can first load and analyze the attribute change parameters of the input method window (assuming that it includes the longitudinal displacement 5 and the interpolator 3), and the attribute change parameters of the setting window (assuming that it includes the longitudinal displacement 5), and the longitudinal displacement 5 is the upward movement distance Y8. Among them, the input method window is actively changed, and the setting window is passively changed. When the setting window is obtained, it directly moves to the end position after the end position of the input method window is obtained. Therefore, the attribute change parameters include the longitudinal displacement 5. The electronic device 100 can determine whether the input method window at the time of attribute change and the setting window at the original position overlap according to the analysis results.

[0171] exist Figure 5B In the scenario shown, the electronic device 100 can determine that the input method window at the end of the attribute change overlaps the setting window at the original position. At this time, the electronic device 100 can set the attribute change parameters of the setting window (passive change) as the attribute change parameters of the input method window (active change), so the adjusted attribute change parameters of the setting window include: longitudinal displacement 5 and interpolator 3.

[0172] Then, the electronic device 100 can draw and render the corresponding animation according to the (adjusted) attribute change parameters of the two windows. For example, see Figure 5C and Figure 5D For example, the electronic device 100 may first display Figure 5A The user interface 510 shown in FIG. 10A , after receiving the user operation on the text input box 511C, the window of the setting application and the window of the input method application can move based on the same attribute change parameters (i.e., the longitudinal displacement 5 and the interpolator 3). In this process, the electronic device 100, for example, displays Figure 5C In the user interface 530, the chat application window 511 and the input method application window 521 have both moved upward by Y9 (less than Y8). At the end of the process, the electronic device 100 displays, for example, Figure 5D In the user interface 540 shown, the chat application window 511 and the input method application window 521 have both moved upward by Y8. It can be understood that the chat application window and the input method application window are rendered simultaneously using the same attribute change parameters, so they will be displaced synchronously, and the displacement distance, displacement direction and displacement change rate are all consistent, so that during the animation process, the displacement trajectories of the two application windows are coordinated and consistent, and no occlusion occurs, which can provide users with a good visual effect.

[0173] Scenario 4: When the electronic device 100 displays the window of the first application in full screen, it can display the multi-device multi-tasking center page (including the window running on the electronic device 100 and the window running on the electronic device 200) in response to the user operation. Then, the electronic device 100 can display the entry process of the window of the second application in response to the received input event (for example, the user operation of the second application of the electronic device 200 in the multi-device multi-tasking center page), and it will display the exit process of the window of the first application. Exemplarily, the first application is a browser application (the window of the browser application is referred to as the browser window hereafter), and the second application is a video application (the window of the video application is referred to as the video window hereafter).

[0174] For example, Fig. 6AAs shown, the electronic device 100 may first display a user interface 610, and the user interface 610 may include a window of a browser application (displayed in full screen in the user interface 610). When the electronic device 100 displays the user interface 610, it may receive a user operation, such as a sliding operation, and the sliding operation is, for example, a three-finger sliding operation from the bottom of the display screen upward. In response to the user operation, the electronic device 100 may display a user interface of a multi-device multi-task center, that is, display a user interface 620. The user interface 620 may include a device list 621 and an application list 622. The device list 621 may include an icon 621A of "this machine" (i.e., the electronic device 100) and an icon 621B of "AAA's mobile phone" (i.e., the electronic device 200 connected to the electronic device 100). When the icon 621B is in a selected state, the application list 622 is used to display multiple application windows running on the electronic device 200 corresponding to the icon 621B, such as a window of a call application, a window 622A of a video application, and a window of a browser application. The electronic device 100 may receive a touch operation on the window 622A (for example, the touch operation is a drag operation, and the drag operation is to drag the window 622A to the location of the icon 621A). In response to the touch operation, the electronic device 100 may request the electronic device 200 to obtain the video stream of the window 622A, so the electronic device 200 may send the video stream of the window 622A to the electronic device 100. After the electronic device 100 receives the video stream of the window 622A, it may display the process of the video window entering the scene according to the video stream, and display the process of the browser window exiting the scene, which may be referred to as the process of animating the video window and the browser window.

[0175] In scenario 4, after the electronic device 100 receives the video stream of the window 622A of the video application, if the original attribute change scheme is used, the video window's entry process (assuming that the interpolator 4 indicates the rate of change of the entry process) includes: the video window gradually moves downward from the top of the display screen and enlarges, from not displayed to full-screen display; the browser window's exit process (assuming that the interpolator 5 indicates the rate of change of the exit process) includes: the browser window moves from the left and shrinks (for example, the right side of the browser window will move from the right side of the display screen to the left side of the display screen), from full-screen display to not displayed. Moreover, the video window's entry process and the browser window's exit process are independent of each other, and the rates of change of the movement processes are completely different. When the electronic device 100 performs the video window's entry process and the browser window's exit process, the video window and the browser window may block each other. Exemplarily, during the animation process of the video window and the browser window, the electronic device 100 may display Figure 6BIn the user interface 630 shown, the window 631 of the browser application has shrunk to the left and moved a distance Y10 (less than the width of the display screen), and the window 632 of the video application has enlarged downward and moved a distance Y11 (less than 1 / 2 of the length of the display screen), and at this time, the window 632 covers the window 631. In other words, the displacement directions of the video window and the browser window are different, and the change rates of the movement process are also different, resulting in a split displacement track and an abrupt visual effect.

[0176] In the embodiment of the present application, the electronic device 100 can load and analyze the attribute change parameters of the video window (i.e., the attribute change parameters of the entry process, assuming that they include a longitudinal displacement 6, an interpolator 4, and a longitudinal magnification ratio 1), and the attribute change parameters of the browser window (i.e., the attribute change parameters of the exit process, assuming that they include a lateral displacement 2, an interpolator 5, and a lateral reduction ratio 1). The longitudinal displacement 6 is, for example, a downward movement of "1 / 2 the length of the display screen", and the lateral displacement 2 is, for example, a leftward movement of "the width of the display screen". Among them, the video window is actively changed, and the browser window is passively changed. The browser window performs the exit process when it is obtained that the video window is about to enter. The electronic device 100 can determine whether the video window at the time of attribute change and the browser window at the original position overlap based on the analysis results.

[0177] In scenario 4, the browser window at the original position is displayed in full screen, so the video window will overlap with the browser window at the original position when the attribute changes. At this time, the electronic device 100 adds an exit parameter to the attribute change parameter of the browser window (passive change), and uses the interpolator parameter of the video window (active change) to overwrite the interpolator parameter of the browser window, wherein the exit parameter is determined according to the attribute change parameter of the video window, for example, the exit parameter is a displacement parameter of the video window in the overlapping direction, and the overlapping direction can be: the direction in which the video window will overlap with the browser window after moving in this direction, according to Figure 6B It can be obtained that the video window will overlap with the browser window after moving downward, so the exit parameter is the vertical displacement of the video window, that is, the vertical displacement of 6. At the same time, the electronic device 100 can keep other attribute change parameters of the browser window unchanged. Therefore, the attribute change parameters of the browser window adjusted by the electronic device 100 according to the attribute change parameters of the video window include: vertical displacement 6 (i.e., exit parameter), horizontal displacement 2, interpolator 5, and horizontal reduction ratio 1.

[0178] Then, the electronic device 100 can draw and render the corresponding animation according to the (adjusted) attribute change parameters of the two windows. For example, see Figure 6C , Fig.6D and Fig. 6EFor example, the electronic device 100 may first display Fig. 6A In the user interface 610 shown in FIG. 1 , after receiving the video stream of the window 622A of the video application, the browser window can gradually move to the lower left and shrink, and the video window can gradually enlarge and move downward. In this process, the electronic device 100, for example, displays Figure 6C The user interface 640 shown is similar to the user interface 630, except that the window 631 of the browser application is further moved downward by a distance Y11. Figure 6C Afterwards, the electronic device 100 displays, for example, Fig.6D The user interface 650 is shown. Fig.6D Afterwards, the electronic device 100 displays, for example, Fig. 6E The user interface 660 is shown. At the end of the process, the electronic device 100 displays, for example, Fig. 6F The user interface 670 shown includes a video window displayed in full screen. It can be understood that the video window and the browser window are rendered simultaneously using unified attribute change parameters and using the same interpolator 5, so they will be displaced synchronously and at the same displacement change rate, so that during the animation process, the displacement trajectories of the two application windows are coordinated and consistent, and no occlusion will occur (because both include longitudinal displacement 6), which can provide a good visual effect for the user.

[0179] Not limited to the above-mentioned implementation, in another implementation, when the electronic device 200 displays the multi-device multi-tasking center page, a user operation of a window of a second application of the electronic device 200 acting on the multi-device multi-tasking center page is received. In response to the user operation, the electronic device 200 actively sends a video stream of the window of the second application to the electronic device 100, and the electronic device 100 can display the entry process of the window according to the received video stream.

[0180] Scenario 5: When the electronic device 100 displays the floating window of the first application, it can display the entry process of the window of the second application in response to the received input event, and the window of the first application will not exit. For example, the first application is a video application, the second application is a notification bar (hereinafter the window of the notification bar is referred to as the notification window), and the above input event is that the electronic device 100 detects a notification message to be displayed.

[0181] For example, Fig. 7AAs shown, the electronic device 100 can display a user interface 710, and the user interface 710 can be a desktop. The user interface 710 may include a window 711 of a video application (displayed in the form of a floating window). Window 711 can be used to display a video. The electronic device 100 can detect whether there is a notification message to be displayed. When it is detected that there is a notification message to be displayed (for example, for notifying a message sent by a friend in a chat application), the electronic device 100 can display the entry process of the notification window, and the notification window includes the notification message. Among them, the electronic device 100 can periodically detect whether there is a notification message to be displayed, but is not limited to this. When there is a notification message to be displayed in the notification bar, it can also be reported to the electronic device 100, and the embodiment of the present application is not limited to this.

[0182] In scenario 5, after the electronic device 100 detects a notification message to be displayed, if the original attribute change scheme is used, the window of the video application will remain unchanged. Figure 7B As shown, the user interface 720 may include: a window 721 of the notification bar when the attribute change is completed (that is, after the entry process is executed), and a window 711 of the video application whose attribute does not change (that is, always in the original position). The user interface 720 and Fig. 7A The user interface 720 is similar to the one shown in the figure, except that the user interface 720 also includes a window 721 of the notification bar, and the window 721 includes: the application information of the current notification message (i.e., the icon and name of the chat application), the time when the current notification message is detected (i.e., "just now"), and the content of the current notification message (the sender is "Xiao Wang", and the content sent is "[Picture]"). The entry process of window 721 may include: window 721 (the bottom) gradually moves downward from the top of the display screen (assuming that the interpolator 6 indicates the rate of change of the movement process), and reaches position 7 after moving a distance Y12. Position 7 is the position of the bottom of window 721 when the attribute change ends. From Figure 7B It can be seen that the window 721 of the notification bar at position 7 blocks the window 711 of the video application.

[0183] In the embodiment of the present application, the electronic device 100 can first load and analyze the attribute change parameters of the notification window (assuming that it includes the longitudinal displacement 7 and the above-mentioned interpolator 6), as well as the attribute change parameters of the video window (empty / zero), and the longitudinal displacement 7 is the downward movement distance Y12. The electronic device 100 can determine whether the notification window overlaps with the window of the video application at the original position based on the analysis results. Figure 7BIn the scenario shown, the electronic device 100 can determine that the notification window and the video window overlap when the attribute change ends. At this time, the electronic device 100 can set the attribute change parameters of the video window (passive change) to the attribute change parameters of the notification window (active change), so the adjusted attribute change parameters of the video window include: longitudinal displacement 7 and interpolator 6.

[0184] Then, the electronic device 100 can draw and render the corresponding animation according to the (adjusted) attribute change parameters of the two windows. For example, see Figure 7C and Fig.7D For example, the electronic device 100 may first display Fig. 7A In the user interface 710 shown in FIG. 1 , after detecting a notification message to be displayed, the notification window and the video window can move based on the same attribute change parameters (i.e., the longitudinal displacement 7 and the interpolator 6). In this process, the electronic device 100, for example, displays Figure 7C In the user interface 730, the window 711 of the video application and the window 721 of the notification bar are both moved downward by Y13 (less than Y12). At the end of the process, the electronic device 100 displays, for example, Fig.7D In the user interface 740 shown, the window 711 of the video application and the window 721 of the notification bar are both moved downward by Y12. It can be understood that the video window and the notification window are rendered simultaneously using the same attribute change parameters, so they will be displaced synchronously, and the displacement distance, displacement direction and displacement change rate are all consistent, so that during the animation process, the displacement trajectories of the two application windows are coordinated and consistent, and no occlusion occurs, which can provide users with a good visual effect.

[0185] In the above scenarios 1 to 5, the actively changing application window overlaps with the passively changing application window in the original position when the attribute changes (such as when the attribute change ends). In another scenario 6, it is also possible not to overlap (but the attribute change parameters of the passively changing application window before adjustment are not 0 / not empty). At this time, the electronic device 100 can use the interpolator parameters of the actively changing application window to cover the interpolator parameters of the passively changing application window, and other parameters of the passively changing application window (such as displacement parameters) remain unchanged. Exemplarily, it is assumed that in the above scenario 3, the input method window at the end of the attribute change and the setting window in the original position do not overlap. At this time, in Figure 5A The user interface 510 and Figure 5BIn the user interface 520 shown, the display position of the window 511 of the setting application is on the upper side of the display screen, so in the user interface 520, the window 521 of the input method application does not block the window 511 of the setting application. In this case, the electronic device 100 can set the interpolator parameters of the setting window to the interpolator parameters of the input method window (i.e., interpolator 3), and the displacement parameters remain unchanged. The subsequent process is similar to the description of scenario 3 and will not be repeated.

[0186] Not limited to the above scenarios 1 to 6, in another scenario 7, the electronic device 100 may not adjust the attribute change parameters of the application window, but draw and render the corresponding animation after loading the attribute change parameters of the application window. For example, assuming that in the above scenario 5, the input method window at the end of the attribute change (that is, after the entry process is executed) and the chat window at the original position do not overlap, and the attribute change parameters of the chat window are 0 / empty (that is, remain unchanged). At this time, Figure 4A The user interface 410 and Figure 4B In the user interface 420 shown, the display position of the chat application window 411 is on the right side of the display screen, so in the user interface 420, the input method application window 421 does not block the chat application window 411. In this case, the electronic device 100 may not adjust the attribute change parameters of the input method window and the chat window, and the subsequent process is similar to the description of scenario 3 and will not be repeated.

[0187] It can be understood that the scenario of the above examples uses the animation process of the actively changing application window as an example of the entry process. In other examples, the animation process of the actively changing application window can also be an exit process. The instructions for determining the attribute change parameters are similar to those of the above scenarios. The difference is that the animation process is different, and the exit process can be understood as the reverse process of the entry process.

[0188] For example, based on the above scenario 1, the electronic device may first display Figure 3D The user interface 340 shown in the figure, if receiving a user operation acting on the text input box in the user interface 340, can respond to the user operation and display the exit process of the input method window. The description of the attribute change parameters of the chat window and the input method window is consistent with the above scenario 1. Therefore, the animation process of the chat window and the input method window may include: the chat window and the input method window move based on the same attribute change parameters (including the longitudinal displacement 8 and the interpolator 7), that is, move downward at the same change speed Y1. In this animation process, the electronic device 100, for example, displays Figure 3C The user interface 330 shown in FIG. 3 shows that the content 322 of the chat window and the window 321 of the input method application have both moved downward (Y1-Y2). When the animation process ends, the electronic device 100 displays, for example, Figure 3A In the user interface 310 shown, the content 322 of the chat window and the window 321 of the input method application have both moved downward by Y1.

[0189] For example, based on the above scenario 2, the electronic device may first display Figure 4D The user interface 440 shown, if receiving a user operation acting on the text input box in the user interface 440, can display the exit process of the input method window in response to the user operation. Since the input method window and the chat window do not overlap, assuming that the attribute change parameters of the chat window include a reverse lateral displacement 1, and the attribute change parameters of the input method window include a reverse longitudinal displacement 3 and an interpolator 2, according to the instructions for adjusting the attribute change parameters in the above scenario 6, the electronic device can set the interpolator parameters of the chat window to the interpolator 2 of the input method window. Therefore, the adjusted attribute change parameters of the chat window include a reverse lateral displacement 1 and an interpolator 2. At this time, the animation process of the chat window and the input method window may include: the chat window can gradually move to the left a distance Y4, and the input method window can gradually move downward a distance Y3, and the movement speeds are consistent. During this animation process, the electronic device 100, for example, displays Figure 4C In the user interface 430 shown, the window 421 of the input method application has moved downward (Y3-Y6), and the window 411 of the chat application has moved to the left (Y4-Y7). At the end of the animation process, the electronic device 100 displays, for example, Figure 4A In the user interface 410 shown, the window 411 of the chat application has moved to the left by a distance Y4, and the window 421 of the input method application has moved downward by a distance Y3.

[0190] Based on the above scenario 3, the description of the animation process of the input method window as the exit process is similar to the description based on scenario 2 and will not be repeated here.

[0191] Based on the above scenario 5, the description of the animation process of the notification window as the exit process is similar to the description based on scenario 2 and will not be repeated here.

[0192] Based on the above embodiments, the window display method involved in this application is introduced. This method can be applied to Figure 1 The electronic device 100 shown. The method can be applied to Figure 2 An electronic device 100 is shown.

[0193] See also Figure 8 , Figure 8 : is a flowchart of a window display method provided by an embodiment of the present application. The method may include but is not limited to the following steps:

[0194] S101: The electronic device displays a first window of a first application.

[0195] In one implementation, the electronic device may display the first window in full screen. For specific examples, see Figure 3A The user interface 310 and Fig. 6A In another embodiment, the electronic device may also display the first window in the form of a floating window. For specific examples, see Figure 4A The user interface 410 shown, Figure 5A The user interface 510 and Fig. 7A User interface 710 is shown.

[0196] In one implementation, the electronic device may display a first window in the first area.

[0197] S102: The electronic device detects a first event (used to trigger a preparation process for a second window of a second application).

[0198] In one embodiment, the preparation process of the window includes obtaining the display content of the window, such as drawing the window. The preparation process of the window can be used to implement the entry process of the window. The entry process of the window can include moving the display area from the edge of the display screen (which can also be understood as outside the display screen) to the inside of the display screen.

[0199] In one embodiment, the electronic device detects the first event, including: the electronic device receives a user operation, for example, in the above-mentioned scenarios 1-3, the electronic device 100 can receive a touch operation acting on the text input box, and the electronic device 100 can display the entry process of the input method window in response to the touch operation. In another embodiment, the electronic device detects the first event, including: the electronic device receives a message sent by other devices, for example, in the above-mentioned scenario 4, the electronic device 100 can receive a video stream of a video window sent by the electronic device 200, and the electronic device 100 can display the entry process of the video window according to the video stream. In another embodiment, the electronic device detects the first event, including: the electronic device detects the first event by itself, for example, in the above-mentioned scenario 5, the electronic device 100 detects a notification message to be displayed, and the electronic device 100 can display the entry process of the notification window according to the notification message.

[0200] S103: The electronic device obtains a first attribute change parameter of the first window and a second attribute change parameter of the second window.

[0201] In one embodiment, the electronic device can set a uniform type of attribute change parameters for the application window, which may include but are not limited to: horizontal displacement (also known as displacement in the X-axis direction, which can be expressed as TranslateX), vertical displacement (also known as displacement in the Y-axis direction, which can be expressed as TranslateY), horizontal enlargement or reduction ratio (also known as the enlargement or reduction ratio in the X-axis direction, which can be expressed as ScaleX), vertical enlargement or reduction ratio (also known as the enlargement or reduction ratio in the Y-axis direction, which can be expressed as ScaleY), rotation value (for example, the angle of rotation around the center point, which can be expressed as Rotate), transparency (which can be expressed as Alpha, for example, the value range is [0,1], when the value is 0, it means transparent / not displayed, and when the value is 1, it means opaque), interpolator (used to define the rate of change of the animation process, such as the distance moved per second, which can also be called the rate of change used to define the animation, used to modify the animation effect). Among them, the horizontal displacement and the vertical displacement can be called displacement parameters, and the horizontal enlargement or reduction ratio and the vertical enlargement or reduction ratio can be called scaling parameters.

[0202] In some examples, the corresponding interface class of the interpolator in the source code of the electronic device is Interpolator, and a curve changing between [0,1] with uniform speed, positive acceleration, negative acceleration or irregular acceleration can be obtained by inputting a uniformly changing value between [0,1]. It can be understood that the greater the slope of the changing curve, the faster the changing speed.

[0203] Some interpolator curves are shown below as examples.

[0204] In some examples, Fig.9A The figure shows a motion curve of an AccelerateDecelerateInterpolator. The electronic device can set the Interpolator parameter plot to: In this way, the interpolator is obtained. In the motion curve of the interpolator, the inclinations on both sides are small, and the inclination in the middle is large. Therefore, the animation effect modified by the interpolator can be: the change speed is slow at the beginning and end of the animation, and the change speed is fast in the middle of the animation.

[0205] In some other examples, Fig. 9B The electronic device can set the Interpolator parameter plot to: 2,x=0 to 1”, so as to obtain the interpolator. In the motion curve of the interpolator, the inclination of the first half is smaller, and the inclination of the second half is larger. Therefore, the animation effect modified by the interpolator can be: the first half of the animation changes slowly, and the second half of the animation changes quickly.

[0206] In some other examples, Fig. 9C The electronic device can set the Interpolator parameter plot to: 2 (-2+3x),x=0 to 1”, so as to obtain the interpolator. In the motion curve of the interpolator, the inclination is small when the first half is less than 0, and the inclination is large when the second half is greater than 0. Therefore, the animation effect modified by the interpolator can be: the first half of the animation changes in the opposite direction and the change speed is slow. After exceeding the critical value (corresponding to the case where plot is 0), the animation changes in the positive direction and the change speed is fast.

[0207] In one embodiment, the electronic device may obtain the attribute change parameters of the first window and the attribute change parameters of the second window in response to the first event. Exemplarily, after the electronic device detects the first event, the second application may obtain the attribute change mode of the second window, the first application may obtain the attribute change mode of the first window (for example, in combination with the display area where the second window is located after the animation process is executed), or may not obtain the attribute change mode of the first window (that is, determine that the first window remains unchanged, and the attribute change mode obtained may be referred to as empty / 0 later), and the attribute change mode of the above-mentioned window may be understood as the change mode of the animation process of the window. The electronic device may determine the attribute change parameters of the first window and the attribute change parameters of the second window according to the attribute change modes obtained by the first application and the second application, which may be understood as converting the attribute change mode determined by the application itself into the attribute change parameters of the same type. It can be understood that if the attribute change mode of the first window obtained by the first application is empty / 0, the attribute change parameters of the first window determined by the electronic device are also empty / 0.

[0208] In one embodiment, the electronic device may parse the property change parameters of the first window and the second window to obtain the status of the first window and the second window. For example, the electronic device may obtain whether the property of the first window has changed according to the parsing result. For another example, the electronic device may obtain the display area where the second window is located after executing the animation process.

[0209] S104: The electronic device determines whether condition 1 (ie, the position of the first window remains unchanged) and condition 2 (ie, the second window at the end of the attribute change does not overlap with the first window at the original position) are simultaneously satisfied.

[0210] In one embodiment, the electronic device can determine whether conditions 1 and 2 are met simultaneously based on the analysis results obtained in S103, where condition 1 is that the position of the first window remains unchanged, and condition 2 is that the second window at the end of the attribute change and the first window at the original position (i.e., the first window before the attribute has not changed, i.e., the first window in S101) do not overlap.

[0211] In one embodiment, condition 1 may include: the first area of ​​the first window and the second area of ​​the first window are the same, wherein the first area is the display area of ​​the first window in S101, that is, the original area / original position of the first window before the animation process is performed according to the first attribute change parameter obtained in S103, and the second area is the area where the first window is located after the animation process is performed according to the first attribute change parameter obtained in S103, which can also be understood as the area where the first window is located after moving according to the first attribute change parameter. In some examples, the electronic device can determine whether the displacement parameter in the attribute change parameter of the first window is empty / 0, if the judgment result is yes, it is determined that condition 1 is met, and if the judgment result is no, it is determined that condition 1 is not met. In other examples, the electronic device can also determine whether the displacement parameter and the enlargement / reduction parameter in the attribute change parameter of the first window are both empty / 0, if the judgment result is yes, it is determined that condition 1 is met. Not limited to this, in another embodiment, condition 1 can also be that the attribute of the first position remains unchanged, and the electronic device can determine whether the attribute change parameter of the first window is empty / 0, if the judgment result is yes, it is determined that condition 1 is met.

[0212] In one implementation, condition 2 may include: the second window located in the third area does not overlap with the window located in the first area, wherein the third area is the area where the second window is located after the animation process is performed according to the second attribute change parameter obtained in S103, and can also be understood as the area where the second window is located after moving according to the second attribute change parameter. An example of the electronic device determining that condition 2 is satisfied can be found in Figure 3B , Figure 4B , Figure 5B , Figure 7B .

[0213] In one embodiment, when the electronic device determines that both condition 1 and condition 2 are satisfied, the electronic device may not adjust the property change parameter of the first window and execute S105. In another embodiment, when the electronic device determines that both condition 1 and condition 2 cannot be satisfied, the electronic device may determine to adjust the property change parameter of the first window and execute S106.

[0214] S105: The electronic device displays the first window according to the first attribute change parameter, and displays the animation process of the second window according to the second attribute change parameter.

[0215] In one embodiment, when the first attribute change parameter of the first window is empty / 0, the electronic device can keep the display state of the first window unchanged; when the first attribute change parameter of the first window is not empty / 0, the electronic device can display the animation process of the first window according to the first attribute change parameter.

[0216] In one implementation, it is assumed that the first attribute change parameter of the first window is not empty / 0. The electronic device may first determine the animation of the first window according to the first attribute change parameter, and determine the animation of the second window according to the second attribute change parameter of the second window. Then, the electronic device may uniformly draw and render the animation of the first window and the animation of the second window, for example, uniformly draw and render when the vsync signal of the next frame arrives.

[0217] For a scenario example of S105, please refer to the description of scenario 7 above.

[0218] S106: The electronic device adjusts the first attribute change parameter according to the second attribute change parameter, and obtains a third attribute change parameter of the first window.

[0219] In one embodiment, the electronic device may first identify objects (such as Activity, View) that need to be linked in the first window and the second window, and add the identified objects to a preset object list. The object list may be represented as List <object>, which can be used to store any type of object. The object list can be used in the subsequent electronic device to adjust the first attribute change parameter and display the animation process of the application window. It can be understood that the subsequent processing process is for the object list.

[0220] In one implementation, assuming that condition 2 is not satisfied, that is, the second window at the end of the attribute change overlaps the first window at the original position. The electronic device may identify the activity of the second window, the activity of the first window, and / or the view of the overlapping content in the first window as objects that need to be linked. For example, the following situations 1 to 3. In some examples, in the above scenario 1 (for details, see Figure 3B The user interface 320 shown in the figure shows that the window 321 of the input method application at the end of the attribute change blocks the content 313 in the window of the chat application. The content 313 is an overlapping content. Therefore, List <object>It may include: the Activity of window 321, the Activity of the chat application window (which can be understood as the full-screen user interface 320, or the content 322), and the View of the content 313. In other examples, in the above scenario 3 (see Figure 5B The user interface 520 shown in FIG. 1 shows a window 521 of the input method application when the attribute change is completed, and the window 511 of the setting application is covered. There is no specific content in the overlapping part of the two. Therefore, List <object>It may include: the Activity of window 521, the Activity of window 511. In other examples, in the above scenario 5 (for details, see Figure 7B The user interface 720 shown in the figure shows that the window 721 of the notification bar at the end of the property change covers the window 711 of the video application, but the window 711 itself only displays the View of the video content. <object>It may include: Activity of window 721 and View of window 711 .

[0221] In another implementation, the electronic device may identify the Activity of the first window and the Activity of the second window as objects that need to be linked, such as the following situation 4, which may be understood as the entire first window and the entire second window need to be linked.

[0222] In one implementation, the electronic device may determine a method for adjusting the attribute change parameters of the first window according to whether condition 1 is satisfied (i.e., the position of the first window remains unchanged), whether condition 2 is satisfied (i.e., the second window at the end of the attribute change does not overlap with the first window at the original position), and whether the first window exits (i.e., whether the second area is located within the display screen), which may include but is not limited to the following situations:

[0223] Case 1: Conditions 1 and 2 are not met, and the first window does not exit (i.e., the second area is located within the display screen). In this case, the electronic device can determine whether the first attribute change parameter and the second attribute change parameter both include the first parameter (i.e., the only parameter in the first direction and / or the proportional parameter for enlarging or reducing in the first direction), that is, determine whether the attribute change directions (e.g., displacement direction, enlargement and / or reduction direction) of the first window and the second window are the same. When the first attribute change parameter and the second attribute change parameter both include the first parameter, that is, the attribute change directions of the two windows are the same, the electronic device can set the interpolator parameters of the first window to the interpolator parameters of the second window, and the other attribute change parameters of the first window (such as displacement parameters, scaling parameters, rotation values, and transparency) remain unchanged. Therefore, the interpolator parameters in the third attribute change parameters of the first window are the same as the interpolator parameters of the second attribute change parameters of the second window, and the other parameters remain unchanged (i.e., they are still the corresponding parameters in the first attribute change parameters). For specific scenario examples, please refer to the above scenario 1. When the first attribute change parameter and / or the second attribute change parameter does not include the first parameter, that is, the attribute change directions of the two windows are different, the electronic device can set the attribute change parameter of the first window to the attribute change parameter of the second window. Therefore, the third attribute change parameter is the same as the second attribute change parameter. For specific scenario examples, please refer to the above scenarios 2 and 3.

[0224] Case 2: Conditions 1 and 2 are not met, and the first window exits (i.e., the second area is located at the edge of the display screen, which can also be understood as being located outside the display screen). In this case, the electronic device can add an exit parameter to the attribute change parameter of the first window, and set the interpolator parameter of the first window to the interpolator parameter of the second window, and the other attribute change parameters of the first window remain unchanged, wherein the exit parameter is determined based on the attribute change parameter of the second window, for example, the exit parameter is a displacement parameter of the second window, and optionally, the exit parameter is specifically a displacement parameter of the second window in the overlapping direction. For specific scenario examples, see the above scenario 4.

[0225] Case 3: Condition 1 is met (i.e., the position of the first window remains unchanged, so the first window does not exit), but condition 2 is not met. In this case, the electronic device can set the attribute change parameter of the first window to the attribute change parameter of the second window, so the third attribute change parameter is the same as the second attribute change parameter. For specific scenario examples, see the above scenario 5.

[0226] Case 4: Condition 1 is not met, but the second condition 2 is met, and the first window may or may not exit. In this case, the electronic device may set the interpolator parameters of the first window to the interpolator parameters of the second window, and the other attribute change parameters of the first window remain unchanged. Therefore, the interpolator parameters in the third attribute change parameters are the same as the interpolator parameters in the second attribute change parameters, and the other parameters remain unchanged (i.e., they are still the corresponding parameters in the first attribute change parameters). For specific scenario examples, please refer to the above scenario 6.

[0227] Not limited to the above situation 1, in another embodiment, when the attribute change directions of the two windows are the same, the electronic device can not only set the interpolator parameters of the first window to the interpolator parameters of the second window, but also set the displacement parameters of the first window to the displacement parameters of the second window, and other attribute change parameters of the first window remain unchanged. For example, this adjustment method is used when the displacement distance of the first window in direction 1 is smaller than the displacement distance of the second window in direction 1.

[0228] Not limited to the above situation 1, in another embodiment, when the attribute change directions of the two windows are different, the electronic device can retain the displacement parameters of the first window, and set other attribute change parameters of the first window (including displacement parameters in other directions) as the attribute change parameters of the second window. For example, in the above scenario 2, the first attribute change parameters of the first window include a horizontal displacement of 1, the second attribute change parameters of the second window include a vertical displacement of 3 and an interpolator 2, and the third attribute change parameters of the first window include a horizontal displacement of 1, a vertical displacement of 3 and an interpolator 2.

[0229] Not limited to the above situation 1, in another implementation, if conditions 1 and 2 are not met and the first window does not exit (i.e., the second area is located within the display screen), the electronic device may not determine whether the attribute change directions of the first window and the second window are the same, and directly set the attribute change parameter of the first window to the attribute change parameter of the second window, so the third attribute change parameter is the same as the second attribute change parameter. For specific scenario examples, see the above scenario 3.

[0230] Not limited to the above implementation, in another implementation, for the case where the first window does not exit (such as the above case 1, case 3, and case 4), if the first window moves according to the adjusted attribute change parameter, the position will exceed the range of the display screen (that is, part or all of the content in the display area will be located outside the display screen), then the electronic device may not use such an adjustment method. In some examples, the electronic device may set the second parameter in the first attribute change parameter to the corresponding parameter in the second attribute change parameter, and the second parameter is the parameter in the first attribute parameter other than the displacement parameter, that is, the electronic device may keep the displacement parameter of the first window unchanged, and set the other attribute change parameters to the attribute change parameters of the second window. For specific scenario examples, see the above scenario 2. In other examples, the electronic device may set the displacement parameter in the first attribute change parameter to a third parameter, and the area where the first window is located after moving according to the third parameter is the fourth area, the fourth area is located in the display screen, and the distance between the fourth area and the edge of one side of the display screen is a preset distance. For example, assume that the preset distance is N pixels. The electronic device can first determine the end position of the side of the first window (the fourth area) that exceeds the range of the display screen as: (edge ​​of the corresponding side of the display screen - N pixels), and determine the displacement parameter of the corresponding direction of the first window (i.e., the third parameter) based on the end position. The electronic device can adjust the first attribute change parameter based on the third parameter: set the displacement parameter of the corresponding direction to the third parameter. For example, if the third parameter is the displacement parameter of direction 1, only the displacement parameter of direction 1 in the first attribute change parameter is set to the third parameter, and the displacement parameters in other directions can remain unchanged. Other attribute change parameters (such as interpolators) can be set as attribute change parameters of the second window.

[0231] S107: The electronic device displays the animation process of the first window according to the third attribute change parameter, and displays the animation process of the second window according to the second attribute change parameter.

[0232] In one embodiment, the electronic device can determine the animation of the first window according to the adjusted third attribute change parameter of the first window, and determine the animation of the second window according to the second attribute change parameter of the second window. Then, the electronic device can draw and render the animation of the first window and the animation of the second window in a unified manner, for example, drawing and rendering in a unified manner when the vsync signal of the next frame arrives.

[0233] In the above method, the electronic device can use a unified attribute change parameter for each application window, and in a specific case (i.e., the first window will change passively, and / or, the second window that changes actively will overlap with the first window in the original position) (i.e., conditions 1 and 2 are not met), the attribute change parameter of the passively changing first window is adjusted according to the attribute change parameter of the actively changing second window, thereby avoiding the situation in which the first window and the second window block / overlap each other and the displacement trajectory is cut off during the animation process of the application window, and ensuring the coordinated movement of the first window and the second window during the animation process. For example, the electronic device will set the interpolator of the first window to the interpolator of the second window, so that the frame spacing of the two windows can be synchronized, and the problems of control jitter, position abnormality, etc. can be solved, and the animation effects of the two windows can be coordinated and consistent. The above method can be understood as the automatic adaptation of the electronic device system, without the need for the application developer to actively adapt, which not only reduces the work of the application developer at a low cost, but also solves the problem of inconsistent experience effects of different applications due to adaptation reasons, and improves the fluency of the use of the entire electronic device.

[0234] In addition, the electronic device will use unified attribute change parameters for each application window, and draw and render animations at the same time, which can also be called synchronous triggering of attribute changes of multiple objects that need to be linked. Therefore, the animation process of multiple application windows is started and ended synchronously, that is, the displacement occurs synchronously, which improves the coordination of application windows during the animation process, thereby improving the visual effect.

[0235] In the embodiment of the present application, one application / application window can correspond to one process. When the electronic device displays the first window of the first application, if a first event for triggering the preparation process of the second window of the second application is detected, the first window and the second window can use the first process and the second process to obtain the property change mode respectively, but the electronic device can use one rendering thread to implement: the drawing and rendering process of the animation of the first window and the second window, so that the animation process of the first window and the second window occurs synchronously. Fig.10 and Fig.11 Two implementation modes are shown as examples.

[0236] See also Fig.10 , Fig.10 : is a flowchart of another window display method provided by an embodiment of the present application. The method may include but is not limited to the following steps:

[0237] 1. The second window of the second application triggers a property change.

[0238] In one implementation, when the electronic device displays the first window of the first application, a first event may be detected, and the first event is used to trigger the preparation process of the second window. For details, see Figure 8 Description of S101-S102.

[0239] In one embodiment, when the electronic device detects the first event, the second window can trigger a property change. In addition, the system process (systemserver) of the electronic device can sense that the property of the first window needs to be changed accordingly, so a corresponding notification can be sent to the first window to trigger the property change of the first window. It can be understood that the second window is actively changed, and the first window is passively changed.

[0240] 2. The first application loads the animation (at this time, the property change parameters of the first window can be obtained).

[0241] 3. The second application loads the animation (at this time, the property change parameters of the second window can be obtained).

[0242] in, Fig.10 The order of 2 and 3 is not limited.

[0243] 4. The property change parameters of the second window of the second application may be sent to the first application (process) for processing.

[0244] 5. The first application (process) adjusts the property change parameters of the first window according to the property change parameters of the second window.

[0245] Fig.10 For an implementation example of 5, see Figure 8 Description of S106.

[0246] Understandably, the above Fig.10 1 and 3 may be implemented for the process corresponding to the second application / second window. Fig.10 2 and 5 may be implemented by the process corresponding to the first application / first window, and the subsequent process may be loaded into a unified rendering thread for processing, for details, see 6 and 7 below. The rendering thread is, for example, an animation display running module (SurfaceAnimationRunner) of an animation display (SurfaceAnimator).

[0247] 6. The rendering thread of the electronic device determines an animation process according to the (adjusted) attribute change parameters of the first window and the second window, for example, called ApplyAnimation.

[0248] 7. When the vsync signal of the next frame (such as the next single frame) arrives, the rendering thread of the electronic device draws and renders the animation process (which can also be understood as executing the corresponding attribute changes).

[0249] Fig.10 After 7, the electronic device can simultaneously display the animation process of the first window and the animation process of the second window. For details, see Figure 8 Description of the S107.

[0250] See also Fig.11 , Fig.11 : is a flowchart of another window display method provided by an embodiment of the present application. The method may include but is not limited to the following steps:

[0251] 1. The electronic device obtains a first window in a window module corresponding to a first application.

[0252] The electronic device may display the acquired first window.

[0253] 2. The electronic device obtains the second window in the window module corresponding to the second application.

[0254] In one implementation, when the electronic device displays the first window of the first application, a first event may be detected, and the first event is used to trigger the preparation process of the second window. For details, see Figure 8 After the electronic device detects the first event, it can execute the following steps 3 and 4.

[0255] 3. The electronic device obtains the animation message (including attribute change parameters) of the first window in the node (Node) corresponding to the first application (which can also be called loading the animation effect of the first window).

[0256] 4. The electronic device obtains the animation message (including attribute change parameters) of the second window in the Node corresponding to the first application (which can also be called loading the animation effect of the second window).

[0257] Understandably, the above Fig.11 1 and 2 are implemented by the window module corresponding to the first application and the window module corresponding to the second application respectively. Fig.11 3 and 4 are implemented by the Node corresponding to the first application and the Node corresponding to the second application respectively, which can also be called the above Fig.11 1-4 are respectively implemented by the process corresponding to the first application and the process corresponding to the second application. The electronic device can load multiple nodes (i.e., the Node corresponding to the first application and the Node corresponding to the second application) into the same root node (RootNode), and the electronic device can process subsequent processes in the root node, for details, see 5-7 below.

[0258] 5. The electronic device parses the animation message of the window in the data pipeline (transactionData).

[0259] 6. In the animation module, the electronic device controls the properties of the first window according to the animation message of the second window.

[0260] In one implementation, the electronic device may adjust the attribute change parameter of the first window according to the attribute change parameter of the second window. For specific implementation examples, see Figure 8 Description of S106.

[0261] 7. When the vsync signal of the next frame (such as the next single frame) arrives, the electronic device draws and renders the animation process in the rendering module.

[0262] In one implementation, the electronic device may determine the animation process according to the (adjusted) attribute change parameters of the first window and the second window, and draw and render the animation process in a rendering module.

[0263] In one embodiment, after the electronic device executes 6, the processing modules / processing flow may be: redshift renderer (redshift, RS) rendering node (RSRenderNode), rendering node tree (when the vsync signal of the next frame arrives, it is first processed in the rendering thread (RenderThread), and then reaches the rendering node tree after being processed by RSRenderNode and RenderThread), rendering engine, interface processor (Surface Producer) (which can receive the drawn animation sent by the rendering engine and write the drawn animation into the flush buffer (flush buffer)), and submit rendering service (commit Render Service) (used to render the animation stored in the flush buffer on the interface).

[0264] Fig.11 After 7, the electronic device can simultaneously display the animation process of the first window and the animation process of the second window. For details, see Figure 8 Description of the S107.

[0265] exist Fig.10 and Fig.11 In the method shown, the electronic device can use a unified rendering thread, or a unified root node and rendering module to perform the processing process, and when the next frame vsync signal arrives, the animation process of the first window and the second window that need to be linked is uniformly drawn and rendered, that is, the attribute changes of the two windows are synchronously triggered, which solves the problems of view jitter, abnormal displacement distance, etc. during the animation process, ensures the coordination of the two windows during the animation process, achieves the effect of synchronous opening and synchronous ending, and effectively improves the user experience.

[0266] The above process is described by taking the first event as an example to trigger the preparation process of the second window (for implementing the entry process). In other embodiments, when the electronic device displays the first window of the first application and the second window of the second application, an event for triggering the exit process of the second window can be detected. At this time, the electronic device can execute: the process executed after the first event is detected, for example Figure 8 S103-S107, Fig.10 The process, Fig.11 In other embodiments, when the electronic device displays the first window of the first application and the second window of the second application, an event for triggering the motion / movement of the second window may also be detected, and the second window will not exit, which is not limited in the embodiments of the present application.

[0267] The above embodiments are described by taking two windows as an example. In other embodiments, there may be more than two windows that need to be linked. There may be multiple first windows and multiple second windows. The embodiments of the present application do not limit this.

[0268] The methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DWD), or a semiconductor medium (e.g., a solid state drive (SSD)). As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.< / object> < / object> < / object> < / object>

Claims

1. A window display method, characterized in that: Applied to a first device, the first device includes a display screen, and the method includes: Display a first window of a first application; A first event is detected, where the first event is used to trigger a preparation process of a second window of a second application; Acquire a first attribute change parameter of the first window and a second attribute change parameter of the second window; adjusting the first attribute change parameter according to the second attribute change parameter, and obtaining a third attribute change parameter of the first window; The animation process of the first window is displayed according to the third attribute change parameter, and the animation process of the second window is displayed according to the second attribute change parameter.

2. The method according to claim 1, characterized in that The attribute change parameter includes at least one of the following: a displacement parameter, a magnification or reduction ratio parameter, transparency, a rotation value, and an interpolator, wherein the interpolator is used to indicate a change rate of the animation process.

3. The method according to claim 1 or 2, characterized in that The displaying of the first window of the first application includes: Displaying the first window in the first area; The adjusting the first attribute change parameter according to the second attribute change parameter includes: When the first area is different from the second area, and / or the first window located in the first area overlaps with the second window located in the third area, adjusting the first attribute change parameter according to the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter; The method further comprises: When the first area is the same as the second area, and the first window located in the first area and the second window located in the third area do not overlap, the animation process of the first window is displayed according to the first attribute change parameter, and the animation process of the second window is displayed according to the second attribute change parameter.

4. The method according to any one of claims 1 to 3, characterized in that: The displaying of the first window of the first application includes: Displaying the first window in the first area; The adjusting the first attribute change parameter according to the second attribute change parameter includes: When the first area is different from the second area, and the first window located in the first area overlaps with the second window located in the third area, determining whether the first attribute change parameter and the second attribute change parameter both include a first parameter, the second area is an area where the first window is located after the animation process is performed according to the first attribute change parameter, the third area is an area where the second window is located after the animation process is performed according to the second attribute change parameter, and the first parameter is a displacement parameter in a first direction and / or a ratio parameter for enlarging or reducing in the first direction; When both the first attribute change parameter and the second attribute change parameter include the first parameter, the interpolator parameter in the first attribute change parameter is set to the interpolator parameter in the second attribute change parameter, the interpolator parameter in the third attribute change parameter is the same as the interpolator parameter in the second attribute change parameter, and the parameters in the third attribute change parameter other than the interpolator parameter are the same as the corresponding parameters in the first attribute change parameter; When the first attribute change parameter and / or the second attribute change parameter does not include the first parameter, the first attribute change parameter is set to the second attribute change parameter, and the third attribute change parameter is the same as the second attribute change parameter.

5. The method according to any one of claims 1 to 3, characterized in that: The displaying of the first window of the first application includes: Displaying the first window in the first area; The adjusting the first attribute change parameter according to the second attribute change parameter includes: When the first area is different from the second area, and the first window located in the first area overlaps with the second window located in the third area, the first attribute change parameter is set to the second attribute change parameter, the third attribute change parameter is the same as the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter.

6. The method according to any one of claims 1 to 3, characterized in that: The displaying of the first window of the first application includes: Displaying the first window in the first area; The adjusting the first attribute change parameter according to the second attribute change parameter includes: When the first area is different from the second area, and the first window located in the first area overlaps with the second window located in the third area, an exit parameter is added to the first attribute change parameter, and the interpolator parameter in the first attribute change parameter is set to the interpolator parameter in the second attribute change parameter, wherein the exit parameter is determined based on the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter.

7. The method according to claim 6, characterized in that The exit parameter is a displacement parameter in the second attribute change parameter.

8. The method according to any one of claims 1 to 3, characterized in that: The displaying of the first window of the first application includes: Displaying the first window in the first area; The adjusting the first attribute change parameter according to the second attribute change parameter includes: When the first area is the same as the second area, and the first window located in the first area overlaps with the second window located in the third area, the first attribute change parameter is set to the second attribute change parameter, the third attribute change parameter is the same as the second attribute change parameter, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameter, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameter.

9. The method according to any one of claims 1 to 3, characterized in that: The displaying of the first window of the first application includes: Displaying the first window in the first area; The adjusting the first attribute change parameter according to the second attribute change parameter includes: When the first area and the second area are different, and the first window located in the first area and the second window located in the third area do not overlap, the interpolator parameters in the first attribute change parameters are set to the interpolator parameters in the second attribute change parameters, the second area is the area where the first window is located after the animation process is executed according to the first attribute change parameters, and the third area is the area where the second window is located after the animation process is executed according to the second attribute change parameters, the interpolator parameters in the third attribute change parameters are the same as the interpolator parameters in the second attribute change parameters, and the parameters in the third attribute change parameters except the interpolator parameters are the same as the corresponding parameters in the first attribute change parameters.

10. The method according to any one of claims 1 to 3, characterized in that: The displaying of the first window of the first application includes: Displaying the first window in the first area; The adjusting the first attribute change parameter according to the second attribute change parameter includes: Setting the second parameter in the first property change parameter to the corresponding parameter in the second property change parameter, the second parameter being the parameter in the first property change parameter except the displacement parameter; or The displacement parameter in the first attribute change parameter is set to the third parameter, the fourth area is located in the display screen, the distance between the fourth area and one side edge of the display screen is a preset distance, and the fourth area is the area where the first window is located after being moved according to the third parameter.

11. The method according to any one of claims 1 to 10, characterized in that: The animation process of displaying the first window according to the third property change parameter and the animation process of displaying the second window according to the second property change parameter include: When the vertical synchronization signal of the next frame arrives, the animation process of the first window and the animation process of the second window are drawn and rendered using the same rendering thread.

12. The method according to any one of claims 1 to 11, characterized in that: The animation process of the second window includes an entry process of the second window, and the entry process of the second window includes moving the display area from the edge of the display screen to the inside of the display screen. The preparation process corresponds to the entry process of the second window.

13. The method according to any one of claims 1 to 12, characterized in that: The first window includes an input box control, and the detecting of the first event includes: Receiving a first user operation acting on the input box control in the first window; The second window of the second application is a keyboard window of an input method application.

14. The method according to any one of claims 1 to 12, characterized in that: The first device and the second device are connected; and the first event is detected, comprising: Displaying a multi-device multi-tasking center interface, wherein the multi-device multi-tasking center interface includes a plurality of applications running on the second device; receiving a second user operation acting on the second application of the second device in the multi-device multi-tasking center interface; Sending a first request message to the second device; Receive a data stream of the second window sent by the second device.

15. The method according to any one of claims 1 to 12, characterized in that: The first event includes a first notification message, and the second window is used to display the first notification message.

16. The method according to any one of claims 1 to 15, characterized in that: The first window and the second window are both activities of the application; or, The first window and the second window are both views of an application; or, The first window is an activity of the application, and the second window is a view of the application; or, The first window is a view of the application, and the second window is an activity of the application.

17. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the method according to any one of claims 1 to 16.

18. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.

Citation Information

Cited By

  • Window display method and electronic equipment

    CN120723354A