Display method, and electronic device, medium, program product and chip

By adjusting the size and rotation angle of the background image in electronic devices, the black border problem during screen switching is solved, improving the display effect and smoothness, and reducing the amount of drawing work during screen rotation.

WO2026130027A1PCT designated stage Publication Date: 2026-06-25HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-11-21
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

When electronic devices switch between portrait and landscape modes, the four corners of the screen may display a black background, resulting in a poor user experience.

Method used

When a screen rotation request is received, the electronic device acquires and adjusts the size of the background image to cover the entire screen. During the rotation, the background image is animated to fill the entire screen, avoiding black borders or corners. The background image size only needs to be adjusted once before the interface starts rotating, reducing the need for frequent size adjustments.

Benefits of technology

It improves the interface display effect during screen rotation, avoids the appearance of black borders or black corners, improves the smoothness of interface display, and solves the problems of lag and overheating.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025136805_25062026_PF_FP_ABST
    Figure CN2025136805_25062026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electronic devices. Disclosed are a display method, and an electronic device, a medium, a program product and a chip. In the display method in the present application, when an electronic device receives a screen rotation operation when displaying a first interface, the display orientation of the first interface on a screen is rotated in an animated manner from a first direction to a second direction. In addition, in the process in which the display orientation of the first interface is rotated from the first direction to the second direction, no black border or black corner is displayed by the electronic device, such that a background image viewed by a user can fully fill the entire screen at any rotation angle. In this way, the display effect of an interface during screen rotation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Display methods, electronic devices, media, software products, chips

[0001] This application claims priority to Chinese Patent Application No. 202411864319.9, filed on December 16, 2024, entitled "Display Method, Electronic Device, Medium, Program Product, Chip", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of electronic equipment technology, and in particular to a display method, electronic equipment, medium, program product, and chip. Background Technology

[0003] With the continuous development of electronic technology, various electronic devices are becoming increasingly widespread. As streaming media applications gain popularity, the need for electronic devices to support various display orientations (such as landscape and portrait displays) is becoming increasingly urgent. To meet the needs of users in different scenarios, more and more electronic devices are beginning to support landscape / portrait switching functionality.

[0004] Currently, electronic devices display a screen rotation animation when switching between portrait and landscape modes. During this animation, a black background may appear in the four corners of the screen, which creates a poor user experience. Summary of the Invention

[0005] To address the aforementioned technical problems, embodiments of this application provide a display method, an electronic device, a medium, a program product, and a chip.

[0006] In a first aspect, embodiments of this application provide a display method applied to an electronic device. The method includes: when the electronic device displays a first interface, receiving a screen rotation operation on the electronic device, wherein the display direction of the first interface on the screen of the electronic device is a first direction; in response to the screen rotation operation, rotating the display direction of the first interface on the screen from the first direction to a second direction in the form of animation; wherein, during the process of the display direction of the first interface rotating from the first direction to the second direction, the background image of the first interface fills the screen of the electronic device.

[0007] Based on the above solution, when the electronic device receives a screen rotation operation while displaying the first interface, it rotates the display direction of the first interface on the screen from the first direction to the second direction in an animated manner. Furthermore, during the rotation of the first interface from the first direction to the second direction, the electronic device does not display black borders or corners, ensuring that the background image seen by the user fills the entire screen at any rotation angle. This improves the display effect of the interface during screen rotation.

[0008] The first interface mentioned in this application may include the system interface of an electronic device (e.g., interface 310 shown in Figure 3A of this application embodiment), or the first interface may be the interface of an application installed in the electronic device (e.g., interface 410 shown in Figure 4A of this application embodiment).

[0009] The display orientation mentioned in this application may include a first orientation and a second orientation, wherein the first orientation and the second orientation are respectively the landscape display orientation and the portrait display orientation.

[0010] This application embodiment uses a first direction as the portrait display direction and a second direction as the landscape display direction as an example. For example, as shown in FIG1A, the portrait display direction can refer to the direction from the wide side 104 to the wide side 102 of the electronic device (taking tablet computer 1 as an example). For example, the display direction of interface 310 shown in FIG3A is the portrait display direction. As another example, as shown in FIG1B, the landscape display direction can refer to the direction from the long side 103 to the long side 101 of tablet computer 1. For example, the display direction of interface 310 shown in FIG3F is the landscape display direction.

[0011] It is understood that in other embodiments, the first direction can be a landscape display direction and the second direction can be a portrait display direction.

[0012] In some possible implementations of the first aspect above, receiving a screen rotation operation on an electronic device includes: receiving an operation from a user to rotate the electronic device from a first state to a second state; or receiving a user's click operation on a screen rotation control in the first interface; or receiving an operation from a user to control the screen rotation of the electronic device via voice or gesture.

[0013] It is understandable that the first state and the second state are portrait mode and landscape mode, respectively.

[0014] In some possible implementations of the first aspect mentioned above, the first state is a portrait mode and the second state is a landscape mode; or, the first state is a landscape mode and the second state is a portrait mode.

[0015] It is understood that receiving an operation from a user to rotate an electronic device from a first state to a second state can include: determining, based on posture information, whether to rotate counterclockwise or clockwise from a portrait state to a landscape state, or determining, based on posture information, whether to rotate counterclockwise or clockwise from a landscape state to a portrait state.

[0016] In some possible implementations of the first aspect above, before rotating the display direction of the first interface on the screen from the first direction to the second direction in the form of animation in response to the screen rotation operation, the method further includes: obtaining a background image of the first interface; adjusting the size of the background image based on the screen size of the electronic device so that the background image fills the screen of the electronic device at any rotation angle; and storing the adjusted background image in a preset buffer.

[0017] It is understandable that during the process of rotating the display direction of the first interface from the first direction to the second direction, the electronic device acquires the background image of the first interface (e.g., the desktop wallpaper of interface 310). The size of the background image is adjusted to a preset size (e.g., the length and width of the preset size are both greater than the diagonal size of the electronic device's screen), so that the background image can cover the entire screen of the electronic device at any rotation angle. In this way, the background image seen by the user always fills the entire screen, that is, the electronic device will not display black corners during the rotation of the first interface, which can greatly improve the display effect when rotating the screen.

[0018] In some possible implementations of the first aspect mentioned above, rotating the display direction of the first interface on the screen from the first direction to the second direction in the form of animation includes: obtaining an adjusted background image from a preset buffer; rotating the displayed content of the first interface in the first direction and the adjusted background image; compositing the rotated background image and the displayed content; and displaying the rotating interface based on the compositing result.

[0019] It is understandable that before the first screen starts rotating, the electronic device only needs to adjust the size of the background image once and store the resized background image in a preset buffer area. When the first screen rotates, the electronic device can directly obtain the resized background image from the preset buffer area without frequently adjusting the size of the background image. It only needs to adjust the required rotation angle, which can greatly reduce the amount of drawing work of the electronic device during the screen rotation process, help improve the smoothness of the screen display during screen rotation, and solve the problems of lag and overheating.

[0020] In some possible implementations of the first aspect above, obtaining the background image of the first interface includes: obtaining specified background image information set by the application corresponding to the first interface through an interface, and generating a background image based on the specified background image information; or, performing color sampling on the first interface to obtain color sampling information, and generating a background image based on the color sampling information.

[0021] It is understandable that upper-layer applications (system applications or third-party applications) can set specified background image information for the first interface through a preset interface. When the electronic device rotates the first interface, it can directly obtain the background image information specified by the upper-layer application through the preset interface and generate the corresponding background image. Alternatively, the electronic device can perform color sampling processing on the first interface during rotation to obtain color sampling information, and generate a background image based on this color sampling information, such as an image filled with a solid color.

[0022] In some possible implementations of the first aspect mentioned above, the first direction and the second direction are perpendicular to each other.

[0023] It is understood that the embodiments of this application use the example of a first direction (e.g., portrait display direction) and a second direction (e.g., landscape display direction) being perpendicular to each other. In other embodiments, the first direction / second direction may be the display direction when the electronic device is in other postures, and the first direction and the second direction may intersect each other.

[0024] In a second aspect, embodiments of this application provide an electronic device, including: a memory for storing one or more programs; and a processor for executing one or more programs to enable the electronic device to implement the display method described in the first aspect.

[0025] Thirdly, embodiments of this application provide a computer-readable storage medium that includes one or more computer programs. When the one or more computer programs are executed on an electronic device, they enable the electronic device to implement the display method described in the first aspect.

[0026] Fourthly, embodiments of this application provide a computer program product that, when executed on an electronic device, enables the electronic device to implement the display method described in the first aspect.

[0027] Fifthly, embodiments of this application provide a chip, the chip including a memory for storing instructions executed by one or more processors of an electronic device, and one or more processors for performing the display method described in the first aspect.

[0028] The technical effects of the second to fifth aspects of this application can be referred to the technical effects of the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0029] Figure 1A shows a schematic diagram of a tablet computer 1 in portrait mode according to some embodiments of this application;

[0030] Figure 1B shows a schematic diagram of a tablet computer 1 in landscape mode according to some embodiments of this application;

[0031] Figure 2A shows some schematic diagrams of the relevant interfaces of a tablet computer 1 when rotating the screen, according to some embodiments of this application;

[0032] Figure 2B shows a schematic diagram of the relevant interface of some other tablet computers 1 when rotating the screen, according to some embodiments of this application;

[0033] Figure 3A shows a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario according to some embodiments of this application;

[0034] Figure 3B shows a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario according to some embodiments of this application;

[0035] Figure 3C shows a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario according to some embodiments of this application;

[0036] Figure 3D shows a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario according to some embodiments of this application;

[0037] Figure 3E shows a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario according to some embodiments of this application;

[0038] Figure 3F shows a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario according to some embodiments of this application;

[0039] Figure 4A shows a schematic diagram of the relevant interface of the tablet computer 1 in a screen-switching scenario of an application, according to some embodiments of this application.

[0040] Figure 4B shows a schematic diagram of the relevant interface of the tablet computer 1 in a screen-switching scenario of an application, according to some embodiments of this application.

[0041] Figure 4C shows a schematic diagram of the relevant interface of the tablet computer 1 in a screen-switching scenario according to some embodiments of this application;

[0042] Figure 4D shows a schematic diagram of the relevant interface of the tablet computer 1 in a screen-switching scenario of an application, according to some embodiments of this application.

[0043] Figure 4E shows a schematic diagram of the relevant interface of the tablet computer 1 in a screen-switching scenario according to some embodiments of this application;

[0044] Figure 4F shows a schematic diagram of the relevant interface of the tablet computer 1 in a screen-switching scenario according to some embodiments of this application;

[0045] Figure 5 shows a hardware structure block diagram of a tablet computer 1 according to some embodiments of this application;

[0046] Figure 6 shows a software structure block diagram of tablet computer 1 according to some embodiments of this application;

[0047] Figure 7 illustrates a flowchart of a screen rotation interface display method according to some embodiments of this application;

[0048] Figure 8 shows a schematic flowchart of a screen rotation method for a tablet computer 1 according to some embodiments of this application;

[0049] Figure 9 illustrates a schematic flowchart of another screen-spinning method for a tablet computer 1 according to some embodiments of this application. Detailed Implementation

[0050] The illustrative embodiments of this application include, but are not limited to, a display method, an electronic device, a medium, a program product, and a chip.

[0051] It should be noted that the method provided in this application embodiment can be applied to any electronic device, including but not limited to mobile station (MS) and mobile terminal (MT). For example, the electronic device can be a mobile phone, smart TV, wearable device, tablet computer, desktop computer, laptop computer, virtual reality (VR) device, augmented reality (AR) device, terminal in industrial control, terminal in self-driving, terminal in remote medical surgery, terminal in smart grid, terminal in transportation safety, terminal in smart city, terminal in smart home, etc. This application embodiment does not limit the specific form of the electronic device. The tablet computer 1 will be used as an example of an electronic device in the following description.

[0052] Figures 1A and 1B illustrate an exemplary structure of a tablet computer 1. Referring to Figures 1A and 1B, the tablet computer 1 may include long sides 101, 103 extending along its length direction (X direction in each of the figures herein) and wide sides 102, 104 extending along its width direction (Y direction in each of the figures herein), the long sides 101 / 103 and the wide sides 102 / 104 may be perpendicular to each other. The length of the long side 101 / 103 may be greater than the length of the wide side 102 / 104. In other embodiments, the lengths of the long side 101 / 103 and the wide sides 102 / 104 may also be equal or approximately equal.

[0053] Figures 1A and 1B illustrate two usage states of the tablet computer 1, respectively. Figure 1A shows the portrait mode (as an example of the first state), and Figure 1B shows the landscape mode (as an example of the second state). Referring to Figure 1A, when the tablet computer 1 is in portrait mode, its wide sides 102 and 104 are essentially horizontal, and its long sides 101 and 103 are essentially vertical. Referring to Figure 1B, when the tablet computer 1 is in landscape mode, its long sides 101 and 103 are essentially horizontal, and its wide sides 102 and 104 are essentially vertical.

[0054] Referring again to Figure 1A, when the tablet computer 1 is in portrait mode, it can display interface 110. At this time, if a screen rotation operation is received on the tablet computer 1, for example, if the user rotates the tablet computer 1, causing a change in its orientation, the tablet computer 1 can switch from portrait to landscape mode. As shown in Figure 1B, when the tablet computer 1 is in landscape mode, the display orientation of interface 110 on the screen changes.

[0055] Referring to Figures 1A and 1B, when the tablet computer 1 switches from portrait mode to landscape mode, the display direction of the interface 110 changes from the X-axis to the Y-axis. In this embodiment, when the tablet computer 1 is in portrait mode, the direction from the wide side 104 to the wide side 102 is referred to as the display direction of the interface 110. Alternatively, when the tablet computer 1 is in portrait mode, the direction from the long side 103 to the long side 101 can also be referred to as the display direction of the interface 110. Typically, when a user is reading an information list on the tablet computer 1, the display direction is the column direction of the information list.

[0056] In this embodiment of the application, for ease of explanation, the display direction of the interface when the tablet computer 1 is in portrait mode (e.g., the X direction) is defined as the first direction, and the display direction of the interface when the tablet computer 1 is in landscape mode (e.g., the Y direction) is defined as the second direction. In other embodiments, the first direction can also be interpreted as the display direction of the interface when the tablet computer 1 is in landscape mode (e.g., the Y direction), and the second direction can also be interpreted as the display direction of the interface when the tablet computer 1 is in portrait mode (e.g., the X direction).

[0057] As mentioned earlier, when tablet computer 1 switches from portrait mode to landscape mode, a screen rotation animation is displayed. That is, when tablet computer 1 switches from portrait mode to landscape mode, the display orientation of interface 110 on the screen is rotated from the first orientation to the second orientation in the form of an animation. Figure 2A shows the relevant interfaces involved in the screen rotation of tablet computer 1 in some embodiments.

[0058] As shown in Figure 2A(a), the tablet computer 1 displays interface 110 in portrait mode, and the display direction of interface 110 is the first direction. At this time, a screen rotation operation is received on the tablet computer 1 (for example, the device is detected to be rotating), and a screen rotation command is generated to instruct the generation of a screen rotation animation.

[0059] It is understandable that the screen rotation command is generated after the screen rotation operation is received. Therefore, as shown in Figure 2A(b), the tablet computer 1 will still display the interface 110 in the first direction during the initial time of switching to landscape mode.

[0060] It can be understood that the display of any interface of tablet computer 1 includes the process by which tablet computer 1 processes the layers to be displayed on that interface. These layers are used to manage and organize the various elements to be displayed on the interface. There can be multiple layers to be displayed, and tablet computer 1 processes these multiple layers (e.g., resizing, compositing, rendering, etc.) to display the corresponding interface effect. For example, as shown in Figure 2A(a), the content displayed on interface 110 and the background image (e.g., a black polka dot image) can be distributed across two layers (layer 1 and layer 2), meaning that the display of interface 110 is based on the compositing processing of layers 1 and 2 by tablet computer 1.

[0061] It should be noted that, in this embodiment, the background image provides a visual background or environment for the interface. The background image can refer to an image located below all displayed content such as text, images, and icons. The layer containing the background image is the background layer, which is located at the bottom layer of all layers. Therefore, the display level of layer 2 containing the background image is below the layer 1 containing the displayed content, and the background image will not obscure the displayed content. For example, when the interface 110 displayed by tablet 1 is the system desktop, the background image can be the desktop wallpaper, and the displayed content includes application icons and names, status bar information, etc. When the interface 110 displayed by tablet 1 is an application interface, the background image can be an image located in the bottom layer of all display layers corresponding to the application interface, or it can be a newly generated image. The displayed content includes text, images, icons, etc., related to the services provided by the application. Furthermore, there are various types of background images, including solid color background images, gradient background images, picture background images, pattern background images, and animated images, etc.

[0062] Additionally, it should be noted that the displayed content can be distributed across one or more layers; this application only uses the example of the displayed content being distributed across the same layer 1. Furthermore, this embodiment uses the example of a background image filling the entire layer 2.

[0063] As shown in (c) to (d) of Figure 2A, the tablet computer 1 rotates the display direction of interface 110 from the first direction to the second direction shown in (e) of Figure 2A in an animated manner. Specifically, by displaying multiple frames of rotating interfaces, an animation effect is achieved in which the size of the background image of interface 110 continuously changes. For example, the size of the background image gradually increases from width x1 to width x2 and gradually decreases from length y1 to length y2. Here, (c) and (d) of Figure 2A show two frames of rotating interfaces 111 and 112 as examples during the rotation process. In interface 111, the width of the background image increases to width x11 and the length decreases to y11. In interface 112, the width of the background image increases to width x12 and the length decreases to y12. Where x1 < x11 < x12 < x2, and y1 > y11 > y12 > y2.

[0064] Wherein, the adjusted length y2 can be the original width x1, and the adjusted width x2 can be the original length y1. During the rotation of the display direction of interface 110, tablet computer 1 continuously adjusts the size of the background image of interface 110. Each adjustment of the background image size displays one frame of the rotating interface, which is the interface during the rotation of interface 110. For example, tablet computer 1 displays interface 111 after adjusting the background image size to length y11 and width x11, and displays interface 112 after adjusting the background image size to length y12 and width x12. When adjusting the size of the background image, tablet computer 1 also adjusts the rotation angle of the background image. After the background image is adjusted in size and rotation angle, there may be parts that extend beyond the screen. For example, the background images in interfaces 111 and 112 both have parts that extend beyond the screen (see the diagonal part of the dashed box), and this part cannot be drawn. Furthermore, during screen rotation, the background image cannot cover the entire screen, resulting in some screen areas having no content drawn. For example, in interface 111, the four corner areas of the screen have no content drawn, and in interface 112, the edge areas of the screen have no content drawn. For areas on the screen without content drawn, tablet computer 1 fills them with black. This causes the user to see a black background throughout the screen rotation process, resulting in poor visual effects and reduced user experience.

[0065] Based on this, this application provides a screen rotation interface display method. When an electronic device receives a screen rotation operation while displaying a first interface, it rotates the display direction of the first interface on the screen from a first direction to a second direction in an animated manner. During the rotation, a background image of the first interface (e.g., interface 110 mentioned above) is acquired (e.g., in a desktop screen rotation scenario, the background image may include a desktop wallpaper). The size of the background image is adjusted to a preset size (e.g., the length and width of the preset size are both greater than the diagonal size of the electronic device's screen). At this preset size, the background image can cover the entire screen of the electronic device at any rotation angle. Thus, during the process of rotating the display direction of the first interface from the first direction to the second direction, the electronic device will not display black borders or black corners, so that the background image seen by the user can fill the entire screen at any rotation angle, thereby improving the display effect of the interface during the screen rotation process.

[0066] Furthermore, compared to the screen rotation process shown in Figure 2A, where the tablet computer 1 needs to constantly adjust the size of the background image, frequent size adjustments will increase the drawing workload of the tablet computer 1, leading to stuttering and overheating issues. In the method of this application embodiment, before the display direction of the first interface starts to rotate, the electronic device only needs to adjust the size of the background image once. After the display direction of the first interface starts to rotate, there is no need to adjust the size of the background image again. This can greatly reduce the drawing workload of the electronic device during the screen rotation process, help improve the smoothness of the interface display during screen rotation, and solve the stuttering and overheating problems.

[0067] The screen rotation interface display method provided in the embodiments of this application will be described below with reference to the accompanying drawings. Taking a tablet computer 1 as an example, Figure 2B shows the relevant interface during the screen rotation process of the tablet computer 1 switching from portrait mode to landscape mode in some embodiments of this application.

[0068] As shown in Figure 2B(a), the tablet computer 1 displays interface 110 in portrait mode, and the display direction of interface 110 is a first direction. In this embodiment, interface 110 may include a system interface (e.g., desktop) or an application interface. A description of interface 110 can be found in the description of the relevant embodiments in Figure 2A above, and will not be repeated here.

[0069] It is understandable that the content displayed on interface 110 (such as text, images, icons, etc.) remains the same before and after the display orientation of interface 110 is switched, or the content may increase or decrease. For example, in some scenarios, interface 110 is the system desktop, which mainly displays icons of multiple applications (including system applications and third-party applications) installed on tablet computer 1. Before and after the display orientation of the system interface is switched, the number of application icons in the interface will not increase or decrease. In other scenarios, interface 110 is the interface of an application, and its displayed content may include images, text, etc. Before and after the display orientation is switched, the number of images and text in the interface may increase or decrease.

[0070] In this embodiment of the application, the tablet computer 1 receives a screen rotation operation on the tablet computer 1 and switches the display direction of the interface 110, for example, switching the display direction of the interface 110 from the first direction to the second direction.

[0071] The aforementioned receipt of a screen rotation operation on tablet computer 1 may include tablet computer 1 detecting that its own device has rotated (e.g., determining to rotate from portrait mode counterclockwise / clockwise to landscape mode based on posture information, or determining to rotate from landscape mode counterclockwise / clockwise to portrait mode based on posture information), or tablet computer 1 receiving a user's click on a screen rotation control on the interface. Alternatively, tablet computer 1 receiving an operation from the user controlling the screen rotation of tablet computer 1 via voice or gesture. It should be noted that this application does not limit the specific form of the screen rotation operation.

[0072] As shown in Figure 2B(b), when tablet 1 rotates counterclockwise from portrait mode to landscape mode, it will still display interface 110 in the first orientation for the initial time during the switch to landscape mode (e.g., within 0.1 seconds). Specifically, when tablet 1 receives a screen rotation operation, such as detecting a counterclockwise rotation from portrait mode to landscape mode, it generates a screen rotation command to instruct the generation of a screen rotation animation. Because the screen rotation command is generated after receiving the screen rotation operation, tablet 1 will still display interface 110 in the first orientation for the initial time during the switch to landscape mode.

[0073] As shown in Figure 2B(c), during the process of generating a screen rotation animation in response to a screen rotation command, tablet computer 1 acquires the background image of interface 110. Then, tablet computer 1 adjusts the size of the background image according to its screen size. For example, if the screen size of tablet computer 1 is width x1 and length y1, the size of the background image can be increased from width x1 and length y1 to width x3 and length y3. A background image with a width of x3 and a length of y3 ensures that the background image can cover the entire screen at any rotation angle. For example, the diagonal length of the screen is calculated based on the screen size of tablet computer 1 (width x1 and length y1), and then the width x3 and length y3 are determined based on this diagonal length. For example, both the width x3 and length y3 are greater than the diagonal length.

[0074] As shown in Figures 2B(d) and (e), the tablet computer 1, based on the resized background image, animates the rotation of the display orientation of the interface 110 from a first orientation to a second orientation as shown in Figure 2B(f). Specifically, during the rotation of the display orientation of the interface 110, the tablet computer 1 does not need to adjust the size of the background image; it only needs to adjust the rotation angle of the background image. Each adjustment of the background image's rotation angle displays one frame of the rotating interface. Here, Figures 2B(d) and (e) show two frames of the rotating interface 210 and 220 during the rotation process as examples.

[0075] The resized background image, with its width x3 and length y3 both greater than the diagonal length of the screen, can cover the entire screen at any rotation angle. This ensures that the background image always fills the entire screen in the rotating interface 210 / 220, meaning the screen will not display black corners.

[0076] It's understandable that tablet 1 only needs to adjust the background image size once before displaying the rotating interface, and can directly call it when displaying the rotating interface 210 / 220 subsequently. For example, tablet 1 stores the resized background image in a preset buffer, which can refer to an offscreen cache, used to store data that is not currently displayed but may be needed in subsequent operations. It's also understandable that tablet 1 has a temporary buffer, used to store the currently displayed interface data, and the data in the temporary buffer is updated at the same frequency as the interface. The preset cache and the temporary buffer are separate, which does not affect the interface display efficiency.

[0077] Specifically, as mentioned earlier, tablet computer 1 can display one frame of the rotating interface after adjusting the rotation angle of the background image each time. For example, when displaying interface 210, tablet computer 1 retrieves the resized background image from a preset cache area, then adjusts the rotation angle of the image before displaying interface 210. Similarly, when displaying interface 220, tablet computer 1 again retrieves the resized background image from the preset cache area, then adjusts the rotation angle of the image before displaying interface 220. In other words, for each frame of the rotating interface displayed, tablet computer 1 directly retrieves the resized background image from the preset cache area.

[0078] During the screen rotation process, tablet PC 1 does not need to adjust the size of the background image; it only needs to adjust the rotation angle of the background image. For the displayed content, tablet PC 1 can adjust both the size and rotation angle of the displayed content simultaneously, or only adjust the rotation angle of the displayed content.

[0079] As shown in Figure 2B(f), when the tablet computer 1 is in landscape mode, the interface 110 is displayed in a second orientation. When the interface 110 is displayed in different orientations, the content of the background image displayed within the screen display area can be the same or different.

[0080] Furthermore, as mentioned earlier, before and after switching the display orientation of interface 110, the display content (such as text, images, icons, and other display elements) contained in interface 110 remains the same, or the display content can be increased or decreased. The display content includes, but is not limited to, various forms of display elements such as text, images, and icons.

[0081] For example, in a desktop rotation scenario (when tablet 1 receives a rotation operation while displaying the desktop), interface 110 can be the system desktop. Before and after the display direction of the system interface changes, the number of application icons contained in the interface will not increase or decrease. However, the position or arrangement of the application icons can change. Figures 3A to 3F show schematic diagrams of the relevant interfaces of tablet 1 in a desktop rotation scenario.

[0082] As shown in Figure 3A, the tablet computer 1 is in portrait mode, displaying interface 310 in the first orientation. Interface 310 is the system desktop. Interface 310 includes a desktop wallpaper (for example, a heart pattern in the center of the wallpaper), and the content displayed on interface 310 includes icons of multiple applications, such as the "email" icon A1 and the "third-party application" icon A2.

[0083] As shown in Figure 3B, when the tablet computer 1 receives an operation from the user to rotate the tablet computer 1 90 degrees counterclockwise from portrait mode to landscape mode, a screen rotation command is generated. It can be understood that the screen rotation command is generated after the screen rotation operation is received. Therefore, within an instant after the screen rotation is completed (for example, within 0.1 seconds after the screen rotation is completed), the tablet computer 1 will still display the interface 310 in the first orientation in the landscape mode as shown in Figure 3B.

[0084] As shown in Figure 3C, tablet computer 1 responds to the screen rotation command and retrieves the desktop wallpaper. Then, tablet computer 1 enlarges the size of the desktop wallpaper based on its screen size and stores the enlarged wallpaper. It can be understood that the operation of enlarging the desktop wallpaper is performed in the background of tablet computer 1, while interface 310 remains displayed in the foreground.

[0085] As shown in Figures 3D and 3E, during the rotation, tablet 1 rotates the desktop wallpaper 90 degrees clockwise, ensuring the wallpaper always fills the entire screen, meaning the user cannot see the black corners. Finally, as shown in Figure 3F, tablet 1 displays interface 310 in landscape mode with the second orientation. During the rotation, tablet 1 rotates the application icons (e.g., icon A1, icon A2) 90 degrees clockwise and changes the arrangement or position of multiple applications. For example, as shown in Figures 3A and 3F, tablet 1 changes the arrangement of application icons in interface 310 from four per row to six per row. Correspondingly, the positions of some icons change; for example, icon A2 changes from the second row to the first row.

[0086] In the application screen-rotation scenario (when the tablet computer 1 receives a screen-rotation operation while displaying the application interface), interface 110 can be the application interface. Before and after the display direction of the application interface changes, the number of display elements such as text and images contained in the interface can increase or decrease. Figures 4A to 4F show schematic diagrams of the relevant interfaces of the tablet computer 1 in an application screen-rotation scenario.

[0087] As shown in Figure 4A, the tablet computer 1 is in portrait mode, displaying interface 410 in the first direction. Interface 410 is a friend message list interface in a social application. The content displayed in interface 410 includes multiple friend avatar icons and their corresponding friend names. For example, Figure 4A shows friend names 1-7 and their corresponding friend avatar icons, such as icon B1 corresponding to friend name 1 and icon B2 corresponding to friend name 2.

[0088] As shown in Figure 4B, the user can rotate the tablet computer 1 90 degrees counterclockwise from portrait mode to landscape mode. The tablet computer 1 receives the user's operation, generates a screen rotation command, and within an instant after the screen rotation is completed (for example, within 0.1 seconds after the screen rotation is completed), the tablet computer 1 will still display the interface 410 in the first direction in the landscape mode as shown in Figure 4B.

[0089] As shown in Figure 4C, in response to a screen rotation command, tablet computer 1 acquires the background image of interface 410 (shown in the dashed box). Here, the background image can be specified by the application, or, if not specified by the application, tablet computer 1 directly generates a solid-color background image filled with a solid color (red, green, gray, white, etc.). When rotating the screen under different interfaces of the application, tablet computer 1 acquires this solid-color background image. It can be understood that when tablet computer 1 displays a friend's chat interface (e.g., by clicking on any friend's name in interface 410 to enter the corresponding friend's chat interface), it also acquires this solid-color background image in response to the screen rotation command. Figure 4C uses a solid-color background image filled with white as an example.

[0090] As shown in Figures 4D and 4E, during the rotation, the tablet computer 1 rotates the solid color background image 90 degrees clockwise, ensuring the solid color background image always fills the entire screen, meaning the user cannot see the black corners. Finally, as shown in Figure 4F, the tablet computer 1 displays interface 410 in landscape mode in the second orientation.

[0091] Furthermore, it can be understood that the interface 410 can display a larger number of friend avatar icons and corresponding friend names when displayed along the X direction compared to when displayed along the Y direction. During the rotation, the tablet computer 1 rotates the friend avatar icons (e.g., icon B1, icon B2) and corresponding friend names 90 degrees clockwise, and can also simultaneously change the display size of the friend avatar icons and corresponding friend names. As a result, some friend avatar icons and corresponding friend names, such as friend avatar icon B2 and corresponding friend name 7, are rotated off-screen, so that when the tablet computer 1 displays the interface 410 in landscape mode in the second direction, it does not include friend avatar icon B2 and corresponding friend name 7.

[0092] It is understood that in this embodiment, when the tablet computer 1 switches from portrait to landscape mode, it can display the rotating interface based on a magnified background image. The magnified background image is large enough to cover the entire screen, ensuring that the corners of the screen are not left undrawn. Therefore, no black borders or corners appear in the rotating interface, improving the display effect and user experience during the rotation process. Furthermore, before the interface starts rotating, the tablet computer 1 only needs to adjust the size of the background image once and store the resized image in a preset buffer area. During the rotation, the tablet computer 1 directly obtains the resized background image from the preset buffer area, eliminating the need for frequent resizing. This significantly reduces the drawing workload of the electronic device during the rotating interface display, improving the smoothness of the interface display and resolving issues such as lag and overheating.

[0093] The tablet computer 1 mentioned in the embodiments of this application will be described below. Figure 5 is a hardware structure block diagram of the tablet computer 1 according to an embodiment of this application. It can be understood that the hardware structure block diagram shown in Figure 5 is also applicable to other electronic devices besides the tablet computer 1.

[0094] As shown in Figure 5, the tablet computer 1 may include a processor 101, an external memory interface 102, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, buttons 190, 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 accelerometer sensor 180E, a proximity sensor 180F, a fingerprint sensor 180H, a touch sensor 180K, etc.

[0095] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the tablet computer 1. In other embodiments of this application, the tablet computer 1 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0096] Processor 101 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0097] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0098] The processor 101 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 101 is a cache memory. This memory can store instructions or data that the processor 101 has just used or that are used repeatedly. If the processor 101 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 101, and thus improves the efficiency of the system.

[0099] In some embodiments, the processor 101 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0100] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the tablet computer 1. In other embodiments of this application, the tablet computer 1 may also employ different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.

[0101] The tablet PC 1 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 101 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0102] The display screen 194 is used to display images, videos, etc. In some embodiments, the tablet computer 1 may include one or N display screens 194, where N is a positive integer greater than 1.

[0103] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.). The data storage area may store data created during the use of the tablet computer 1 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory, universal flash storage (UFS), etc. Processor 101 executes various functional applications and data processing of the tablet computer 1 by running instructions stored in internal memory 121 and / or instructions stored in memory located within the processor.

[0104] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be disposed 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.

[0105] The gyroscope sensor 180B can be used to determine the motion posture of the tablet computer 1. In some embodiments, the angular velocity of the tablet computer 1 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B.

[0106] The 180E accelerometer sensor can detect the magnitude of acceleration in various directions (typically three axes) of the tablet computer 1. When the tablet computer 1 is stationary, it can detect the magnitude and direction of gravity. It can also...

[0107] In this embodiment, both the gyroscope sensor 180B and the accelerometer sensor 180E can be used to detect whether the tablet computer 1 rotates its screen, such as detecting whether a change in usage state has occurred, including a switch from portrait mode (clockwise / counterclockwise) to landscape mode, and a switch from landscape mode (clockwise / counterclockwise) to portrait mode. For example, based on the angular velocity information determined by the gyroscope sensor 180B and the acceleration information determined by the accelerometer sensor 180E, it is possible to identify whether the tablet computer 1 has rotated counterclockwise from portrait mode to landscape mode. Furthermore, the rotation angle information of the tablet computer 1 in various directions can be determined.

[0108] The distance sensor 180F is used to measure distance. Tablet 1 can measure distance via infrared or laser.

[0109] The fingerprint sensor 180H is used to collect fingerprints. The tablet computer 1 can use the collected fingerprint characteristics to unlock the device, access app locks, take photos with fingerprints, and answer calls with fingerprints.

[0110] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit 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 display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of tablet computer 1, in a different position than display screen 194.

[0111] The software system of tablet computer 1 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to illustrate the software structure of tablet computer 1.

[0112] Figure 6 is a software structure block diagram of a tablet computer 1 according to an embodiment of this application. It is understood that the software structure block diagram shown in Figure 6 is also applicable to other electronic devices besides the tablet computer 1. The layered architecture divides the software system into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the software system (e.g., the Android system) is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0113] The application layer can include a series of application packages. For example, it may include system applications such as camera, gallery, calendar, call, map, navigation, e-commerce, Bluetooth, music, video, and SMS, as well as third-party applications. Third-party applications include social networking applications, video applications, e-commerce applications, etc.

[0114] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications within the application layer. The application framework layer includes predefined functions and may include a window manager, animation control module, display resource manager, etc.

[0115] The window manager is used to manage window programs. It can obtain the size of the displayed windows in the display interface and can also call the animation control module to manage the display of animations in the window, such as managing the display of the interface rotation effect when the screen is rotated.

[0116] The Display Explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0117] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

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

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

[0120] The system library can include multiple functional modules. For example: rotation control module, graphics rendering module (GPU).

[0121] In this embodiment, the rotation control module can receive information sent by the upper application framework layer, perform scene recognition, such as recognizing a desktop screen rotation scene or an application screen rotation scene, and obtain the running status of the application and data such as the control curve of the screen rotation animation.

[0122] The rotation control module can also receive information about the background image specified by the upper-layer application in the interface via a preset interface, and calculate the size and offset of the background image to be enlarged / reduced when the interface rotates.

[0123] Alternatively, if the rotation control module does not receive the background image information specified by the upper-layer application through a preset interface, the rotation control module can perform color sampling processing on the interface to obtain color sampling information, which is used to generate a background image, such as a solid color filled image.

[0124] The graphics rendering module can receive data sent by the rotation control module, such as the magnification / reduction size and offset of the background image. It generates and stores the background image based on the received data, for example, in an off-screen cache. Furthermore, when the interface rotates, it retrieves the background image from the off-screen cache, and, considering the screen size, crops and composites the layer containing the background image with the layer containing the displayed content. Finally, it displays the composited data, allowing the tablet computer 1 to display interface 210 as shown in Figure 2B, interface 310 as shown in Figures 3A-3F, and interface 410 as shown in Figures 4A-4F.

[0125] The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers and sensor drivers.

[0126] The following description uses a tablet computer 1 with the structure shown in Figures 5 and 6 as an example to illustrate the screen rotation interface display method provided in this application embodiment. As shown in Figure 7, the screen rotation interface display method provided in this application embodiment includes the following steps:

[0127] S710: When the electronic device displays the first interface, a screen rotation operation is received for the electronic device, wherein the display direction of the first interface on the screen of the electronic device is the first direction.

[0128] In some embodiments, the first interface may include a system interface (e.g., a desktop) or an application interface. Specifically, the tablet computer 1 may display the first interface when it is in a first state. For example, the first interface displayed in the first state may be interface 110 as shown in FIG2B, or interface 310 as shown in FIG3A, or interface 410 as shown in FIG4A.

[0129] As mentioned above, in this embodiment, the display direction of the interface when the tablet computer 1 is in portrait mode (e.g., the X direction shown in Figure 1A) is defined as the first direction, and the display direction of the interface when the tablet computer 1 is in landscape mode (e.g., the Y direction shown in Figure 1B) is defined as the second direction. In other embodiments, the first direction can also be interpreted as the display direction of the interface when the tablet computer 1 is in landscape mode (e.g., the Y direction shown in Figure 1B), and the second direction can also be interpreted as the display direction of the interface when the tablet computer 1 is in portrait mode (e.g., the X direction shown in Figure 1A).

[0130] The aforementioned receipt of a screen rotation operation on tablet computer 1 may include tablet computer 1 detecting that its own device is rotating, or tablet computer 1 receiving a user's click on a screen rotation control on the interface. It should be noted that this application does not limit the specific form of the screen rotation operation.

[0131] In some embodiments, the tablet computer 1 can collect its own posture information in real time through sensors. The types of sensors involved may include, but are not limited to, gyroscope sensors, accelerometers, and proximity sensors. The tablet computer 1 can determine its own rotation based on the posture information collected by the sensors, for example, determining to rotate from portrait mode to landscape mode based on the posture information, or determining to rotate from landscape mode to portrait mode based on the posture information.

[0132] Alternatively, in some other embodiments, the tablet computer 1 receives a user's click operation on the screen rotation control in the first interface, and determines to rotate from portrait mode to landscape mode, or from landscape mode to portrait mode.

[0133] S720: In response to screen rotation, the display orientation of the first interface on the screen is rotated from the first orientation to the second orientation in the form of an animation.

[0134] During the process of rotating the display direction of the first interface from the first direction to the second direction, the background image of the first interface fills the screen of the electronic device.

[0135] In some embodiments, before the tablet computer 1 rotates the display orientation of the first interface on the screen from the first orientation to the second orientation in an animated manner in response to the screen rotation operation, it also determines whether the first interface supports rotation. It can be understood that if it is determined that the first interface supports rotation, the tablet computer 1 will rotate the display orientation of the first interface on the screen from the first orientation to the second orientation in an animated manner; otherwise, if it is determined that the first interface does not support rotation, the tablet computer 1 will not perform the subsequent steps.

[0136] Specifically, tablet computer 1 can obtain the automatic screen rotation settings information of the first interface. When the automatic screen rotation settings are enabled, tablet computer 1 confirms that the first interface supports rotation; when the automatic screen rotation settings are disabled, tablet computer 1 confirms that the first interface does not support rotation. For example, the enabled / disabled state of the automatic screen rotation settings information can be selected and controlled by the user in the automatic screen rotation settings interface provided by tablet computer 1.

[0137] For a specific example of rotating the display direction of the first interface on the screen from the first direction to the second direction in the form of animation, please refer to the relevant descriptions in Figure 2B above, or Figures 3A-3F or Figures 4A-4F.

[0138] In some embodiments, in response to a screen rotation operation, the tablet computer 1 generates a screen rotation command based on the window manager and the animation control module. The screen rotation command is used to instruct the rotation control module and the graphics rendering module to generate a screen rotation animation, so as to rotate the display direction of the first interface on the screen from the first direction to the second direction in the form of animation.

[0139] In some embodiments, the rotation control module, in response to a screen rotation command, determines whether a specified background image exists on the first interface. For example, the rotation control module determines that a specified background image exists on the first interface based on the specified background image information set by the upper-layer application (system application or third-party application) in a preset interface.

[0140] Alternatively, if the rotation control module determines that the upper-layer application (system application or third-party application) has not set the specified background image information for the first interface through a preset interface, then it determines that the specified background image does not exist on the first interface. In this case, the rotation control module can sample the color of the first interface and automatically generate a background image based on the color sampling information. Here, the background image can be a solid color filled background image.

[0141] In some embodiments, the rotation control module adjusts the size of the background image. Specifically, it calculates the required enlargement / reduction size and offset of the background image. The offset includes a length offset and a width offset based on the screen center. It can be understood that the offset is primarily used to ensure that the enlarged / reduced background image can cover the screen at any rotation angle. For example, as mentioned above, the rotation control module can adjust the size of the background image according to the screen size of the tablet computer 1. For instance, if the screen size of the tablet computer 1 is width x1 and length y1, the size of the background image can be increased from width x1 and length y1 to width x3 and length y3. A background image with width x3 and length y3 ensures that the background image can cover the entire screen at any rotation angle. For example, the diagonal length of the screen is calculated based on the screen size of the tablet computer 1 (width x1, length y1), and then the width x3 and length y3 are determined based on a preset offset and the diagonal length, respectively. For example, both width x3 and length y3 are greater than the diagonal length.

[0142] In some embodiments, when the tablet computer 1 rotates the first interface, the background image and the displayed content can be rotated multiple times. Specifically, the rotation can be performed according to the control curve of the screen rotation animation. Each time the rotation is performed, the tablet computer 1 displays one frame of the screen rotation interface until the background image and the displayed content are rotated to the corresponding angle.

[0143] Specifically, the window manager in tablet PC 1 can call the animation control module, which sends the control curve of the screen rotation animation, the specified background image information corresponding to the first interface, and scene information (desktop screen rotation / application screen rotation) to the rotation control module. The specified background image information corresponding to the first interface can be set by the upper-layer application (system application or third-party application) in a preset interface.

[0144] After the rotation control module determines and adjusts the size of the background image, it can send the background image size data to the graphics rendering module. The graphics rendering module generates a background image based on the background image size data and stores it in a preset buffer (off-screen cache).

[0145] It should be noted that, in actual execution, the information sent to the graphics rendering module may also include various display-related information such as window position information, window size information, and layer hierarchy information in the interface.

[0146] The rotation control module also adjusts the rotation angle of the background image and the displayed content. The rotation control module can send the determined rotation data of the background image and displayed content to the graphics rendering module. Since the rotation data of the background image and displayed content is different for each frame of the rotating screen, it can be understood that when displaying each frame of the rotating screen, the rotation control module sends the rotation data of the background image and displayed content corresponding to each frame of the rotating screen to the graphics rendering module. In some embodiments, the rotation angle of the background image and the displayed content can be the same.

[0147] In some embodiments, the rotation control module can also adjust the size of the displayed content. The rotation control module can send the determined size of the displayed content to the graphics rendering module.

[0148] The graphics rendering module performs layer drawing, blending, and rendering. For example, it draws the background image and display content based on the rotation and size data of the background image and the display content. Then, it performs cropping and composite rendering on the layers containing the background image and the display content to obtain the composite rendering display data. Finally, it sends the display data to the display driver for display.

[0149] Specifically, the graphics rendering module can write display data into memory, and then the display driver located in the kernel layer can read the display data in memory to display the corresponding background image and display content.

[0150] Figure 8 illustrates a screen-rotating method for the tablet computer 1 in some specific embodiments. As shown in Figure 8, the screen-rotating method includes:

[0151] S801, Tablet 1 detected a switch between portrait and landscape modes; see the relevant description of step S710 above for details.

[0152] S802, the tablet computer 1 determines whether the current display interface (first interface) supports rotation; for details, please refer to the relevant description of step S720 above.

[0153] When the tablet computer 1 determines that the current display interface supports rotation, the window manager and animation control module generate a screen rotation command. The window manager calls the animation control module to send data to the rotation control module, including but not limited to the control curve of the screen rotation animation, the specified background image information corresponding to the first interface, scene information, etc.

[0154] S803, the rotation control module calculates the drawing data for the rotating screen interface.

[0155] It is understood that the rendering data for the rotating screen interface includes the size and rotation data of the background image, as well as the size and rotation data of the displayed content. Specifically, the rotation control module only needs to calculate the background image size data once when displaying the first frame of the rotating screen interface and then send this data to the graphics rendering module. When displaying subsequent frames of the rotating screen interface, it is not necessary to recalculate the background image size data; only the rotation data of the background image / display content and the size data of the displayed content need to be recalculated. The method for calculating the background image size data can be referred to the above embodiment and will not be repeated here.

[0156] S804, the graphics rendering module receives the drawing data sent by the rotation control module and generates a background image based on the size data of the background image in the drawing data.

[0157] The graphics rendering module can draw a background image based on the size data of the background image and store it in a preset buffer. In essence, the graphics rendering module only needs to draw the background image and store it in the preset buffer when displaying the first frame of the screen transition interface. When displaying subsequent frames of the screen transition interface, the graphics rendering module can directly retrieve the background image from the preset buffer.

[0158] S805, the graphics rendering module, processes the drawing data to generate display data for the corresponding frame of the screen transition interface.

[0159] It is understandable that the graphics rendering module draws the corresponding display content based on the size data of the display content sent by the rotation control module, and reads the background image from the preset buffer. Based on the rotation data sent by the rotation control module, it rotates and composites the background image and display content to obtain the display data of the corresponding frame of the rotating screen interface.

[0160] It is understandable that for each frame of the rotating screen interface displayed by the tablet computer 1, the graphics rendering module performs rotation, compositing, and rendering processing on the background image and the displayed content according to the rotation data sent by the rotation control module, so as to obtain the display data of the corresponding frame of the rotating screen interface. That is, when displaying the rotating screen animation, the rotation, compositing, and rendering processing are repeatedly executed, but there is no need to repeatedly draw the background image.

[0161] S806, the graphics rendering module displays the data.

[0162] Specifically, the graphics rendering module writes display data into a temporary buffer, and the display driver located in the kernel layer can read the display data in the temporary buffer to display the corresponding background image and display content.

[0163] Figure 9 illustrates a screen-rotating method for the tablet computer 1 in some other specific embodiments. The only difference from that shown in Figure 8 is:

[0164] S903, if the data received by the rotation control module does not contain the specified background image information corresponding to the first interface, the rotation control module can perform color sampling on the first interface and generate a solid color background image based on the obtained color sampling information.

[0165] The remaining S901, S902, S904 to S906 can be referred to the relevant descriptions of S801 to S806 above, and will not be repeated here.

[0166] Thus, the screen rotation interface display method of this application embodiment can optimize the visual and performance experience during the screen rotation process by collecting upper-layer application information, identifying the screen rotation scene, and controlling the drawing of the screen rotation interface during the rotation process.

[0167] This application also provides a program product that, when executed on an electronic device, enables the electronic device to implement the display methods provided in the foregoing embodiments.

[0168] This application also provides a readable storage medium storing one or more programs / instructions, which, when executed by an electronic device, enable the electronic device to implement the display methods provided in the foregoing embodiments.

[0169] This application provides a chip, which includes a memory for storing instructions executed by one or more processors of an electronic device, and one or more processors for executing the display method of the above embodiments of this application.

[0170] It should be understood that in the embodiments of this application, terms such as "for example," "in some embodiments," "in another embodiment," "in yet another embodiment," and "exemplarily" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as an "example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the term "example" is intended to present concepts in a concrete manner.

[0171] It should be understood that the terms "first," "second," etc., used in the embodiments of this application are only used for descriptive purposes and should not be construed as indicating or implying relative importance, nor should they be construed as indicating or implying order. The term "equal to" in the embodiments of this application can be used with "greater than" to apply to technical solutions used when "greater than," and can also be used with "less than" to apply to technical solutions used when "less than." It should be noted that when "equal to" is used with "greater than," it is not used with "less than," and vice versa.

[0172] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0173] It should be understood that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A display method characterized by comprising: Applied to electronic devices, the method includes: When the electronic device displays the first interface, a screen rotation operation is received for the electronic device, wherein the display direction of the first interface on the screen of the electronic device is a first direction; In response to the screen rotation operation, the display direction of the first interface on the screen is rotated from the first direction to the second direction in the form of animation; During the process of rotating the display direction of the first interface from the first direction to the second direction, the background image of the first interface fills the screen of the electronic device.

2. The method of claim 1, wherein, Receiving a screen rotation operation for the electronic device includes: The system receives an operation from the user to rotate the electronic device from a first state to a second state.

3. The method of claim 1, wherein, Receiving a screen rotation operation for the electronic device includes: The system receives a user's click on the screen rotation control in the first interface.

4. The method of claim 1, wherein, Receiving a screen rotation operation for the electronic device includes: The system receives a user's command to rotate the screen of the electronic device via voice or gesture.

5. The method of claim 2, wherein, Receiving the user's operation to rotate the electronic device from the first state to the second state includes: Based on the attitude information of the electronic device, it is determined whether the electronic device rotates counterclockwise or clockwise from the first state to the second state.

6. The method according to claim 2 or 5, characterized in that, The first state is portrait mode, and the second state is landscape mode; Alternatively, the first state can be landscape mode, and the second state can be portrait mode.

7. The method of claim 1, wherein, In response to the screen rotation operation, before animating the rotation of the first interface on the screen from the first direction to the second direction, the method further includes: Obtain the background image of the first interface; Based on the screen size of the electronic device, the size of the background image is adjusted so that the background image fills the screen of the electronic device at any rotation angle; The adjusted background image is stored in a preset buffer.

8. The method of claim 7, wherein, The step of rotating the display orientation of the first interface on the screen from the first orientation to the second orientation in the form of animation includes: Obtain the adjusted background image from the preset buffer; The content displayed on the first interface in the first direction and the adjusted background image are rotated. The rotated background image and the displayed content are composited, and the rotating interface is displayed based on the composite processing result.

9. The method according to claim 7, characterized in that, The step of obtaining the background image of the first interface includes: Obtain the specified background image information set by the application corresponding to the first interface through an interface, and generate the background image based on the specified background image information; or... Color sampling information is obtained by color sampling of the first interface, and the background image is generated based on the color sampling information.

10. The method according to any one of claims 1-9, characterized in that, The first interface is the system interface of the electronic device, or the first interface is the interface of an application installed in the electronic device.

11. The method according to any one of claims 1-9, characterized in that, The first direction and the second direction are perpendicular to each other.

12. An electronic device, comprising: include: a memory storing one or more programs; a processor configured to execute the one or more programs to cause the electronic device to implement the method of any one of claims 1-11.

13. A computer-readable storage medium, characterized in that, one or more computer programs included in the computer-readable storage medium, the one or more computer programs, when executed on an electronic device, cause the electronic device to implement the method of any one of claims 1-11.

14. A computer program product, characterised in that, the computer program product, when executed on an electronic device, cause the electronic device to implement the method of any one of claims 1-11.

15. A chip, characterized by the chip includes a memory storing instructions for execution by one or more processors of an electronic device, and the one or more processors configured to execute the instructions to implement the method of any one of claims 1-11.