Display method, electronic device, medium, program product, chip
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-12-16
- Publication Date
- 2026-06-16
Smart Images

Figure CN122220009A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] 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.
[0003] 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
[0004] 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.
[0005] 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.
[0006] 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.
[0007] The first interface mentioned in this application may include the system interface of an electronic device (e.g., the one attached to the embodiments of this application). Figure 3A The interface shown is 310), or the first interface is the interface of an application installed in the electronic device (e.g., the interface shown in the appendix of this application embodiment). Figure 4A Interface 410 shown.
[0008] 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.
[0009] 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, Figure 1A As shown, 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, Figure 3A The interface 310 shown is displayed in portrait orientation. For example, Figure 1B As shown, the landscape display direction can refer to the direction from the long side 103 to the long side 101 of the tablet computer 1. For example, Figure 3F The display orientation of the interface 310 shown is landscape.
[0010] 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.
[0011] 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.
[0012] It is understandable that the first state and the second state are portrait mode and landscape mode, respectively.
[0013] 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.
[0014] 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.
[0015] 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.
[0016] 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.
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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.
[0021] In some possible implementations of the first aspect mentioned above, the first direction and the second direction are perpendicular to each other.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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
[0028] Figure 1A According to some embodiments of this application, a schematic diagram of a tablet computer 1 in portrait mode is shown;
[0029] Figure 1B According to some embodiments of this application, a schematic diagram of a tablet computer 1 in landscape mode is shown;
[0030] Figure 2A According to some embodiments of this application, schematic diagrams of the relevant interfaces of some tablet computers 1 when rotating the screen are shown;
[0031] Figure 2B According to some embodiments of this application, schematic diagrams of the relevant interfaces of other tablet computers 1 when rotating the screen are shown;
[0032] Figure 3A According to some embodiments of this application, a schematic diagram of the relevant interface of a tablet computer 1 in a desktop rotation scenario is shown;
[0033] Figure 3BAccording to some embodiments of this application, a second schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario is shown;
[0034] Figure 3C According to some embodiments of this application, a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario is shown in Figure 3;
[0035] Figure 3D According to some embodiments of this application, a schematic diagram of the relevant interface of the tablet computer 1 in a desktop rotation scenario is shown in Figure 4.
[0036] Figure 3E According to some embodiments of this application, schematic diagrams of the relevant interfaces of tablet computer 1 in a desktop-to-screen rotation scenario are shown. Figure 5 ;
[0037] Figure 3F According to some embodiments of this application, schematic diagrams of the relevant interfaces of tablet computer 1 in a desktop-to-screen rotation scenario are shown. Figure 6 ;
[0038] Figure 4A According to some embodiments of this application, a schematic diagram of the relevant interface of a tablet computer 1 in an application screen-switching scenario is shown;
[0039] Figure 4B According to some embodiments of this application, a second schematic diagram of the relevant interface of tablet computer 1 in an application screen-switching scenario is shown;
[0040] Figure 4C According to some embodiments of this application, a schematic diagram of the relevant interface of tablet computer 1 in the application screen rotation scenario is shown in Figure 3;
[0041] Figure 4D According to some embodiments of this application, a schematic diagram of the relevant interface of the tablet computer 1 in the application screen rotation scenario is shown in Figure 4.
[0042] Figure 4E According to some embodiments of this application, schematic diagrams of the relevant interfaces of tablet computer 1 in an application screen-switching scenario are shown. Figure 5 ;
[0043] Figure 4F According to some embodiments of this application, schematic diagrams of the relevant interfaces of tablet computer 1 in an application screen-switching scenario are shown. Figure 6 ;
[0044] Figure 5 According to some embodiments of this application, a hardware structure block diagram of a tablet computer 1 is shown;
[0045] Figure 6 According to some embodiments of this application, a software structure block diagram of a tablet computer 1 is shown;
[0046] Figure 7 According to some embodiments of this application, a flowchart of a screen rotation interface display method is shown;
[0047] Figure 8 According to some embodiments of this application, a schematic flowchart of a screen rotation method for a tablet computer 1 is shown;
[0048] Figure 9 According to some embodiments of this application, a schematic flowchart of another method for rotating the screen of a tablet computer 1 is shown. Detailed Implementation
[0049] 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.
[0050] 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.
[0051] Figure 1A and Figure 1B An exemplary structure of tablet computer 1 is shown. (Reference) Figure 1A and Figure 1B The tablet computer 1 may include long sides 101 and 103 extending along its length direction (X direction in each of the illustrations herein) and wide sides 102 and 104 extending along its width direction (Y direction in each of the illustrations herein), wherein 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.
[0052] Figure 1A and Figure 1B The two usage states of tablet computer 1 are shown respectively. Figure 1A In portrait mode (as an example of the first state), Figure 1B This is the landscape mode (as an example of the second mode). Reference Figure 1A When tablet 1 is in portrait mode, its wide sides 102 and 104 are essentially horizontal, and its long sides 101 and 103 are essentially vertical. (Reference) Figure 1B When the tablet computer 1 is in landscape mode, the long sides 101 and 103 of the tablet computer 1 can be basically horizontal, and the wide sides 102 and 104 can be basically vertical.
[0053] Continue reading Figure 1A When tablet 1 is in portrait mode, it can display interface 110. At this time, if a screen rotation operation is received on tablet 1, for example, if the user rotates tablet 1 to change its orientation, tablet 1 can switch from portrait to landscape mode. Figure 1B As shown, when the tablet computer 1 is in landscape mode, the display orientation of the interface 110 on the screen changes.
[0054] refer to Figure 1A and Figure 1B When the tablet computer 1 switches from portrait mode to landscape mode, the display orientation 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 orientation 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 orientation of the interface 110. Typically, when a user is reading an information list on the tablet computer 1, the display orientation is the column direction of the information list.
[0055] 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).
[0056] As mentioned earlier, when tablet 1 switches from portrait mode to landscape mode, a screen rotation animation will be displayed. That is, when tablet 1 switches from portrait mode to landscape mode, the display orientation of interface 110 on the screen will be rotated from the first orientation to the second orientation in the form of an animation. Figure 2AThe relevant interfaces involved in the screen rotation of the tablet computer 1 in some embodiments are shown.
[0057] like Figure 2A As shown in (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 on the tablet computer 1 is received (e.g., the device is detected to rotate), and a screen rotation command is generated to instruct the generation of a screen rotation animation.
[0058] It is understandable that the screen rotation command is generated after receiving the screen rotation request; therefore, as... Figure 2A As shown in (b), the tablet computer 1 will still display the interface 110 in the first orientation for the initial period after switching to landscape mode.
[0059] It can be understood that the display of any interface on tablet PC 1 includes the process by which tablet PC 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 PC 1 processes these multiple layers (e.g., resizing, compositing, rendering, etc.) to display the corresponding interface effect. For example, as shown... Figure 2A As shown in (a), the content displayed in 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 composite processing of layer 1 and layer 2 by tablet computer 1.
[0060] 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.
[0061] 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.
[0062] like Figure 2A As shown in (c) to (d), the tablet computer 1 animates the rotation of the display orientation of the interface 110 from the first orientation to the position shown in (c). Figure 2A The second direction is shown in (e). Specifically, by displaying a multi-frame rotating interface, an animation effect is achieved where 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. Figure 2A (c) and (d) in the figure show two frames of the rotating screen interface 111 and 112 as examples during the rotation process. In interface 111, the width of the background image increases to the width x11 and the length decreases to y11. In interface 112, the width of the background image increases to the width x12 and the length decreases to y12. Here, x1 < x11 < x12 < x2 and y1 > y11 > y12 > y2.
[0063] 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.
[0064] 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.
[0065] In addition, compared to Figure 2A During the screen rotation process, 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, resulting in lag and overheating. In the method of this 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 problems of lag and overheating.
[0066] The screen rotation interface display method provided in the embodiments of this application will now be described with reference to the accompanying drawings. Taking a tablet computer 1 as an example, Figure 2B The relevant interfaces of the tablet computer 1 during the screen switching process from portrait mode to landscape mode in some embodiments of this application are shown.
[0067] like Figure 2B As shown in (a) above, the tablet computer 1 displays interface 110 in portrait mode, and the display direction of interface 110 is a first direction. In this embodiment of the application, interface 110 may include a system interface (e.g., desktop) or an application interface. A description of interface 110 can be found above. Figure 2A The descriptions in the relevant embodiments will not be repeated here.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] like Figure 2B As shown in (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.
[0072] like Figure 2BAs shown in (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.
[0073] like Figure 2B As shown in (d) and (e), the tablet computer 1, based on the resized background image, animatedly rotates the display orientation of the interface 110 from the first orientation to... Figure 2B The second direction is shown in (f). Specifically, during the process of rotating the display direction 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 time the rotation angle of the background image is adjusted, one frame of the rotating interface can be displayed. Here, Figure 2B (d) and (e) in the figure show two frames of the rotating screen interface 210 and 220 as examples during the rotation process.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] like Figure 2B As described in (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 may be the same or different.
[0079] 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.
[0080] 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 A schematic diagram of the interface of tablet computer 1 in a desktop rotation scenario is shown.
[0081] like Figure 3A As shown, 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.
[0082] like Figure 3BAs shown, tablet 1 receives an operation from the user to rotate tablet 1 90 degrees counterclockwise from portrait mode to landscape mode, and generates a screen rotation command. It can be understood that the screen rotation command is generated after receiving the screen rotation operation; therefore, within an instant after the screen rotation is completed (for example, within 0.1 seconds after the screen rotation is completed), tablet 1 will... Figure 3B In landscape mode, the interface 310 is still displayed in the first orientation.
[0083] like Figure 3C As shown, tablet 1 responds to the screen rotation command and retrieves the desktop wallpaper. Then, tablet 1 enlarges 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 1, while interface 310 remains displayed in the foreground.
[0084] like Figure 3D and Figure 3E As shown, 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... Figure 3F As shown, tablet 1 displays interface 310 in a second orientation when in landscape mode. 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... Figure 3A and Figure 3F As shown, the tablet computer 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, the position of icon A2 changes from the second row to the first row.
[0085] In the application's screen-rotating scenario (when the tablet computer 1 receives a screen-rotating operation while displaying the application interface), interface 110 can be the application interface. Before and after the display orientation 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 A schematic diagram of the interface of tablet computer 1 in an application screen rotation scenario is shown.
[0086] like Figure 4A As shown, tablet 1 is in portrait mode, displaying interface 410 in the first orientation. Interface 410 is a friend message list interface in a social application. The content displayed on interface 410 includes multiple friend avatar icons and their corresponding friend names. For example, Figure 4A The text shows friend names 1-7 and their corresponding friend avatar icons, such as icon B1 for friend name 1 and icon B2 for friend name 2.
[0087] like Figure 4B As shown, the user can rotate tablet 1 90 degrees counterclockwise from portrait mode to landscape mode. Tablet 1 receives this user action, generates a rotation command, and within an instant of the rotation's completion (e.g., within 0.1 seconds), tablet 1 will... Figure 4B In landscape mode, the interface 410 is still displayed in the first orientation.
[0088] like Figure 4C As shown, 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 (for example, 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 In the example, a solid color background image filled with white is used.
[0089] like Figure 4D and Figure 4E As shown, during the rotation, tablet 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... Figure 4F As shown, the tablet computer 1 displays interface 410 in the second orientation when in landscape mode.
[0090] 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.
[0091] 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.
[0092] The tablet computer 1 mentioned in the embodiments of this application will be described below. Figure 5 This is a hardware structure block diagram of the tablet computer 1 according to an embodiment of this application. It can be understood that... Figure 5 The hardware block diagram shown is also applicable to other electronic devices besides tablet computer 1.
[0093] like Figure 5 As shown, 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.
[0094] 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.
[0095] Processor 101 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0096] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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...
[0106] 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.
[0107] The distance sensor 180F is used to measure distance. Tablet 1 can measure distance via infrared or laser.
[0108] The fingerprint sensor 180H is used to collect fingerprints. The tablet computer 1 can use the characteristics of the collected fingerprints to unlock the device, access app locks, take photos with fingerprints, and answer calls with fingerprints.
[0109] 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.
[0110] 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.
[0111] Figure 6 This is a software structure block diagram of the tablet computer 1 according to an embodiment of this application. It can be understood that... Figure 6 The software architecture diagram shown is also applicable to other electronic devices besides tablet 1. The layered architecture divides the software system into several layers, each with a clear role and function. 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.
[0112] 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.
[0113] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes predefined functions. It may include a window manager, animation control module, display resource manager, etc.
[0114] 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.
[0115] The Display Explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0116] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0117] 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.
[0118] 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.
[0119] The system library can include multiple functional modules. For example: rotation control module, graphics rendering module (GPU).
[0120] 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.
[0121] 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.
[0122] 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.
[0123] The graphics rendering module can receive data from the rotation control module, such as the zoom level 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 background image layer with the content layer. Finally, it displays the composited data, allowing the tablet 1 to display content as shown in the image. Figure 2B Interface 210 shown, or as Figures 3A-3F Interface 310 shown, and Figures 4A-4F Interface 410 is shown in the figure.
[0124] The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers and sensor drivers.
[0125] The following uses Figure 5 and Figure 6 Taking the tablet computer 1 with the structure shown as an example, the screen rotation interface display method provided in this application embodiment will be described. Figure 7 As shown in the embodiments of this application, the screen rotation interface display method includes the following steps:
[0126] 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.
[0127] 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 in a first state. For example, the first interface displayed in the first state may be as follows: Figure 2B The interface shown is 110, or... Figure 3A The interface shown is 310, or... Figure 4A The interface shown is 410.
[0128] As mentioned above, in this embodiment of the application, the display orientation of the interface when the tablet computer 1 is in portrait mode (e.g.) Figure 1A The X direction shown is defined as the first direction, which determines the display direction of the interface when the tablet 1 is in landscape mode (e.g., the direction shown in the image). Figure 1B The Y-direction shown is the second direction. In other embodiments, the first direction can also be interpreted as the display direction of the interface when the tablet 1 is in landscape mode (e.g., Figure 1BThe Y direction (as shown) and the second direction can also be interpreted as the display direction of the interface when the tablet 1 is in portrait mode (e.g., the Y direction). Figure 1A (in the X direction shown).
[0129] 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.
[0130] 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.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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.
[0136] For a specific example of using animation to rotate the display orientation of the first interface on the screen from the first direction to the second direction, please refer to the above text. Figure 2B ,or Figures 3A-3F or Figures 4A-4F Related descriptions.
[0137] 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.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] 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.
[0142] 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.
[0143] 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).
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] 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.
[0149] Figure 8 The following are examples of screen-rotating methods for tablet computer 1 in specific embodiments. Figure 8 As shown, the screen rotation methods include:
[0150] S801, Tablet 1 detected a switch between portrait and landscape modes; see the relevant description of step S710 above for details.
[0151] 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.
[0152] 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.
[0153] S803, the rotation control module calculates the drawing data for the rotating screen interface.
[0154] 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.
[0155] 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.
[0156] 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.
[0157] S805, the graphics rendering module, processes the drawing data to generate display data for the corresponding frame of the screen transition interface.
[0158] 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.
[0159] 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.
[0160] S806, the graphics rendering module displays the data.
[0161] 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.
[0162] Figure 9 A method for rotating the screen of tablet computer 1 is shown in some other specific embodiments. Figure 8 The only difference shown is:
[0163] 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.
[0164] 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.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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.
[0169] 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.
[0170] 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.
[0171] 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.
[0172] 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 in that, 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 according to claim 1, characterized in that, 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 according to claim 1, characterized in that, 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 according to claim 1, characterized in that, 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 according to claim 2, characterized in that, 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 according to claim 1, characterized in that, 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 according to claim 7, characterized in that, 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, characterized in that, include: Memory, used to store one or more programs; A processor for executing the one or more programs to cause the electronic device to perform the method of any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes one or more computer programs that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 11.
14. A computer program product, characterized in that, When the computer program product is executed on an electronic device, it causes the electronic device to implement the method described in any one of claims 1 to 11.
15. A chip, characterized in that, The chip includes a memory for storing instructions executed by one or more processors of an electronic device, and the one or more processors for performing the method of any one of claims 1 to 11.