Display control method and device, program product, electronic device, and storage medium
By playing application window state switching animations within the terminal device's display interface and updating configuration information after the animations complete, the problem of discontinuous mode switching in multi-window display mode is resolved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-06-30
AI Technical Summary
The transition between modes in a multi-window display mode is not smooth, resulting in a poor user experience.
The animation of the application window switching from its current state to the target state is played within the display interface. After the animation finishes playing, the configuration information of the display interface is updated. The application window and background layer are rendered in a seamless rotation manner to ensure the continuity and stability of the animation.
It achieves a smooth visual transition when switching application window modes, improving the user experience.
Smart Images

Figure CN122308975A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of interface display technology, specifically to a display control method and device, program product, electronic device and storage medium. Background Technology
[0002] In recent years, the functions of terminal devices such as smartphones and tablets have become increasingly richer, and their performance has also improved significantly. For example, some terminal devices are now equipped with multi-window display modes such as free window, split screen, and picture-in-picture, which provide users with a richer experience in using and interacting with the device.
[0003] However, in related technologies, when terminal devices switch modes in a multi-window display format, the transition is often not very smooth, and the abrupt mode switching screen results in a poor user experience. Summary of the Invention
[0004] To overcome the problems existing in the related technologies, this disclosure provides a display control method and apparatus, a program product, an electronic device and a storage medium to solve the defects in the related technologies.
[0005] According to a first aspect of the present disclosure, a display control method is provided, the method comprising:
[0006] If a state switching instruction for an application window within the display interface is received, an animation of the application window switching from its current state to a target state is played within the display interface. The target state is the display state indicated by the state switching instruction, and the display orientation of the application window in the current state is different from that in the target state.
[0007] If the application window reaches the target state, the configuration information of the display interface is updated according to the state switching instruction.
[0008] In some embodiments of this disclosure, playing the animation of the application window switching from its current state to a target state within the display interface includes:
[0009] The animation of the application window switching from its current state to the target state is rendered in a seamless rotation manner, and the application to which the application window belongs fills the application window with display content with configuration information that matches the target state.
[0010] In some embodiments of this disclosure, the method further includes:
[0011] During the playback of the animation, the background layer of the display interface is rendered in real time below the application window.
[0012] In some embodiments of this disclosure, the step of rendering the background layer of the display interface in real time below the application window includes:
[0013] If the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the current state of the application window.
[0014] If the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the target state of the application window.
[0015] In some embodiments of this disclosure, rendering the background layer in real time below the application window in a direction matching the current state of the application window includes:
[0016] Below the application window, non-fixed elements within the background layer are rendered in real time in a direction matching the current state of the application window, and fixed elements within the background layer are rendered in real time in a direction matching the configuration information of the display interface.
[0017] The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
[0018] In some embodiments of this disclosure, rendering the background layer in real time below the application window in a direction matching the target state of the application window includes:
[0019] Below the application window, non-fixed elements within the background layer are rendered in real time in a direction that matches the target state of the application window, and fixed elements within the background layer are rendered in real time in a direction that matches the configuration information of the display interface.
[0020] The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
[0021] In some embodiments of this disclosure, after updating the configuration information of the display interface according to the state switching instruction, the method further includes:
[0022] The fixed elements within the background layer are rendered in real time in a direction that matches the update result of the configuration information of the display interface, wherein the fixed elements are elements that are bound to the configuration information of the display interface.
[0023] In some embodiments of this disclosure, the configuration information of the display interface includes the coordinate system orientation.
[0024] In some embodiments of this disclosure, if the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, then rendering the background layer in real time below the application window in a direction matching the current state of the application window includes:
[0025] If the state switching instruction is used to instruct the application window to switch from portrait small window mode to landscape full-screen mode, then the background layer is rendered in real time in the portrait direction below the application window.
[0026] In some embodiments of this disclosure, if the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, then rendering the background layer in real time below the application window in a direction matching the target state of the application window includes:
[0027] If the state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the background layer is rendered in real time in the portrait direction below the application window.
[0028] In some embodiments of this disclosure, the application window has different sizes in the current state and the target state; and / or,
[0029] The application window is located in different positions in the current state and the target state.
[0030] According to a second aspect of the present disclosure, a display control device is provided, the device comprising:
[0031] An animation playback module is used to play an animation of the application window switching from its current state to a target state in the display interface if a state switching instruction for the application window in the display interface is received. The target state is the display state indicated by the state switching instruction, and the display orientation of the application window in the current state is different from the display orientation of the application window in the target state.
[0032] A configuration update module is used to update the configuration information of the display interface according to the state switching instruction if the application window reaches the target state.
[0033] In some embodiments of this disclosure, the animation emulation module is used for:
[0034] The animation of the application window switching from its current state to the target state is rendered in a seamless rotation manner, and the application to which the application window belongs fills the application window with display content with configuration information that matches the target state.
[0035] In some embodiments of this disclosure, the apparatus further includes a background module for:
[0036] During the playback of the animation, the background layer of the display interface is rendered in real time below the application window.
[0037] In some embodiments of this disclosure, the background module is used for:
[0038] If the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the current state of the application window.
[0039] If the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the target state of the application window.
[0040] In some embodiments of this disclosure, when the background module renders the background layer in real time below the application window in a direction matching the current state of the application window, it is used for:
[0041] Below the application window, non-fixed elements within the background layer are rendered in real time in a direction matching the current state of the application window, and fixed elements within the background layer are rendered in real time in a direction matching the configuration information of the display interface.
[0042] The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
[0043] In some embodiments of this disclosure, when the background module renders the background layer in real time below the application window in a direction matching the target state of the application window, it is used to:
[0044] Below the application window, non-fixed elements within the background layer are rendered in real time in a direction that matches the target state of the application window, and fixed elements within the background layer are rendered in real time in a direction that matches the configuration information of the display interface.
[0045] The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
[0046] In some embodiments of this disclosure, after updating the configuration information of the display interface according to the state switching instruction, the device further includes a compensation module, used for:
[0047] After updating the configuration information of the display interface according to the state switching instruction, the fixed elements in the background layer are rendered in real time in a direction that matches the update result of the configuration information of the display interface, wherein the fixed elements are elements that are bound to the configuration information of the display interface.
[0048] In some embodiments of this disclosure, the configuration information of the display interface includes the coordinate system orientation.
[0049] In some embodiments of this disclosure, the background module is configured to, when rendering the background layer in real time below the application window in a direction matching the current state of the application window, if the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, render the background layer in real time in a direction matching the current state of the application window, and is configured to:
[0050] If the state switching instruction is used to instruct the application window to switch from portrait small window mode to landscape full-screen mode, then the background layer is rendered in real time in the portrait direction below the application window.
[0051] In some embodiments of this disclosure, the background module is configured to, when rendering the background layer in real time below the application window in a direction matching the target state of the application window, if the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, perform the following:
[0052] If the state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the background layer is rendered in real time in the portrait direction below the application window.
[0053] In some embodiments of this disclosure, the application window has different sizes in the current state and the target state; and / or,
[0054] The application window is located in different positions in the current state and the target state.
[0055] According to a third aspect of the present disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0056] According to a fourth aspect of the present disclosure, an electronic device is provided, the electronic device including a memory and a processor, the memory being configured to store computer instructions executable on the processor, and the processor being configured to implement the method of the first aspect when executing the computer instructions.
[0057] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0058] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0059] The display control method provided in this embodiment receives a state switching instruction for an application window within a display interface. It then plays an animation of the application window switching from its current state to a target state within the display interface, and updates the configuration information of the display interface according to the state switching instruction after the application window reaches the target state. This method only plays the state change animation of the application window within the display interface when switching modes, thus visually displaying the mode switching of the application window with a continuous animation, avoiding abrupt mode switching. Furthermore, updating the configuration information of the display interface after the animation is completed avoids the update of the configuration information affecting the continuity and stability of the screen during the animation playback, further improving the continuity of the screen during mode switching, achieving a "smooth transition" visual effect, and improving the user experience. Attached Figure Description
[0060] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0061] Figure 1 This is a schematic diagram of the first mode switching method in the related technology;
[0062] Figure 2 This is a schematic diagram of the first mode switching method in the related technology;
[0063] Figure 3 This is a schematic diagram of the second mode switching method in the related technology;
[0064] Figure 4 This is a flowchart illustrating a display control method according to an exemplary embodiment of this disclosure;
[0065] Figure 5 This is a schematic diagram illustrating the coordinate system orientation according to an exemplary embodiment of this disclosure;
[0066] Figure 6This is a logic diagram illustrating mode switching in an exemplary embodiment of this disclosure;
[0067] Figure 7 This is a schematic diagram illustrating animation playback during mode switching, as shown in an exemplary embodiment of this disclosure;
[0068] Figure 8 This is a schematic diagram illustrating the update of configuration information during mode switching, as shown in an exemplary embodiment of this disclosure;
[0069] Figure 9 This is a schematic diagram of the structure of a display control device shown in an exemplary embodiment of the present disclosure;
[0070] Figure 10 This is a structural block diagram of an electronic device illustrated in an exemplary embodiment of the present disclosure. Detailed Implementation
[0071] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0072] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0073] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0074] Taking the switching of an application window from a small window mode to a full-screen mode on a terminal device as an example, the relevant technologies can be described according to the appendix. Figure 1 The screen freeze / rotation method shown has been successfully switched. Please refer to the attached document. Figure 2The underlying logic of this method, as shown, involves updating the interface configuration information to the full-screen mode configuration after the startup mode switch. The current interface is frozen to generate a screenshot layer, and a fade-out animation (1) with rotation, translation, and transparency changes is constructed for the screenshot layer from its initial state to its final state. An application layer is generated using the application window in full-screen mode, and an entry animation (2) with rotation, translation, and transparency changes is constructed for the application layer from its initial state to its final state. Animations 1 and 2 are played with the screenshot layer as the top layer, the application window as the middle layer, and the background layer as the bottom layer. During the playback of animations 1 and 2, the screenshot layer and the application window remain perpendicular, and the background layer fills the gap between the screenshot layer and the application window in each frame, ensuring that the width of the complete animation is the maximum of the width of animations 1 and 2, and the height is the maximum of the height of animations 1 and 2 (as shown in the attached figure). Figure 2 (The full animation is only partially displayed in each frame.)
[0075] In this method, the cutout layer, application layer, and background layer all participate in the animation, resulting in complex animation components and visual confusion during the switching process. Moreover, the animation during the switching process is not directed at the main body of the mode switching, i.e., the application window, which makes the application window appear discontinuous, the transition unnatural, and the appearance of the application layer abrupt during the switching process. Overall, the switching screen effect is poor.
[0076] Taking the switching of an application window on a terminal device from a small window mode to a full-screen mode as an example, related technologies can also follow the appendix. Figure 3 The method shown is a direct screen rotation without freezing, completing the switch. This method is the same as the attached... Figure 1 The method shown is similar. After switching the startup mode, the configuration information of the interface is updated to the configuration of the full-screen mode. Then, the disappearance animation of the current interface and the enlargement animation of the application window in the full-screen mode are played in sequence. The transition between the two animations is abrupt and unnatural, resulting in a lack of continuity in the transition of the application window.
[0077] Both of the above-mentioned mode switching methods update the display interface configuration information before the screen rotation screen plays. The updated configuration information causes the screen rotation screen to change shape rather abruptly, resulting in unnatural and unsmooth transitions between different forms. In addition, both methods are based on the application window, which leads to poor targeting and a complex and chaotic screen.
[0078] Based on the above-mentioned technical problems, in a first aspect, at least one embodiment of this disclosure provides a display control method. This method can be applied to the operating system of a terminal device to control the mode switching of application windows in a multi-window display format, especially mode switching involving directional rotation, so that the switching process is continuous and natural, the transition of application windows is natural, the smoothness of the screen is improved, and the user experience is enhanced.
[0079] For example, a terminal device's operating system can have a window manager (WM), a display server (SurfaceFlinger, SF), etc. The window manager can include a window manager kernel (WM Core) and a window manager shell (WM Shell). This method can be executed by the window manager and the display server. Of course, the terminal device's operating system also includes other parts, such as the hardware layer, kernel layer, graphical user interface, application layer, etc.
[0080] Please refer to the appendix. Figure 4 The example illustrates the flow of a voice control method, including steps S401 to S402.
[0081] In step S401, if a state switching instruction for an application window within the display interface is received, an animation of the application window switching from its current state to a target state is played within the display interface. The target state is the display state indicated by the state switching instruction, and the display orientation of the application window differs between the current state and the target state.
[0082] The display interface refers to the interface displayed on the terminal device's screen. The display interface can be in a multi-window mode, such as a display interface containing a bottom background layer and a top small window application window. The display interface can also be in a non-multi-window mode, such as a display interface containing a full-screen application window.
[0083] The state switching instruction is used to instruct the application window to switch states. The state of the application window can be represented by a display mode. For example, the state switching instruction can instruct the application window to switch from portrait small window mode to landscape full-screen mode, or it can instruct the application window to switch from landscape full-screen mode to portrait small window mode.
[0084] The state switching command can be generated by user input on the display screen, such as clicking on a specific control or pinching two fingers together at any location on the screen. Alternatively, the state switching command can also be generated by user voice input, such as "Switch application A to full-screen mode".
[0085] For example, the size of the application window in the current state is different from the size of the application window in the target state; and / or, the position of the application window in the current state is different from the position of the application window in the target state.
[0086] For example, if a state switching instruction is used to instruct the application window to switch from portrait small window mode to landscape full-screen mode, then the current state is the application window in portrait small window mode, and the target state is the application window in landscape full-screen mode; as another example, if a state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the current state is the application window in landscape full-screen mode, and the target state is the application window in portrait small window mode.
[0087] It should be understood that the display orientation of the application window in its current state is adapted to the configuration information of the display interface, such as the coordinate system orientation. Please refer to the appendix. Figure 5 The coordinate system orientation in portrait mode is shown in image a, and the coordinate system orientation in landscape mode is shown in image b. In portrait mode with a small window, the display orientation of the application window matches the orientation of the coordinate system in portrait mode; that is, the horizontal direction of the application window is parallel to the horizontal axis of the coordinate system in portrait mode (i.e., the short side of the display interface), and the vertical direction of the application window is parallel to the vertical axis of the coordinate system in portrait mode (i.e., the long side of the display interface). Similarly, in landscape mode with full screen, the display orientation of the application window matches the orientation of the coordinate system in portrait mode; that is, the horizontal direction of the application window is parallel to the horizontal axis of the coordinate system in landscape mode (i.e., the long side of the display interface), and the vertical direction of the application window is parallel to the vertical axis of the coordinate system in landscape mode (i.e., the short side of the display interface). Because the display orientation of the application window in the current state is different from that in the target state, the display orientation of the application window in the target state is not compatible with the configuration information of the display interface; that is, the display orientation of the application window in the target state is different from the display orientation of the display interface.
[0088] Preferably, the animation of the application window switching from the current state to the target state can be rendered in a seamless rotation manner, and the application to which the application window belongs can fill the display content in the application window with configuration information that matches the target state.
[0089] Seamless rotation updates the application window's size, position, and angle in every frame of the animation, resulting in a natural and continuous transition animation from the current state to the target state. For example, seamless rotation can be achieved using features like FixedRotation provided by Windows Mobile. Seamless rotation is the opposite of frozen rotation; both are the two main methods for switching between portrait and landscape orientations. FixedRotation is a type of seamless rotation that addresses scenarios where the application's orientation at launch differs from the current screen orientation. Based on App Transition and seamless rotation, FixedRotation achieves a smoother landscape / portrait transition, avoiding frozen rotation and thus providing a superior user experience. When an application starts, the system determines whether it meets the FixedRotation condition. If it does, the system simulates the screen information after the rotation (DisplayInfo, WmDisplayCutout, RoundedCorners, PrivacyIndicatorBounds, and DisplayFrames) and then passes the relevant information to the application (Confiquency Change). After receiving the new information, the application initiates drawing, and the system compensates for the new direction based on the old direction. This eliminates the need for screen rotation, and the original transition animation can be used for application switching. The application completes its drawing and performs the transition animation, and then the screen rotates. Since the application has already been drawn, a seamless rotation can be performed directly.
[0090] Please refer to the appendix. Figure 6This example illustrates the process of executing this step within the window manager. In response to input input such as double-clicking a mini window (i.e., turning it into full-screen) or pulling down a mini window to turn it into full-screen, indicating that the application window is switching from portrait mini-window mode to landscape full-screen mode, WM Shell initiates a maximize transition animation A and notifies WM Core to start a new transition animation. WM Core modifies the application's WCT (Window Container Transaction) for the current application (i.e., the application to which the current maximize transition animation A is targeted—the application to which the application window belongs), such as changing bounds or mode. Because the configuration update caused by these changes results in a different display direction and mode between the application window's target state and its current state, WM Core initiates FixedRotation and notifies the current application of the configuration change, that is, notifying the application to which the application window belongs to update its configuration to match the target state, so that the application generates display content according to the updated configuration information. After the current application finishes drawing, WM Core controls the transition animation state, that is, it notifies WM Shell of the target state of the application window. WMShell, based on the fact that the target state and the current state have different display directions and modes, triggers the free window animation controller to execute the animation effect of A when distributing the transition animation. The free window animation controller updates the animation properties frame by frame with the corresponding animation component until the animation ends or is canceled, and then notifies WM Core to end the maximized transition animation A.
[0091] The animation effects executed by WM Shell, the display content generated by the current APP, and the background layer are all rendered on the screen by SF.
[0092] Please refer to the appendix. Figure 7 Taking the scenario of the application window switching from portrait small window mode to landscape full screen mode as an example, several key frames of the animation played in this step are shown exemplarily. It can be seen from the figure that in the scene of the mode switching process, the application window is the main body and rotates and zooms continuously and naturally frame by frame. The transition is smooth and continuous, and not complicated or chaotic.
[0093] In step S402, if the application window reaches the target state, the configuration information of the display interface is updated according to the state switching instruction.
[0094] As mentioned above, the configuration information of the display interface may include the coordinate system orientation. Please refer to the appendix. Figure 5The coordinate system orientation in portrait mode is shown in Figure a, and the coordinate system orientation in landscape mode is shown in Figure b. The display method of the application window in the target state differs from the display orientation of the interface before the state switch. Therefore, it is necessary to update the configuration information of the display interface, such as the coordinate system orientation. This method updates the configuration information of the display interface after the animation playback in step S401 is completed, thus avoiding any impact on the animation playback process caused by the configuration information update.
[0095] Please refer to the appendix. Figure 6 This example illustrates the process of performing this step (and rendering the background layer) within the window manager. When the maximize transition animation A ends, the WM Shell's animation component notifies the WM Core to end maximize transition animation A. The WM Core requests screen rotation from the WM Shell, which initiates screen rotation transition animation B and notifies the WM Core to start a new transition animation. The WM Core makes changes to the application's WCT (Window Container Transaction) for the current application (i.e., the application targeted by the current maximize transition animation B—the desktop application), such as updating the display interface's configuration information. The WM Core then controls the transition animation state, notifying the WM Shell to execute screen rotation transition animation B. The WM Shell distributes the transition animation, triggering the Default Transition Handler to execute the animation effect of B. The Default Transition Handler updates the animation properties frame by frame with the corresponding animation component until the animation ends or is canceled, at which point it notifies the WM Core to end screen rotation transition animation B.
[0096] The animation effects and background layer executed by WM Shell are rendered on the screen by SF.
[0097] Please refer to the appendix. Figure 8 Taking the scenario where the application window switches from portrait small window mode to landscape full-screen mode as an example, it exemplifies that after the transition animation is completed, the configuration information is updated, causing a change in the coordinate system direction, that is, the screen rotation animation from portrait to landscape is completed, and this screen rotation is visually imperceptible to the user.
[0098] This method completes the transition animation playback for mode switching under the original coordinate system direction, and updates the coordinate system direction after the animation playback is completed, so that the screen rotation caused by the coordinate system direction update is visually imperceptible and undisturbing to the user.
[0099] The display control method provided in this disclosure, upon receiving a state switching instruction for an application window within a display interface, plays an animation of the application window switching from its current state to a target state within the display interface, and updates the configuration information of the display interface according to the state switching instruction after the animation finishes playing. This method only plays the state change animation of the application window within the display interface when switching modes, thus visually displaying the mode switching of the application window with a continuous animation, avoiding abrupt mode switching scenes. Furthermore, updating the configuration information of the display interface only after the animation finishes playing avoids the update of the configuration information affecting the continuity and stability of the screen during animation playback, thereby further improving the continuity of the screen during mode switching, achieving a "smooth transition" visual effect, and improving the user experience.
[0100] In some embodiments of this disclosure, the method further includes: during the playback of the animation, rendering a background layer of the display interface in real time below the application window. The background layer refers to the layer below the application window within the display interface. For example, the background layer could be the desktop.
[0101] Optional Example 1
[0102] If the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the current state of the application window.
[0103] In this example, the background layer is only displayed under the current state of the application window and the transition animation of the application window. Therefore, rendering the background layer in real time under the application window in a direction that matches the current state of the application window ensures that the background layer does not change in size or direction during the transition animation playback. After playback, the background layer is completely covered by the application window, and its changes are no longer perceived by the user. This further focuses the transition animation on the application window and reduces the complexity of the transition animation.
[0104] To further illustrate, the background layer contains multiple elements. Some of these elements are bound to the configuration information of the display interface, such as the status bar and navigation bar on the desktop, while other elements are not bound to the configuration information of the display interface. This example can render the non-fixed elements within the background layer in real-time, below the application window, in a direction matching the current state of the application window, and render the fixed elements within the background layer in real-time, in a direction matching the configuration information of the display interface. The non-fixed elements are those not bound to the configuration information of the display interface, while the fixed elements are those bound to the configuration information of the display interface.
[0105] To give a further example, the configuration information of the display interface includes the coordinate system orientation. Please refer to the appendix. Figure 5 The coordinate system orientation in portrait mode is shown in image a, and the coordinate system orientation in landscape mode is shown in image b. If the state switching command is used to instruct the application window to switch from portrait window mode to landscape full-screen mode, then this example can render the background layer in real time in portrait mode below the application window. This is because in portrait window mode, the application window partially covers the background layer, while in landscape full-screen mode, the application window completely covers the background layer.
[0106] If the content involved in the two examples above is combined, the example can be executed as follows: If the state switching instruction is used to instruct the application window to switch from portrait small window mode to landscape full-screen mode, the example can render the non-fixed elements in the background layer in real time in the portrait direction below the application window, and render the fixed elements in the background layer in real time in a direction that matches the configuration information of the display interface (which is also the portrait direction in this example). The non-fixed elements are elements that are not bound to the configuration information of the display interface, and the fixed elements are elements that are bound to the configuration information of the display interface.
[0107] Please refer to the appendix for further details. Figure 5 Because the status bar, navigation bar, and coordinate system orientation in the configuration information are bound together—that is, the status bar is always at the top of the coordinate system and the navigation bar is always at the bottom—the following applies... Figure 5 In the portrait orientation shown in screen a, the status bar and navigation bar are parallel to the shorter side of the display interface. In the landscape orientation shown in screen b, the status bar and navigation bar are parallel to the longer side of the display interface. Therefore, if the state switching instruction is used to instruct the application window to switch from portrait window mode to landscape full-screen mode, this example can render all elements in the background layer below the application window in real time in the portrait orientation, except for the status bar and navigation bar, and render the status bar and navigation bar in the background layer in real time in an orientation that matches the configuration information of the display interface (which is also the portrait orientation in this example).
[0108] Optional Example 2
[0109] If the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the target state of the application window.
[0110] In this example, the background layer is only displayed under the target state of the application window and the transition animation of the application window. Therefore, rendering the background layer in real time under the application window in a direction that matches the target state of the application window ensures that the background layer does not change in size or direction during or after the transition animation, thereby further focusing the transition animation on the application window and reducing the complexity of the transition animation.
[0111] To further illustrate, the background layer contains multiple elements. Some of these elements are bound to the configuration information of the display interface, such as the status bar and navigation bar on the desktop, while other elements are not bound to the configuration information of the display interface. This example can render the non-fixed elements within the background layer in real-time, below the application window, in a direction matching the target state of the application window, and render the fixed elements within the background layer in real-time, in a direction matching the configuration information of the display interface. The non-fixed elements are those not bound to the configuration information of the display interface, while the fixed elements are those bound to the configuration information of the display interface.
[0112] To give a further example, the configuration information of the display interface includes the coordinate system orientation. Please refer to the appendix. Figure 5 The coordinate system orientation in portrait mode is shown in image a, and the coordinate system orientation in landscape mode is shown in image b. If the state switching command is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the background layer is rendered in real time in portrait mode below the application window. This is because in portrait small window mode, the application window partially covers the background layer, while in landscape full-screen mode, the application window completely covers the background layer.
[0113] If the content involved in the two examples above is combined, the example can be executed as follows: If the state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the non-fixed elements in the background layer below the application window are rendered in real time in the portrait direction, and the fixed elements in the background layer are rendered in real time in the direction that matches the configuration information of the display interface (landscape direction in this example); wherein, the non-fixed elements are elements that are not bound to the configuration information of the display interface, and the fixed elements are elements that are bound to the configuration information of the display interface.
[0114] Please refer to the appendix for further details. Figure 5 Because the status bar, navigation bar, and coordinate system orientation in the configuration information are bound together—that is, the status bar is always at the top of the coordinate system and the navigation bar is always at the bottom—the following applies... Figure 5In the portrait orientation shown in screen a, the status bar and navigation bar are parallel to the shorter side of the display interface. In the landscape orientation shown in screen b, the status bar and navigation bar are parallel to the longer side of the display interface. Therefore: if the state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the elements in the background layer below the application window, excluding the status bar and navigation bar, are rendered in real time in the portrait orientation, and the status bar and navigation bar in the background layer are rendered in real time in an orientation that matches the configuration information of the display interface (landscape orientation in this example).
[0115] This embodiment may further include: after playing the transition animation of the application window switching from the current state to the target state and updating the configuration information of the display interface according to the state switching instruction, rendering the fixed elements in the background layer in real time in a direction that matches the update result of the configuration information of the display interface, wherein the fixed elements are elements that are bound to the configuration information of the display interface.
[0116] For example, if the state switching instruction is used to instruct the application window to switch from portrait small window mode to landscape full-screen mode, then in this embodiment, after playing the transition animation of the application window switching from portrait small window mode to landscape full-screen mode and updating the configuration information of the display interface from the configuration matching the portrait small window mode to the configuration matching the landscape full-screen mode, the status bar and navigation bar in the background layer are rendered in real time in the direction matching the configuration information of the display interface, that is, the landscape direction.
[0117] In this example, the changes in the coordinate system of the background layer, as well as the changes in the position and orientation of the status bar and navigation bar, are all covered by the full-screen application window. Users will not visually perceive these changes, so these changes will not make the mode transition animation complex or chaotic.
[0118] For example, if the state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then in this embodiment, after playing the transition animation of the application window switching from landscape full-screen mode to portrait small window mode and updating the configuration information of the display interface from the configuration matching the landscape full-screen mode to the configuration matching the portrait small window mode, the status bar and navigation bar in the background layer are rendered in real time in the direction matching the configuration information of the display interface, that is, the portrait direction.
[0119] In this example, during the transition animation of the application window switching from landscape full-screen mode to portrait small window mode, the background layer always appears in portrait orientation. However, during the transition animation, the status bar and navigation bar in the background layer are located at the top and bottom of the screen, respectively, parallel to the long side of the display interface. After the transition animation is completed, the status bar and navigation bar move from the top and bottom of the screen, which are parallel to the long side of the display interface, to the top and bottom of the screen, which are parallel to the short side of the display interface. This change is caused by the change of the coordinate system orientation of the display interface from landscape to portrait. However, this change occurs after the mode transition animation and is relatively subtle, so it does not affect the naturalness and continuity of the mode transition animation, and may not even be perceived by the user.
[0120] According to a second aspect of the present disclosure, a display control device is provided, please refer to the attached document. Figure 9 The device includes:
[0121] An animation playback module 901 is used to play an animation of the application window switching from its current state to a target state in the display interface if a state switching instruction for an application window in the display interface is received. The target state is the display state indicated by the state switching instruction, and the display direction of the application window in the current state is different from the display direction of the application window in the target state.
[0122] The configuration update module 902 is used to update the configuration information of the display interface according to the state switching instruction if the application window reaches the target state.
[0123] In some embodiments of this disclosure, the animation emulation module is used for:
[0124] The animation of the application window switching from its current state to the target state is rendered in a seamless rotation manner, and the application to which the application window belongs fills the application window with display content with configuration information that matches the target state.
[0125] In some embodiments of this disclosure, the apparatus further includes a background module for:
[0126] During the playback of the animation, the background layer of the display interface is rendered in real time below the application window.
[0127] In some embodiments of this disclosure, the background module is used for:
[0128] If the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the current state of the application window.
[0129] If the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the target state of the application window.
[0130] In some embodiments of this disclosure, when the background module renders the background layer in real time below the application window in a direction matching the current state of the application window, it is used for:
[0131] Below the application window, non-fixed elements within the background layer are rendered in real time in a direction matching the current state of the application window, and fixed elements within the background layer are rendered in real time in a direction matching the configuration information of the display interface.
[0132] The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
[0133] In some embodiments of this disclosure, when the background module renders the background layer in real time below the application window in a direction matching the target state of the application window, it is used to:
[0134] Below the application window, non-fixed elements within the background layer are rendered in real time in a direction that matches the target state of the application window, and fixed elements within the background layer are rendered in real time in a direction that matches the configuration information of the display interface.
[0135] The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
[0136] In some embodiments of this disclosure, after updating the configuration information of the display interface according to the state switching instruction, the device further includes a compensation module, used for:
[0137] After updating the configuration information of the display interface according to the state switching instruction, the fixed elements in the background layer are rendered in real time in a direction that matches the update result of the configuration information of the display interface, wherein the fixed elements are elements that are bound to the configuration information of the display interface.
[0138] In some embodiments of this disclosure, the configuration information of the display interface includes the coordinate system orientation.
[0139] In some embodiments of this disclosure, the background module is configured to, when rendering the background layer in real time below the application window in a direction matching the current state of the application window, if the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, render the background layer in real time in a direction matching the current state of the application window, and is configured to:
[0140] If the state switching instruction is used to instruct the application window to switch from portrait small window mode to landscape full-screen mode, then the background layer is rendered in real time in the portrait direction below the application window.
[0141] In some embodiments of this disclosure, the background module is configured to, when rendering the background layer in real time below the application window in a direction matching the target state of the application window, if the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, perform the following:
[0142] If the state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the background layer is rendered in real time in the portrait direction below the application window.
[0143] In some embodiments of this disclosure, the application window has different sizes in the current state and the target state; and / or,
[0144] The application window is located in different positions in the current state and the target state.
[0145] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the method in the first aspect, and will not be elaborated upon here.
[0146] According to a third aspect of the present disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0147] According to the fourth aspect of the embodiments of this disclosure, please refer to the appendix. Figure 10 The diagram illustrates, for example, a block diagram of an electronic device. For instance, device 1000 could be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0148] Reference Figure 10The device 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power supply component 1006, a multimedia component 1008, an audio component 1010, an input / output (I / O) interface 1012, a sensor component 1014, and a communication component 1016.
[0149] Processing component 1002 typically controls the overall operation of device 1000, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 1002 may include one or more processors 1020 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1002 may include one or more modules to facilitate interaction between processing component 1002 and other components. For example, processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.
[0150] Memory 1004 is configured to store various types of data to support the operation of device 1000. Examples of this data include instructions for any application or method operating on device 1000, contact data, phonebook data, messages, pictures, videos, etc. Memory 1004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0151] The power supply component 1006 provides power to the various components of the device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1000.
[0152] Multimedia component 1008 includes a screen that provides an output interface between the device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1008 includes a front-facing camera and / or a rear-facing camera. When the device 1000 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0153] Audio component 1010 is configured to output and / or input audio signals. For example, audio component 1010 includes a microphone (MIC) configured to receive external audio signals when device 1000 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1004 or transmitted via communication component 1016. In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.
[0154] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0155] Sensor assembly 1014 includes one or more sensors for providing state assessments of various aspects of device 1000. For example, sensor assembly 1014 may detect the on / off state of device 1000, the relative positioning of components such as the display and keypad of device 1000, changes in the position of device 1000 or a component of device 1000, the presence or absence of user contact with device 1000, the orientation or acceleration / deceleration of device 1000, and temperature changes of device 1000. Sensor assembly 1014 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1014 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0156] Communication component 1016 is configured to facilitate wired or wireless communication between device 1000 and other devices. Device 1000 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or combinations thereof. In one exemplary embodiment, communication component 1016 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1016 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0157] In an exemplary embodiment, device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the display control method of the above-described electronic device.
[0158] Fifthly, in exemplary embodiments, this disclosure also provides a non-transitory computer-readable storage medium including instructions, such as a memory 1004 including instructions, which can be executed by a processor 1020 of device 1000 to complete the display control method of the electronic device. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0159] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0160] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A display control method, characterized in that, The method includes: If a state switching instruction for an application window within the display interface is received, an animation of the application window switching from its current state to a target state is played within the display interface. The target state is the display state indicated by the state switching instruction, and the display orientation of the application window in the current state is different from that in the target state. If the application window reaches the target state, the configuration information of the display interface is updated according to the state switching instruction.
2. The display control method according to claim 1, characterized in that, The step of playing an animation within the display interface showing the application window switching from its current state to a target state includes: The animation of the application window switching from its current state to the target state is rendered in a seamless rotation manner, and the application to which the application window belongs fills the application window with display content with configuration information that matches the target state.
3. The display control method according to claim 1, characterized in that, The method further includes: During the playback of the animation, the background layer of the display interface is rendered in real time below the application window.
4. The display control method according to claim 3, characterized in that, The real-time rendering of the background layer of the display interface below the application window includes: If the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the current state of the application window. If the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction that matches the target state of the application window.
5. The display control method according to claim 4, characterized in that, The step of rendering the background layer in real time below the application window in a direction that matches the current state of the application window includes: Below the application window, non-fixed elements within the background layer are rendered in real time in a direction matching the current state of the application window, and fixed elements within the background layer are rendered in real time in a direction matching the configuration information of the display interface. The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
6. The display control method according to claim 4, characterized in that, The step of rendering the background layer in real time below the application window in a direction that matches the target state of the application window includes: Below the application window, non-fixed elements within the background layer are rendered in real time in a direction that matches the target state of the application window, and fixed elements within the background layer are rendered in real time in a direction that matches the configuration information of the display interface. The non-fixed elements are elements that are not bound to the configuration information of the display interface, while the fixed elements are elements that are bound to the configuration information of the display interface.
7. The display control method according to claim 5 or 6, characterized in that, After updating the configuration information of the display interface according to the state switching instruction, the method further includes: The fixed elements within the background layer are rendered in real time in a direction that matches the update result of the configuration information of the display interface, wherein the fixed elements are elements that are bound to the configuration information of the display interface.
8. The display control method according to claim 1, characterized in that, The configuration information of the display interface includes the coordinate system orientation.
9. The display control method according to claim 4, characterized in that, If the current state of the application window partially covers the background layer of the display interface, and the target state of the application window completely covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction matching the current state of the application window, including: If the state switching instruction is used to instruct the application window to switch from portrait small window mode to landscape full-screen mode, then the background layer is rendered in real time in the portrait direction below the application window.
10. The display control method according to claim 4, characterized in that, If the current state of the application window completely covers the background layer of the display interface, and the target state of the application window partially covers the background layer of the display interface, then the background layer is rendered in real time below the application window in a direction matching the target state of the application window, including: If the state switching instruction is used to instruct the application window to switch from landscape full-screen mode to portrait small window mode, then the background layer is rendered in real time in the portrait direction below the application window.
11. The display control method according to claim 1, characterized in that, The application window has different sizes in the current state and the target state; and / or, The application window is located in different positions in the current state and the target state.
12. A display control device, characterized in that, The device includes: An animation playback module is used to play an animation of the application window switching from its current state to a target state in the display interface if a state switching instruction for the application window in the display interface is received. The target state is the display state indicated by the state switching instruction, and the display orientation of the application window in the current state is different from the display orientation of the application window in the target state. A configuration update module is used to update the configuration information of the display interface according to the state switching instruction if the application window reaches the target state.
13. A computer program product comprising a computer program / instructions, characterized in that, When the computational program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 11.
14. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store computer instructions that can be executed on the processor, and the processor being used to implement the method of any one of claims 1 to 11 when executing the computer instructions.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the method of any one of claims 1 to 11.