Desktop display method, electronic device, storage medium, chip system and computer program product
Patent Information
- Application Number
- CN202510337159.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]但可能的实现中,在返回桌面的过程中,电子设备可能由于壁纸A和壁纸B的切换,导致出现闪屏场景
[0031]应当理解的是,本申请的第二方面至第五方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
Smart Images

Figure CN122795481A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to desktop display methods, electronic devices, storage media, chip systems, and computer program products. Background Technology
[0002] Electronic devices offer a wide variety of wallpaper styles to enhance interface aesthetics and provide users with a visually pleasing experience. These wallpapers can be displayed in either landscape or portrait mode, and the orientation can be switched according to the user's preference.
[0003] In a possible implementation, to accommodate different aspect ratios in landscape and portrait orientations, electronic devices can provide a dual-wallpaper function. For example, an electronic device can display wallpaper A in landscape mode and wallpaper B in portrait mode; the objects in wallpaper A and wallpaper B can be the same.
[0004] However, in a possible implementation, during the process of returning to the desktop, the electronic device may experience screen flickering due to the switching between wallpaper A and wallpaper B. Summary of the Invention
[0005] This application provides a desktop display method, electronic device, storage medium, chip system, and computer program product, applied in the field of terminal technology. When returning to the desktop, and the screen orientation and application orientation are different, the electronic device can first play an application exit animation corresponding to the application orientation; after the application exit animation finishes playing, a full-screen screenshot is taken and displayed on top; the electronic device plays a rotation animation to switch the orientation of multiple user interface elements to the screen orientation. During the full-screen wallpaper is displayed on top, the full-screen wallpaper can obscure the wallpaper switching process, making the wallpaper switching process invisible to the user, thereby reducing screen flickering caused by wallpaper switching.
[0006] In a first aspect, embodiments of this application propose a desktop display method applied to an electronic device, the method comprising: displaying a first interface (e.g., Figure 4 The interface shown in Figure a); wherein, the first interface includes a window of the first application (the full-screen window 301 of the camera application), the screen orientation of the electronic device is the first orientation (e.g., portrait orientation); the application orientation of the first application is the second orientation (e.g., the application orientation of the camera application is landscape orientation); in response to the trigger operation of returning to the desktop, the first animation effect of the second orientation is played (e.g., Figure 4 The interface shown in 'a' is... Figure 4The animation in the interface shown in d); the first animation is the transition from the window of the first application to the icon of the first application; wherein, in the first animation in the second direction, the screen orientation is the first direction (e.g., the screen orientation is portrait), the desktop orientation is the second direction (e.g., the desktop orientation is landscape), the wallpaper on the desktop is the first wallpaper (e.g., wallpaper A101), and the first wallpaper is a wallpaper suitable for the desktop in the second direction (e.g., a landscape-adapted wallpaper); after the first animation in the second direction is completed, a full-screen screenshot of the second interface is taken (e.g., Figure 5 The full-screen screenshot 501 in the interface shown in Figure a displays a full-screen screenshot; the second interface includes the desktop in the second direction (e.g., landscape desktop) and the first wallpaper. It should be understood that the full-screen screenshot is a screenshot of the second interface, so the full-screen screenshot includes the content of the desktop in the second direction and the first wallpaper; play a rotation effect (e.g., Figure 5 The interface shown in 'a' is... Figure 5 The animation effects are shown in d in the figure; the rotation animation effects are the switching from the desktop in the second direction (e.g., landscape desktop) to the desktop in the first direction (e.g., portrait desktop), the switching from the first wallpaper (e.g., wallpaper A 101) to the second wallpaper (e.g., wallpaper B 102), and the animation effect of the full-screen screenshot disappearing; the second wallpaper is the wallpaper that is suitable for the desktop in the first direction (e.g., the wallpaper that is adapted to the portrait screen).
[0007] In this way, in the first animation of the second direction, the landscape and portrait orientations of multiple user interface elements are consistent with the application orientation, ensuring that the user interface elements adjust synchronously with the application orientation. This makes the animation process smoother and prevents display errors due to inconsistent orientations. Simultaneously, in the first animation of the second direction, the wallpaper type corresponds to the wallpaper's display orientation; for example, displaying wallpaper A in landscape mode or wallpaper B in portrait mode avoids the wallpaper object appearing to be enlarged or shrunk due to inconsistencies in wallpaper type and display orientation, improving the wallpaper's aesthetics. Furthermore, during wallpaper switching, the electronic device displays a full-screen screenshot of the completed first animation of the first direction on top of the screen; the user cannot see the screen flickering caused by the wallpaper switching process; this improves the smoothness of returning to the home screen and enhances the user experience.
[0008] It is understood that the first direction may include either portrait or landscape orientation, and the second direction may include either landscape or portrait orientation, the second direction being different from the first direction; if the first direction is portrait, then the second direction is landscape; if the first direction is landscape, then the second direction is portrait. This application embodiment only describes the desktop display method provided in the context of the first direction being portrait and the second direction being landscape. In practical applications, if the first direction is landscape, then the second direction is portrait. This application embodiment will not repeat this description.
[0009] Optionally, after displaying the full-screen screenshot, the process also includes: drawing a second wallpaper; the second wallpaper is located below the full-screen screenshot. In this way, after the full-screen screenshot is displayed on top, the electronic device can complete the wallpaper switching process below the full-screen screenshot. The full-screen screenshot covers the wallpaper switching process, making the user unable to see the flashing screen during wallpaper switching, improving the smoothness of returning to the desktop, and enhancing the user experience.
[0010] Optionally, after displaying the full-screen screenshot, the method further includes: drawing the desktop in a first direction (e.g., the desktop in portrait orientation in S815); the desktop in the first direction is located below the full-screen screenshot and above the second wallpaper.
[0011] In this way, the desktop orientation is updated from landscape to portrait, and the change in desktop layout can cause a visual jump. In this embodiment, the process of updating the desktop orientation also occurs during the display of a full-screen screenshot, and the full-screen screenshot is located on the top layer of the desktop, so the user does not perceive the change in desktop orientation, which improves the smoothness of returning to the desktop and enhances the user experience.
[0012] Optionally, the rotation animation includes a full-screen screenshot, a desktop in a first direction, and a second wallpaper. In the rotation animation, the full-screen screenshot, the desktop in the first direction, and the second wallpaper undergo the following process: the full-screen screenshot, the desktop in the first direction (e.g., portrait desktop), and the second wallpaper (e.g., wallpaper B 102) are displayed in a second direction (e.g., landscape); the full-screen screenshot, the desktop in the first direction, and the second wallpaper rotate a preset angle (e.g., 90°) along the center of the same direction, and the full-screen screenshot disappears; the desktop in the first direction and the second wallpaper are displayed in the first direction (landscape).
[0013] In this way, the electronic device can display a full-screen screenshot, Wallpaper B, and the portrait desktop rotating simultaneously. During the rotation, the transparency of the full-screen screenshot gradually decreases, and the electronic device gradually displays Wallpaper B and the portrait desktop. This makes the transition from Wallpaper A and the landscape desktop in the full-screen screenshot to Wallpaper B and the portrait desktop smoother and avoids visual abruptness when switching from the last frame of the full-screen screenshot (e.g., Wallpaper A and the landscape desktop) to the rotating Wallpaper B and the portrait desktop.
[0014] Optionally, before playing the first animation effect in the second direction, the method further includes: calculating the screen orientation; the screen orientation is the first orientation (e.g., portrait mode); the application orientation of the first application is the second orientation (e.g., landscape mode); if the screen orientation is different from the application orientation of the first application, determining whether a first preset condition is met; the first preset condition is used to determine whether it is in a dual-wallpaper scenario where the application is in the background and returns to the desktop; the dual-wallpaper scenario is a scenario where the electronic device updates the wallpaper according to the screen orientation; if it is determined that the first preset condition is met, setting the screen orientation to the second orientation (e.g., landscape mode); wherein the desktop orientation is the second orientation, and the wallpaper on the desktop is the first wallpaper (e.g., wallpaper A); and creating the first animation effect in the second direction.
[0015] This process can correspond to steps S802-S805.
[0016] This allows the application orientation to be used as the modified screen orientation, preventing the desktop orientation from changing with the screen orientation. The landscape and portrait orientations of multiple user interface elements remain consistent with the application orientation, ensuring synchronized adjustments and smoother animations. This prevents display errors due to inconsistent orientations. Furthermore, in the first animation of the second orientation, the wallpaper type corresponds to the wallpaper's display orientation; for example, displaying wallpaper A in landscape mode or wallpaper B in portrait mode. This avoids the wallpaper object appearing enlarged or shrunk due to inconsistencies between the wallpaper type and display orientation, improving the wallpaper's aesthetics.
[0017] Optionally, before playing the rotation animation, the method further includes: obtaining the screen orientation when a second preset condition is met; the screen orientation is a first orientation; the second preset condition is used to determine whether the application is in a dual-wallpaper scenario where the application has been moved to the background, returned to the desktop, and the first animation has finished playing; creating the rotation animation; generating configuration information for the desktop orientation when the desktop orientation is different from the first orientation; and generating configuration information for the wallpaper when the wallpaper does not correspond to the first orientation; the configuration information for the desktop orientation is used to indicate the drawing of the desktop in the first orientation; and the configuration information for the wallpaper is used to indicate the drawing of the second wallpaper.
[0018] This process corresponds to steps S807-S812. In this way, the electronic device can correct the modified screen orientation, triggering a process where user interface elements change with the screen orientation, enabling the electronic device to subsequently switch wallpapers and play rotation effects.
[0019] Optionally, the first preset condition includes one or more of the following: there is a page in the first state at the top level, the page is not empty, the page includes a desktop type window, the page includes a wallpaper window, the wallpaper manager of the wallpaper window is not empty and the type of the wallpaper manager is dual wallpaper type, or the page is in the first animation period and the animation type of the first animation is a return to background type or a close type; the first state is used to indicate that the desktop enters the foreground and begins to interact with the user.
[0020] In this way, the electronic device can determine whether it is in a certain state based on the first preset condition. Figure 4 The example shown is a dual-wallpaper scenario where the application is either in the background or back on the desktop. In this scenario, the application orientation can be set as the modified screen orientation to prevent the desktop orientation from changing with the screen orientation.
[0021] Optionally, the second preset condition includes one or more of the following: the top layer has a page in the first state, the page is not empty, the page includes a desktop type window, the lower layer of the page includes a wallpaper window, the wallpaper manager of the wallpaper window is not empty and the type of the wallpaper manager is dual wallpaper type, or the animation type of the first animation is a return to background type or a close type.
[0022] In this way, the electronic device can determine whether it is in a certain state based on the second preset condition. Figure 5 The application shown is in a dual-wallpaper scenario where it is moved to the background, returned to the desktop, and the first animation has finished playing. In this scenario, the screen orientation can be corrected to trigger the wallpaper switching and rotation animation playback process.
[0023] Optionally, it also includes: displaying a third interface (e.g. Figure 2 The interface shown in Figure a); wherein, the third interface includes the window of the second application (e.g., the full-screen window 201 of the e-book application), the screen orientation of the electronic device is the first orientation (e.g., portrait mode); the application orientation of the second application is the first orientation; in response to the trigger operation of returning to the desktop, the second animation effect of the first orientation (e.g., Figure 2 The interface shown in 'a' is... Figure 2 The animation effect of the interface shown in d); the second animation effect is the animation effect of transitioning from the window of the second application to the icon of the second application; wherein, in the second animation effect in the first direction, the screen direction is the first direction (e.g., portrait), the desktop direction is the first direction (e.g., portrait), the wallpaper in the desktop is the second wallpaper (e.g., wallpaper B), and the second wallpaper is the wallpaper suitable for the desktop in the first direction (e.g., a wallpaper adapted to portrait).
[0024] In this way, electronic devices can provide a smooth visual transition back to the desktop through application exit animations; at the same time, the desktop orientation and wallpaper correspond to the screen orientation, enhancing visual consistency.
[0025] Optionally, before playing the second animation effect in the first direction, the process includes: calculating the screen orientation; setting the screen orientation as the first direction; setting the application orientation of the second application as the first direction; and creating the second animation effect in the first direction if the screen orientation and the application orientation of the second application are the same. This ensures that the screen orientation and the application orientation of the second application are the same, and that the landscape and portrait orientations of multiple user interface elements are consistent with both the application orientation and the screen orientation, allowing the user interface elements to adjust synchronously with both the application orientation and the screen orientation, resulting in a smoother animation process.
[0026] In a second aspect, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store computer execution instructions, and the processor is used to run the computer execution instructions stored in the memory to perform the method described in the first aspect or any possible implementation thereof.
[0027] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0028] Fourthly, embodiments of this application provide a computer program product including a computer program, which, when run, causes the computer to perform the method described in the first aspect or any possible implementation thereof.
[0029] Fifthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation thereof. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.
[0030] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).
[0031] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0032] Figure 1 A schematic diagram of the interface for a dual-wallpaper scene provided in an embodiment of this application;
[0033] Figure 2 This is a schematic diagram of the interface for returning to the desktop in a dual-wallpaper scenario where the screen orientation and application orientation are the same, as provided in an embodiment of this application.
[0034] Figure 3 This is a schematic diagram illustrating the screen flickering phenomenon that occurs when returning to the desktop in a dual-wallpaper scenario where the screen orientation and application orientation are different, as a possible implementation.
[0035] Figure 4 This is a schematic diagram of the interface for application exit animation in a dual-wallpaper scenario where the screen orientation and application orientation are different, as provided in an embodiment of this application.
[0036] Figure 5 This is a schematic diagram of the interface with rotation animation effect in a dual-wallpaper scenario where the screen orientation and application orientation are different, as provided in an embodiment of this application.
[0037] Figure 6 This is a schematic diagram illustrating the interaction flow of various software modules of an electronic device in a dual-wallpaper scenario where the screen orientation and application orientation are the same and the user returns to the desktop, as provided in an embodiment of this application.
[0038] Figure 7 This is a schematic diagram illustrating the interaction flow of various software modules of an electronic device in a dual-wallpaper scenario where the screen orientation and application orientation are different and the user returns to the desktop.
[0039] Figure 8 This is a schematic diagram illustrating the interaction flow of various software modules of an electronic device in a dual-wallpaper scenario where the screen orientation and application orientation are different and the user returns to the desktop, as provided in an embodiment of this application.
[0040] Figure 9 A schematic diagram illustrating the interaction flow of various software modules of the electronic device provided in the embodiments of this application;
[0041] Figure 10 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application;
[0042] Figure 11 This is a schematic diagram of the structure of a desktop display device provided in an embodiment of this application. Detailed Implementation
[0043] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:
[0044] 1. Electronic equipment
[0045] The electronic devices in this application embodiment may include handheld devices with dual wallpaper functionality, vehicle-mounted devices, etc. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.
[0046] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. A wearable device can also be called a wearable smart device. The electronic device can also be a terminal device in an Internet of Things (IoT) system.
[0047] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.
[0048] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0049] 2. Other terms
[0050] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.
[0051] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0052] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.
[0053] Electronic devices can support dual-wallpaper scenarios. In a dual-wallpaper scenario, wallpaper types can include landscape-adapted and portrait-adapted types; landscape-adapted wallpapers are those suitable for landscape screens, and portrait-adapted wallpapers are those suitable for portrait screens. Let's first combine... Figure 1 The dual-wallpaper scenario provided in the embodiments of this application will be described. For example... Figure 1 As shown:
[0054] Electronic devices can be positioned in different screen orientations depending on their placement. Taking a tablet computer as an example, an electronic device can include a first side and a second side. The first side can be the longer side of the electronic device, and the second side can be the shorter side. The length of the first side is greater than the length of the second side.
[0055] A screen orientation of landscape mode can be, for example, where the first side of the electronic device is parallel to the x-axis, or the angle between the first side and the x-axis is less than an angle threshold; and the second side of the electronic device is parallel to the y-axis, or the angle between the second side and the y-axis is less than an angle threshold. Here, the x-axis is perpendicular to the direction of gravity, and the y-axis is parallel to the direction of gravity.
[0056] When the screen orientation of an electronic device is landscape, the electronic device can display, as follows: Figure 1 The interface shown in Figure 'a'; Figure 1 In the interface shown in Figure a, the electronic device can display wallpaper A 101 and the landscape desktop (hereinafter referred to as the landscape desktop).
[0057] Wallpaper A 101 can be a type of wallpaper that adapts to landscape mode, for example... Figure 1 The wallpaper for the dog in the interface shown in Figure 'a'. When the screen orientation is landscape, the first side of the landscape-adapted wallpaper coincides with the first side of the electronic device and has the same length; the second side of the landscape-adapted wallpaper coincides with the second side of the electronic device and has the same length; the first side of the landscape-adapted wallpaper is parallel to the x-axis, or the angle between the first side and the x-axis is less than an angle threshold; the second side of the landscape-adapted wallpaper is parallel to the y-axis, or the angle between the second side and the y-axis is less than an angle threshold.
[0058] The aspect ratio of landscape-adapted wallpapers is the same as the aspect ratio of the screen in landscape mode. For example, when the screen orientation is landscape, the aspect ratio of an electronic device screen is the ratio of the first side to the second side; the aspect ratio of landscape-adapted wallpapers is also the ratio of the first side to the second side.
[0059] A landscape desktop can include the main screen and a dock.
[0060] The main interface can be used to display multiple application icons and / or service cards from the desktop. Users can control the electronic device to switch between main interfaces by swiping on the desktop; the electronic device can display application icons and / or service cards from multiple main interfaces.
[0061] Multiple application icons can include, for example, social media app icons, email app icons, calculator app icons, navigation app icons, settings app icons, game app icons, clock app icons, calendar app icons, gallery app icons, and notes app icons. Service cards can include, for example, weather cards and note cards.
[0062] The dock can be used to display multiple application icons on the desktop; the dock can be located in the edge area of the screen, for example... Figure 1 In the interface shown in Figure 'a', the dock is located at the bottom of the screen. The application icons in the dock can be icons that are permanently displayed on the desktop; for example, when a swipe operation is received on the desktop, the electronic device can change the application icons and / or service cards on the main interface, but not the application icons in the dock 101.
[0063] The dock bar contains various application icons, such as SMS app icons, video app icons, music app icons, e-book app icons, folder app icons, browser app icons, camera app icons, and note-taking app icons.
[0064] Understandably, landscape mode is the desktop displayed on an electronic device when the screen orientation is landscape. In landscape mode, the dock can be placed on one side of the first edge of the electronic device, and the application icons in the dock are distributed horizontally along the first edge; the application icons in each row of the main interface can be distributed horizontally, and each row of application icons is parallel to the first edge of the electronic device.
[0065] After rotating the electronic device by a preset angle (e.g., 90° or 270°), the screen orientation of the electronic device can be switched to portrait mode. For example, the screen orientation can be portrait mode if: the second side of the electronic device is parallel to the x-axis, or the angle between the second side and the x-axis is less than an angle threshold; or the first side of the electronic device is parallel to the y-axis, or the angle between the first side and the y-axis is less than an angle threshold. Here, the x-axis is perpendicular to the direction of gravity, and the y-axis is parallel to the direction of gravity.
[0066] When the screen orientation of an electronic device is portrait mode, the electronic device can display, as shown below. Figure 1 The interface shown in b; Figure 1 In the interface shown in b, the electronic device can display wallpaper B 102 and a portrait-oriented desktop (hereinafter referred to as the portrait desktop).
[0067] Wallpaper B 102 can be a type of wallpaper adapted for portrait mode, such as... Figure 1 The wallpaper for the dog in the interface shown in b is as follows: When the screen orientation is portrait, the first side of the portrait-adapted wallpaper coincides with the first side of the electronic device and has the same length; the second side of the portrait-adapted wallpaper coincides with the second side of the electronic device and has the same length; the second side of the portrait-adapted wallpaper is parallel to the x-axis, or the angle between the second side and the x-axis is less than the angle threshold; the first side of the portrait-adapted wallpaper is parallel to the y-axis, or the angle between the first side and the y-axis is less than the angle threshold.
[0068] The aspect ratio of portrait-oriented wallpapers is the same as that of the screen in portrait mode. For example, when the screen orientation is portrait, the aspect ratio of an electronic device screen is the ratio of the second side to the first side; the aspect ratio of portrait-oriented wallpapers is also the ratio of the second side to the first side.
[0069] In this scenario, the object in wallpaper B 102 and the object in wallpaper A 101 can be the same object; for example, wallpaper B 102 and wallpaper A 101 can both feature the same dog. This way, when switching between wallpaper A and wallpaper B, the electronic device can display the same object, maintaining visual consistency and helping users adapt more easily to interface changes. In some embodiments, the objects in wallpaper A and wallpaper B in a dual-wallpaper scenario can also be different; this application does not impose such limitations.
[0070] Comparing wallpapers A101 and B102, it's clear that the height of wallpaper A101 is less than the height of wallpaper B102. For vertical objects in the wallpapers (e.g., the width of a dog in a wallpaper is less than its height), the object size in wallpaper B102 can be larger than the object size in wallpaper A101; for example, the dog in wallpaper B102 can be larger than the dog in wallpaper A101. This reduces the white space at the top and bottom of wallpaper B102, harmonizing the proportions of the objects to the background. In a dual-wallpaper scenario, the different object sizes in wallpapers A101 and B102 provide users with different visual experiences.
[0071] It is understood that this application embodiment uses the example of vertically oriented objects in dual wallpapers to illustrate the objects in wallpapers A and B. In practical applications, the objects in dual wallpapers can also be horizontally oriented (e.g., the height of the object is less than its width). For horizontally oriented objects, the size of the object in wallpaper B 102 can be smaller than the size of the object in wallpaper A 101; alternatively, electronic devices can define the size of the objects in wallpaper A and wallpaper B using other dimensional relationships. This application embodiment does not impose any limitations on this.
[0072] A portrait-oriented desktop can include a main screen and a dock.
[0073] The main interface may include multiple application icons and multiple service cards. The multiple application icons and multiple service cards on the portrait-oriented main interface can be the same as those on the landscape-oriented main interface; this will not be elaborated further here.
[0074] The dock can include multiple application icons; for example, SMS app icons, video app icons, music app icons, e-book app icons, browser app icons, camera app icons, and note-taking app icons.
[0075] It is understandable that a portrait desktop refers to the desktop displayed on an electronic device when the screen orientation is portrait. In a portrait desktop, the dock can be placed on one side of the second edge of the electronic device, and the application icons in the dock are distributed horizontally along the second edge; the application icons in each row of the main interface can be distributed horizontally, and each row of application icons is parallel to the second edge of the electronic device.
[0076] Understandably, when the length of the first side is greater than the length of the second side, the number of application icons per row in the main interface of a landscape desktop can be greater than the number of application icons per row in the main interface of a portrait desktop; the number of application icons in the dock bar of a landscape desktop can also be greater than the number of application icons in the dock bar of a portrait desktop. Furthermore, the aspect ratio of wallpaper A101 is different from that of wallpaper B102, and the object sizes in wallpaper A101 are different from those in wallpaper B102. This optimizes the utilization of screen space under different screen orientations. By using adapted wallpapers and desktop layouts in landscape and portrait modes respectively, users can obtain better visual effects in different screen orientations.
[0077] It is understandable that electronic devices can maintain their screen orientation when displaying the desktop. For example, when the screen orientation is portrait, the electronic device can display a portrait-adapted wallpaper as shown in Wallpaper B 102; when the screen orientation is landscape, the electronic device can display a landscape-adapted wallpaper as shown in Wallpaper A 101. However, in possible implementations, when the screen orientation of the electronic device changes, the electronic device can switch from displaying a portrait-adapted wallpaper to a landscape-adapted wallpaper, or vice versa. Because landscape-adapted and portrait-adapted wallpapers present different visual effects, users can observe a screen flickering phenomenon during the wallpaper switching process.
[0078] The following are combined with Figure 2 This section explains scenarios where no wallpaper change occurs, and combines... Figure 3 Explain the scenarios in which wallpaper changes occur.
[0079] Taking the example of an electronic device's screen orientation being the same as the orientation of a running application, Figure 2 This illustration shows a schematic diagram of the interface when an electronic device returns to the desktop in a dual-wallpaper scenario according to an embodiment of this application. Figure 2 As shown:
[0080] In this embodiment of the application, the electronic device returning to the desktop can be: when an application is switched to the background, the electronic device cancels the display of the application and displays the desktop.
[0081] For example, an application whose orientation is the same as the screen orientation can be a second application. The electronic device can run the second application in the foreground; wherein the screen orientation of the electronic device is portrait, and the application orientation of the second application is also portrait.
[0082] Taking the second application as an e-book application as an example, the electronic device can display a full-screen window 201 of the e-book application (which can correspond to the window of the second application), such as... Figure 2 The interface shown in 'a' (which may correspond to the third interface) may include the text content of the e-book application in the full-screen window 201.
[0083] For applications in portrait mode, for example: the longer side of the full-screen window 201 corresponds to the first side of the electronic device, and the shorter side of the full-screen window 201 corresponds to the second side of the electronic device. Specifically, text and images in portrait applications can be arranged along the shorter side of the full-screen window 201; for example, the number of characters in each line of text and the width of images are limited by the shorter side.
[0084] exist Figure 2 In the interface shown in Figure 'a', when a trigger action to return to the desktop is received, the electronic device can display the desktop and the application exit animation of the e-book application, and the electronic device will cancel the display of the full-screen window 201 of the e-book application. The application exit animation can be an animation that transitions from the application's full-screen window to the application icon, such as... Figure 2 The interface shown in 'a' is... Figure 2 The interface shown in d is shown in the image.
[0085] Understandably, one way to return to the home screen is by clicking the home button. Another way is by swiping up from the bottom of the application; for example, if an e-book application is in portrait mode, the trigger could be... Figure 2The operation shown in Figure 'a' involves swiping up from the bottom of the screen. Another trigger for returning to the home screen is receiving a swipe-back operation from the side inwards on the first-level page of the application; for example, in a portrait-oriented e-book application, the trigger could be a swipe from the left edge to the right, or a swipe from the right edge to the left. Yet another trigger for returning to the home screen is a voice command indicating exit or background operation. Yet another trigger for returning to the home screen is a long press on the floating cursor after enabling the floating navigation function. These examples are not listed in detail in this application.
[0086] The process of displaying an app exit animation for an e-book application on an electronic device can be as follows: Figure 2 The interface shown in 'a' is... Figure 2 The interface shown in d is an example:
[0087] exist Figure 2 The interface shown in Figure 'a' receives a trigger to return to the desktop.
[0088] In response to a return to the desktop, the electronic device displays wallpaper B 102, a portrait-oriented desktop, and a gradually shrinking screenshot of an e-book application window 202. The e-book application window screenshot 202 can be located above the desktop, and the desktop can be located above wallpaper B 102; the e-book application window screenshot 202 can be... Figure 2 The screenshot shown in Figure a is of the full-screen window 201 of the e-book application. The initial size of the e-book application window screenshot 202 is the same as that of the full-screen window 201 of the e-book application. The desktop orientation, application orientation and screen orientation are the same, all of which are portrait orientation.
[0089] As the e-book application window screenshot 202 continues to shrink, multiple application icons and / or multiple service cards can gradually appear on the desktop; the e-book application icon may not be present on the desktop. For example, in Figure 2 In the interface shown in b, the position of the dashed box 203 corresponds to the position of the e-book application icon on the desktop. The electronic device does not display the e-book application icon.
[0090] The e-book application window screenshot 202 can be further reduced until it is reduced to a preset size; the electronic device will then switch the e-book application window screenshot 202 to the e-book application icon 204, as shown below. Figure 2 The interface shown in 'c' is an example. Preset sizes can be, for example, the size of the application icon.
[0091] Taking the e-book application icon 204 located in the dock area as an example, in Figure 2 In the interface shown in c, the position of the e-book application icon 204 can be higher than the positions of other application icons in the dock.
[0092] After switching to the e-book application icon 204, the electronic device can display the e-book application icon 204 gradually moving down until it is the same height as other application icons in the dock, such as... Figure 2 The interface shown in d is as follows. Thus, after switching from the application window screenshot to the application icon, the e-book application icon 204 can be highlighted to guide the user's eye to follow the e-book application icon 204, thereby reminding the user that they are currently exiting the e-book application.
[0093] It should be noted that, in Figure 2 The interface shown in b is to Figure 2 In the interface shown in d, the desktop orientation is the same as the screen orientation, both being portrait orientation; the wallpaper is wallpaper B, and wallpaper B is a portrait-adapted type.
[0094] Optional, in Figure 2 The interface shown in b is to Figure 2 In the interface shown by d, the status bar 205 can be in portrait orientation; the status bar orientation describes the horizontal or vertical orientation of the status bar. For example, the status bar in portrait orientation can be set on the second side of the electronic device; the status bar in landscape orientation can be set on the first side of the electronic device.
[0095] It should be noted that this embodiment describes the scenario of returning to the desktop using a scenario where both the screen orientation of the electronic device and the application orientation of the running application are portrait mode. In practical applications, both the screen orientation of the electronic device and the application orientation of the second application can be landscape mode, and the electronic device can also display the same orientation as the desktop. Figure 2 The illustrated embodiments produce similar effects. This application will not elaborate further on these aspects in its embodiments.
[0096] In landscape mode, for example, the longer side of the application's full-screen window corresponds to the first side of the electronic device; the shorter side corresponds to the second side of the electronic device. Specifically, text and images in landscape applications can be arranged along the longer side of the full-screen window; for example, the number of characters in each line of text and the width of images are limited by the longer side.
[0097] Thus, electronic devices can provide a smooth visual transition back to the desktop through application exit animations; at the same time, the desktop orientation and wallpaper correspond to the screen orientation, enhancing visual consistency.
[0098] In some implementations, a screen flicker may occur when the screen orientation of an electronic device differs from the orientation of a running application, causing the device to return to the home screen. The following example illustrates this: the electronic device's screen is in portrait mode, while the running application is in landscape mode. Figure 3 This section describes the scenario where the electronic device returns to the desktop in a dual-wallpaper setup, as shown in the example. Figure 3 As shown:
[0099] It should be noted that an application whose orientation differs from the screen orientation can be considered the first application. An electronic device can run the first application in the foreground; where the screen orientation of the electronic device is portrait, and the application orientation of the first application is landscape. Taking a camera application as an example, if the screen orientation is portrait, the camera application can remain in landscape mode; the application orientation of the camera application does not need to change with the screen orientation.
[0100] For example, when the screen orientation is portrait, the electronic device can display a full-screen window 301 of the camera application, such as... Figure 3 The interface shown in Figure 'a'. The full-screen window 301 of the camera application may include a preview area and multiple controls for shooting. The preview area can be an area used to display the subject being photographed, for example... Figure 3 The area shown in Figure 'a' is where the "girl" is located in the interface. Multiple controls for shooting can include shooting function controls and shooting mode controls; shooting function controls can include, for example, settings controls, flash controls, AI controls, magnification controls, filter controls, camera switching controls, shutter controls, and thumbnail controls; shooting mode controls can be used to select shooting modes, such as movie mode, video mode, still photo mode, portrait mode, and night scene mode, etc.
[0101] It is understandable that the camera application maintains a landscape orientation regardless of the screen orientation. Specifically, the positions of multiple controls used for shooting within the camera application remain fixed relative to the screen across different screen orientations, and their layout does not change with the screen orientation. For example, taking a tablet as an example, when the screen orientation is portrait, the controls for shooting can be arranged along the first edge of the electronic device; when the screen orientation is landscape, the controls for shooting still follow the first edge of the electronic device. In this embodiment, the application that maintains the same orientation across different screen orientations can also be other applications that are forced to be landscape or forced to be portrait; this embodiment does not impose any limitations on this.
[0102] For example, in Figure 3 In the interface shown in Figure a, when a trigger operation to return to the desktop is received, the electronic device can display the desktop and the application exit animation of the camera application, and the electronic device cancels the display of the full-screen window 301 of the camera application.
[0103] When the screen orientation is portrait and the camera app is landscape, the trigger for returning to the home screen includes, for example, a swipe up from the bottom of the app, which could be a swipe from the left side of the screen to the right; and a swipe inward from the side of the app's first-level page, which could be a swipe down from the top edge or a swipe up from the bottom edge, which could be a swipe to return to the previous level. Other triggers for returning to the home screen can be found in [reference needed]. Figure 2 The relevant descriptions in the document will not be repeated here.
[0104] The process of exiting an application's camera app on an electronic device can be as follows: Figure 3 The interface shown in 'a' is... Figure 3 The interface shown in d is an example:
[0105] exist Figure 3 The interface shown in Figure 'a' receives a trigger to return to the desktop.
[0106] In response to a return to the desktop, the electronic device displays a magnified wallpaper A302, a portrait-oriented desktop, a gradually shrinking camera application window screenshot 303, and a status bar 307. The camera application window screenshot 303 can be positioned above the desktop, and the desktop can be positioned above the magnified wallpaper A302. The initial size of the camera application window screenshot 303 is the same as the full-screen window 301 of the camera application. The desktop orientation and the screen orientation are the same, both being portrait.
[0107] It should be noted that the wallpaper type corresponds to the orientation of the application being moved to the background; for example, if the camera application is in landscape mode, then the wallpaper will be a landscape-adapted type, such as the enlarged wallpaper A302. The status bar orientation is the same as the orientation of the application being moved to the background; for example, if the camera application is in landscape mode, then the status bar 307 will be in landscape mode.
[0108] Understandably, in Figure 3 In the interface shown in b, the orientation of the application being launched can be consistent with the screen orientation; for example, if the application being launched is a desktop application, then the desktop orientation is the same as the screen orientation, both being portrait mode. During the application exit animation, the orientation of other user interface elements can continue the orientation of the exiting application; for example, if the exiting camera application is a landscape application, then the wallpaper is a landscape-adapted wallpaper, such as wallpaper A, and the status bar orientation is landscape. User interface elements can include, for example, the desktop, wallpaper, application, and status bar.
[0109] It should be noted that, Figure 3 The enlarged wallpaper A 302 shown in the interface b is... Figure 1The wallpaper A101 in the interface shown in Figure 'a' is different; for example, the dog in the enlarged wallpaper A302 is larger than the dog in wallpaper A101. This is because: the enlarged wallpaper A302 is a portrait-oriented display of wallpaper A101; the enlarged wallpaper A302 can be obtained by adapting wallpaper A101 to the aspect ratio of the screen in portrait mode. To reduce the blank areas on the top and bottom sides of wallpaper A in portrait mode and to coordinate the proportion of the dog to the background, the dog can be vertically stretched and enlarged, making the dog in the enlarged wallpaper A302 larger than the dog in wallpaper A101.
[0110] Furthermore, since the enlarged wallpaper A302 is adapted based on the aspect ratio of wallpaper A101 to the vertical screen, while wallpaper B102 is adapted based on the aspect ratio of the original wallpaper to the vertical screen; and since wallpaper A101 is different from the original wallpaper, even though the enlarged wallpaper A302 and wallpaper B102 are displayed in the same orientation (vertical screen), the visual effects presented by the enlarged wallpaper A302 and wallpaper B102 are different; for example, the size of the dog in the enlarged wallpaper A302 can be larger than the size of the dog in wallpaper B102.
[0111] This application embodiment only uses vertical objects in the wallpaper as an example to illustrate the adjustment of object sizes in wallpaper A, the enlarged version of wallpaper A, and wallpaper B. When the objects in the wallpaper are horizontal objects, the size relationship of the objects in wallpaper A, the enlarged version of wallpaper A, and wallpaper B can be reversed or other relationships. In this application embodiment, wallpaper A101, the enlarged version of wallpaper A302, and wallpaper B102 present different visual effects, and this application embodiment does not limit the object sizes in each wallpaper.
[0112] As the camera application window screenshot (303) continues to zoom out, multiple application icons and / or service cards may gradually appear on the desktop; the camera application icon may not be present on the desktop. For example, in Figure 3 In the interface shown in b, the position of the dashed box 304 corresponds to the position of the camera application icon on the desktop. The electronic device does not display the camera application icon.
[0113] The camera application window screenshot 303 can be continuously zoomed out until it reaches a preset size; the electronic device switches the camera application window screenshot 303 to the camera application icon 305, such as... Figure 3 The interface shown in c is shown in the image.
[0114] Taking the camera app icon 305 located in the dock area as an example, in Figure 3In the interface shown in c, the position of the camera application icon 305 can be higher than the positions of other application icons in the dock; thus, it reflects the transition effect of bringing the application window back to its original icon position, maintaining the continuity of the animation, and prompting the user that the application currently switched back to the background is the camera application.
[0115] Understandably, in Figure 3 In the interface shown in 'c', the electronic device has moved the application to the background, and the status bar orientation needs to be updated to the new application orientation (e.g., desktop orientation). The electronic device can then switch the status bar from landscape to portrait mode. Before switching the status bar orientation, the electronic device can hide the status bar; for example, in... Figure 3 In the interface shown in 'c', the electronic device does not display a status bar.
[0116] After switching to the camera app icon 305, the electronic device can display the camera app icon 305 gradually moving down until it is the same height as other application icons in the dock, such as... Figure 3 The interface shown in d is as follows. At this time, the screen orientation is portrait, the desktop orientation is portrait, and the wallpaper on the desktop is a magnified landscape-adapted wallpaper, such as magnified wallpaper A.
[0117] To maintain consistency across multiple user interface elements and enhance the user's visual experience, electronic devices can switch from landscape to portrait mode. For example, an electronic device might switch from a magnified wallpaper A302 to wallpaper B102. During this wallpaper switching process, because the magnified wallpaper A302 and wallpaper B102 are different, the electronic device needs to reload and redraw the wallpaper. This loading and redrawing process requires a certain response time, so the user may see a flickering effect during the wallpaper switching. For example, during the wallpaper loading and redrawing process, the electronic device might display something like... Figure 3 The brief screen flash scene shown in the 'e' section.
[0118] After the wallpaper change is complete, the electronic device can display something like this: Figure 3 The interface shown in f is shown in the image. Figure 3 In the interface shown as f, the electronic device can display wallpaper B 102, a portrait desktop, and a portrait status bar 306. The wallpaper type, desktop orientation, and status bar orientation all correspond to the screen orientation. For example, the wallpaper type is portrait-adapted, the desktop orientation is portrait, the status bar orientation is portrait, and the screen orientation is portrait.
[0119] Specifically, when the screen orientation is portrait, of the two second sides of the electronic device, the top second side is away from the direction of gravity, while the bottom second side is closer to the direction of gravity. The y-value of the top second side is greater than that of the bottom second side. In portrait-adapted wallpapers, the top of an object (e.g., a dog's head) is closer to the top second side of the electronic device, while the bottom of an object (e.g., a dog's paw) is closer to the bottom second side. In a portrait desktop, the dock is closer to the bottom second side of the electronic device, and the y-value of the application icons at the top of the desktop is greater than that of the application icons at the bottom of the desktop. In a portrait status bar, status bar 306 is closer to the top second side of the electronic device.
[0120] It should be noted that this application embodiment uses a screen orientation of portrait and an application orientation of landscape as an example to illustrate a possible scenario where an electronic device returns to the desktop. When the screen orientation is landscape and the application orientation is portrait, the electronic device may also experience screen flickering during wallpaper switching. This application embodiment will not elaborate on this aspect.
[0121] During the above process, because the electronic device explicitly displays the process of switching from the magnified wallpaper A to wallpaper B, users can see a screen flickering scene during the wallpaper switch, which affects the user experience.
[0122] In view of this, embodiments of this application provide a desktop display method. When returning to the desktop and the screen orientation and application orientation are different (e.g., the screen orientation is portrait and the application orientation is landscape), the electronic device can first align the portrait / landscape state of multiple user interface elements with the application orientation of the exiting application to complete the application exit animation. For example, during the playback of the application exit animation, the screen orientation is portrait, and the application orientation, desktop orientation, and status bar orientation are all landscape, with the wallpaper type being landscape wallpaper A. After the application exit animation finishes playing, the electronic device can display a rotation animation, causing multiple landscape user interface elements to gradually switch to portrait orientation with the rotation animation. Between the completion of the application exit animation and the start of the rotation animation, the electronic device can display full-screen screenshots of multiple landscape user interface elements on top. In other words, when an electronic device returns to the home screen, it can sequentially display an application exit animation, a full-screen screenshot, and a rotation animation. The wallpaper switching process occurs during the full-screen screenshot, with the wallpaper positioned below it. The full-screen screenshot completely obscures the wallpaper, so while the full-screen screenshot is displayed, the user can see the top-mounted screenshot but cannot see the wallpaper switching process. Thus, in the scenario of returning to the home screen, the top-mounted full-screen screenshot can obscure the wallpaper, preventing the user from seeing the wallpaper switching process and reducing screen flickering. Simultaneously, the electronic device can play multiple animations, making the transition between applications going to the background and user interface elements switching between portrait and landscape modes smoother and more natural, improving the user experience.
[0123] The following is combined Figure 4 and Figure 5 This application describes a scenario where the application orientation differs from the screen orientation, as provided in its embodiments. Figure 4 This illustration shows an interface diagram of an application exit animation when the application orientation is different from the screen orientation, according to an embodiment of this application. Figure 5 This illustration shows a schematic diagram of an interface with a rotation animation effect when the application orientation is different from the screen orientation, as provided in an embodiment of this application.
[0124] See first Figure 4 The application exit animation shown is an example:
[0125] The application orientation differs from the screen orientation. This can be either: the electronic device's screen is in portrait orientation, while the running application is in landscape orientation; or, the electronic device's screen is in landscape orientation, while the running application is in portrait orientation.
[0126] It should be noted that the application running in this embodiment can be either a forced landscape or forced portrait application, and the application orientation is not affected by the screen orientation. For example, the application may be one that only supports one orientation; or it may be one that supports two orientations, but only supports one orientation when the automatic screen rotation function is not enabled. This embodiment does not impose any limitations on this.
[0127] Taking a screen orientation of portrait and an application orientation of landscape as an example, the currently running application can be the first application that is forced to be in landscape mode, such as the camera application.
[0128] When the screen orientation is portrait, the electronic device can display a full-screen window 301 of the camera application (which may correspond to the window of the first application), such as... Figure 4 The interface shown in 'a' (which may correspond to the first interface) can include a preview area and multiple controls for shooting in the full-screen window 301 of the camera application.
[0129] Understandably, in Figure 4 In the interface shown as 'a', the screen orientation is portrait, and the application orientation is landscape. The status bar orientation matches the application orientation; for example, in... Figure 4 In the interface shown in Figure a, when a trigger operation is received from swiping from the right side of the screen to the left, the electronic device can display a status bar at the right edge, and the status bar can be in landscape mode (not shown in the figure).
[0130] exist Figure 4In the interface shown in Figure a, when a trigger operation to return to the desktop is received, the electronic device can display the desktop and the application exit animation of the camera application, and the electronic device cancels the display of the full-screen window 301 of the camera application.
[0131] When the screen orientation is portrait and the camera app is landscape, the procedure for returning to the home screen can be found in the following example. Figure 3 The relevant descriptions in the document will not be repeated here.
[0132] The process of exiting an application's camera app on an electronic device can be as follows: Figure 4 The interface shown in 'a' is... Figure 4 The interface shown in d is an example:
[0133] exist Figure 4 The interface shown in Figure 'a' receives a trigger to return to the desktop.
[0134] In response to a return to the desktop, the electronic device displays wallpaper A101, a landscape desktop, a gradually shrinking camera application window screenshot 401, and a status bar 402. The camera application window screenshot 401 can be positioned above the desktop; the desktop can be positioned above wallpaper A101. The initial size of the camera application window screenshot 401 is the same as the full-screen window 301 of the camera application.
[0135] The wallpaper type, desktop orientation, and status bar orientation all correspond to the orientation of the first application that is being moved to the background. For example, if the camera application is in landscape orientation, then the wallpaper on the desktop will be a landscape-adapted wallpaper, such as wallpaper A101, with the desktop orientation in landscape and the status bar orientation in landscape.
[0136] Understandable, Figure 4 Wallpaper A101 in the interface shown in b) Figure 1 The wallpaper A101 in the interface shown in Figure 'a' is the same. Figure 4 Wallpaper A101 in the interface shown in b) Figure 3 The enlarged wallpaper A 302 shown in the a section is different from the one shown in the image. The enlarged wallpaper A 302 is the one displayed in portrait mode.
[0137] As the camera application window screenshot 401 continues to zoom out, multiple application icons and / or multiple service cards may gradually appear on the desktop; however, the camera application icon is not included on the desktop. For example, in Figure 4 In the interface shown in b, the position of the dashed box 403 corresponds to the position of the camera application icon on the desktop; at this time, the electronic device does not display the camera application icon.
[0138] It should be understood that, taking the camera app icon 404 located in the dock area as an example, in Figure 4 During the application exit animation shown, the desktop orientation remains landscape. In landscape mode, the dock can be located on the first side, for example, the dock can be located to the left of the camera application window screenshot 401. The camera application window screenshot 401 can gradually move to the left during the shrinking process.
[0139] The camera application window screenshot 401 can be continuously zoomed out until it reaches a preset size; the electronic device will switch the camera application window screenshot 401 to the camera application icon 404, such as... Figure 4 The interface shown in c is shown in the image.
[0140] exist Figure 4 In the interface shown in c, the camera application icon 404 can be located to the right of other application icons in the dock; thus demonstrating the transition effect of returning the application window to its original icon position, maintaining the continuity of the animation, and prompting the user that the application currently switched back to the background is the camera application.
[0141] After switching to the camera app icon 404, the electronic device can display the camera app icon 404 gradually moving to the left until the distance between the camera app icon 404 and the first edge is the same as the distance between the camera app icon 404 and the first edge of the dock bar. Figure 4 The interface shown in d is shown in the image.
[0142] It is understood that this application embodiment uses the camera application located in the dock as an example to illustrate the application exit animation of the camera application. In actual scenarios, the camera application may also be located in the main interface, and this application embodiment does not impose any restrictions on this.
[0143] It should be noted that, in Figure 4 The interface shown in 'a' is... Figure 4 In the interface shown by d, the screen orientation is portrait, the desktop orientation is landscape, the wallpaper type is landscape-adapted, such as wallpaper A 101, and the status bar orientation is landscape. Figure 4 The application exit animation shown can be a landscape application exit animation, which is similar to the application exit animation when the screen orientation is landscape and the application orientation is landscape.
[0144] It should be noted that this application embodiment uses a screen orientation of portrait and an application orientation of landscape as an example to illustrate the scenario of returning to the desktop when the screen orientation and application orientation are different. In practical applications, the screen orientation can also be landscape, and the application orientation can be portrait, and the electronic device can display a portrait application exit animation; this application embodiment will not describe this scenario in detail.
[0145] At this point, the electronic device can play the complete application exit animation in landscape orientation. In the landscape application exit animation, the landscape and portrait orientations of multiple user interface elements are consistent with the application orientation, ensuring that the user interface elements adjust synchronously with the application orientation. This makes the animation process smoother and prevents display errors due to inconsistent orientations. At the same time, in the landscape application exit animation, the wallpaper type corresponds to the wallpaper's display orientation; for example, displaying wallpaper A in landscape or wallpaper B in portrait orientation. This avoids the phenomenon of wallpaper objects being enlarged or shrunk due to inconsistencies between the wallpaper type and the wallpaper's display orientation, improving the aesthetics of the wallpaper.
[0146] Understandably, in Figure 4 In the interface shown as d, multiple user interface elements are in landscape orientation, while the screen orientation is portrait. The electronic device also needs to switch multiple user interface elements to portrait orientation to maintain consistency between the landscape and portrait states of the multiple user interface elements and the screen orientation. In this embodiment, after the application exit animation finishes playing, the electronic device can display a full-screen screenshot and a rotation animation. The full-screen screenshot can be a screenshot of the landscape desktop, the landscape-adapted wallpaper, and the landscape-oriented status bar. The rotation animation can be an animation that rotates the landscape user interface elements to the portrait user interface elements.
[0147] Figure 5 This application provides an embodiment of an interface diagram illustrating full-screen screenshots and rotation animation effects. Figure 5 As shown:
[0148] After the landscape-oriented application exit animation finishes playing, the electronic device can display something like this: Figure 4 The interface shown in d; Figure 4 The interface shown in d includes a landscape desktop and wallpaper A101.
[0149] Before the desktop transition animation begins, after the application exit animation in landscape mode has finished playing, the electronic device can display a full-screen screenshot of the landscape desktop, wallpaper A, and landscape status bar. The full-screen screenshot can be placed on top so that the electronic device is not visible to the user during the process of redrawing the desktop and changing the wallpaper.
[0150] For example, electronic devices can display a full-screen screenshot (501), such as... Figure 5 The interface shown in 'a' (which may correspond to the second interface) is shown in the image. It should be understood that a full-screen screenshot (501) can be used for... Figure 4 The screenshot is shown in d. A full-screen screenshot 501 can be positioned above the desktop, and a full-screen screenshot 501 can be positioned above the wallpaper, so that the electronic device does not display the desktop and wallpaper.
[0151] It should be noted that although the full-screen screenshot 501 includes the landscape desktop, wallpaper A, and multiple application icons, the desktop layer and wallpaper A layer are both located below the full-screen screenshot 501. At this time, the user can see the full-screen screenshot 501, but cannot operate on the application icons in the full-screen screenshot 501.
[0152] During the creation of portrait-oriented desktops and wallpapers, the electronic device can display a full-screen screenshot 501. The electronic device then completes the desktop rearrangement and wallpaper switching beneath this full-screen screenshot 501; that is... Figure 3 The splash screen scene shown in 'e' occurs during the display of full-screen screenshot 501. Since full-screen screenshot 501 is placed on top, the splash screen process caused by wallpaper switching is not visible to the user.
[0153] After the electronic device has finished drawing the portrait-oriented desktop and portrait-adapted wallpaper, the electronic device can begin playing rotation animations, such as... Figure 5 The interface shown in b is to Figure 5 The interface shown in d is shown in the image.
[0154] In some embodiments, the electronic device can merge and rotate a full-screen screenshot 501, a portrait desktop, and a portrait-adapted wallpaper to make the rotation process more natural.
[0155] For example, in Figure 5 In the interface shown in b, the electronic device can display a full-screen screenshot 501, wallpaper B 102, and a portrait desktop that rotates in the same direction with the same angular velocity.
[0156] During rotation, the transparency of the full-screen screenshot 501 can be gradually reduced; for example, in... Figure 5 In the interface shown in 'a', the transparency value of the full-screen screenshot 501 is 1; Figure 5 In the interface shown in b, the transparency value of the full-screen screenshot 501 is less than 1. As the full-screen screenshot 501 gradually becomes transparent, the electronic device gradually displays the portrait desktop and wallpaper B 102 beneath the full-screen screenshot 501, thus presenting a transition effect of gradually switching from landscape user interface elements to portrait user interface elements during rotation.
[0157] It should be noted that, Figure 5 In the interface shown by b, the wallpaper is a portrait-oriented wallpaper, such as wallpaper B102; the desktop layout can be a layout suitable for portrait mode, such as... Figure 1 The arrangement of application icons and / or service cards in the interface shown in b is as follows. Figure 5In the interface shown in Figure a, the full-screen screenshot 501 can include images of wallpaper A 101 and the landscape desktop. That is, when the rotation animation starts playing, the electronic device has already loaded and drawn wallpaper B 102 and the portrait desktop on the screen.
[0158] As the full-screen screenshot 501, wallpaper B 102, and portrait desktop continue to rotate, the transparency of screenshot 501 can be reduced to transparent. For example, in Figure 5 In the interface shown in c, the electronic device can cancel the display of the full-screen screenshot 501 and display the portrait desktop and wallpaper B 102; the portrait desktop and wallpaper B 102 can continue to rotate in the rotation direction.
[0159] When rotated to a preset angle (e.g., 90°), the desktop and wallpaper B 102 can be displayed in portrait mode; after the rotation animation finishes playing, the electronic device can display as shown... Figure 5 The interface shown in d is shown in the image.
[0160] At this point, the electronic device has completed playing the rotation animation; the rotation animation can smoothly switch the landscape desktop and landscape-adapted wallpaper to the portrait desktop and portrait-adapted wallpaper; when the user holds the electronic device in portrait orientation, the user can use the portrait desktop and portrait-adapted wallpaper; maintaining consistency among multiple user interface elements.
[0161] It should be noted that this application embodiment uses the example of a screenshot rotating synchronously with the portrait-oriented desktop and wallpaper B during rotation, and the screenshot performing a fade-out animation effect, to illustrate the rotation animation effect. This application embodiment does not limit the specific implementation of the rotation animation effect. For example, when playing the rotation animation effect, the desktop and wallpaper can rotate at a constant speed or at a variable speed; the rotation direction of the desktop and wallpaper can be counterclockwise or clockwise; this application embodiment does not impose any restrictions.
[0162] In this way, in scenarios where the screen orientation is different from the application orientation and the user is returning to the desktop, the electronic device can smoothly present the process of moving the application to the background and returning to the desktop through application exit animations, full-screen screenshots, and rotation animations. During this process, the wallpaper switching process is not displayed, and there is no screen flickering; thus improving the user experience.
[0163] The above embodiments combined Figure 1 , Figure 2 , Figure 4 and Figure 5 The scenario of returning to the desktop in the embodiments of this application will be described, and in conjunction with Figure 3 The following section explains possible scenarios for returning to the desktop in various implementations. Figures 6-10 The process of desktop display methods corresponding to each scenario is described.
[0164] Figure 6 This illustrates a scenario in this application where the screen orientation and application orientation are the same, and the electronic device returns to the desktop (which can correspond to...). Figure 2 In the scenario shown, a schematic diagram illustrating the interaction flow of each software module of the electronic device is as follows: Figure 6 As shown:
[0165] It should be noted that the software modules of an electronic device may include a task module, a display content module, a display rotation module, and a transition controller module. The task module manages the switching between foreground and background operations of the application, as well as the activity rebuilding and layout adjustments caused by changes in screen orientation or configuration (such as screen rotation). The display content module manages windows on the electronic device and their associated layout and animation operations. The display rotation module manages and handles changes in the device's screen orientation. The transition controller module manages and executes animations.
[0166] Specifically, in response to the triggering operation of returning to the desktop, the task module switches the second application to the background.
[0167] The second application can correspond to Figure 2 The e-book application shown; the trigger action to return to the desktop can be found in the following example. Figure 2 The relevant descriptions in the illustrated embodiments will not be repeated here.
[0168] Upon receiving a trigger to return to the desktop, the task module can call the `moveTasktoBack()` method to switch the application's task to run in the background. The screen orientation can be portrait, and the second application's orientation can also be portrait.
[0169] S602, The task module indicates that the display management module obtains the screen orientation.
[0170] After a foreground application is moved to the background, the electronic device can obtain the next application that is launching, such as a desktop application. The electronic device can also obtain the screen orientation supported by the desktop application; for example, the desktop application can support portrait mode when the screen orientation is portrait, and landscape mode when the screen orientation is landscape. The display management module can adjust the orientation of the launching application according to the screen orientation.
[0171] Specifically, the display management module can call the `updateOrientation()` method to check for orientation changes. For example, the display management module can query the desktop orientation by the package name (e.g., launcher) of the currently running application (e.g., the desktop). In this case, the desktop orientation follows the application orientation of the previous application; for example, if the second application's application orientation is portrait, the desktop orientation will also be portrait. The display management module can also obtain the screen orientation from the display rotation module; subsequently, the desktop orientation and screen orientation can be compared. When the desktop orientation and screen orientation are the same, no processing is required; when the desktop orientation and screen orientation are different, the desktop orientation is set to the screen orientation.
[0172] The process by which the display management module obtains the screen orientation is shown in step S603.
[0173] S603, The display management module instructs the display rotation module to calculate the screen orientation; the screen orientation is portrait orientation.
[0174] The display rotation module can be used to receive inertial measurement unit (IMU) data reported by sensors such as accelerometers and / or gyroscopes, and calculate the current screen orientation of the electronic device. The calculation process for the screen orientation is not detailed in this embodiment. The display rotation module can calculate the screen rotation angle using the `rotationForOrientation()` method to obtain the current screen orientation. For example, the screen orientation calculated by the display rotation module is the portrait orientation.
[0175] S604. When the screen orientation and the application orientation are the same, the motion control module creates a second motion effect in the portrait orientation.
[0176] The second animation effect is the application exit animation of the second application; the second animation effect can be the animation effect transitioning from the full-screen window of the second application to the icon of the second application; the second animation effect in portrait mode can be understood as the second animation effect presented on the top layer of the portrait desktop. For example, the second animation effect in portrait mode... Figure 2 The interface shown in 'a' is... Figure 2 The interface shown in d is as follows: The desktop orientation is portrait mode, the wallpaper on the desktop is the second wallpaper, and the wallpaper type of the second wallpaper is portrait-adapted. For example, the second wallpaper could be wallpaper B.
[0177] The motion control module can call the `Transition createAndstartCollecting(int type)` method to create a second motion effect. The motion effect type (`type`) of the second motion effect can be either a "to back" type or a "to close" type. The "to back" type can be used to indicate the creation of an motion effect that switches the application to run in the background; the "to close" type can be used to indicate the creation of an motion effect that closes the application.
[0178] After creating the second animation effect, the animation control module can collect the window parameters of the second application (such as the window parameters of the e-book application), such as: the size of the full-screen window 201 of the e-book application, the initial size, end size and scaling ratio of the e-book application window screenshot 202, and the position of the e-book application icon 204, etc.
[0179] S605, the motion effect control module plays the second motion effect in the vertical screen direction.
[0180] In the second animation effect in portrait orientation, the screen orientation is portrait, the desktop orientation is portrait, the wallpaper on the desktop is the second wallpaper, and the type of the second wallpaper is portrait-adapted. When playing the second animation effect in portrait orientation, the electronic device can display as follows: Figure 2 The interface shown in 'a' is... Figure 2 The interface shown in d is shown in the image.
[0181] In some embodiments, when displaying a full-screen window of a second application, the electronic device can draw the desktop and wallpaper beneath the full-screen window of the second application, with the desktop orientation, wallpaper type, and application orientation all corresponding to the screen orientation; for example, the desktop orientation is portrait orientation, the wallpaper on the desktop is a portrait-adapted second wallpaper, the application orientation is portrait orientation, and the screen orientation is portrait orientation. When the screen orientation and desktop orientation are the same, the electronic device determines that the desktop orientation has not changed; the electronic device does not need to redraw the desktop and wallpaper.
[0182] For example, during the exit animation of the second application, the e-book application window screenshot 202 gradually shrinks; the electronic device can display the vertical desktop and wallpaper B 102 below the e-book application window screenshot 202.
[0183] In this way, electronic devices can provide a smooth visual transition back to the desktop through a second animation effect in portrait orientation; at the same time, the desktop orientation and wallpaper correspond to the screen orientation, enhancing visual consistency.
[0184] Figure 7 This illustrates a possible implementation where the electronic device returns to the desktop when the screen orientation and application orientation are different (which could correspond to...). Figure 3 In the scenario shown, a schematic diagram illustrating the interaction flow of each software module of the electronic device is as follows: Figure 7 As shown:
[0185] S701, In response to the trigger operation of returning to the desktop, the task module switches the first application to the background.
[0186] The first application can correspond to Figure 3 The camera application shown; the trigger action to return to the desktop can be found in [reference]. Figure 3 The relevant descriptions in the illustrated embodiments will not be repeated here.
[0187] Upon receiving a trigger to return to the desktop, the task module can call the `moveTasktoBack()` method to switch the application's task to run in the background. The screen orientation can be portrait, and the primary application's orientation can be landscape.
[0188] S702, the task module indicates that the display management module obtains the screen orientation.
[0189] S703, The display management module instructs the display rotation module to calculate the screen orientation; the screen orientation is portrait orientation.
[0190] Steps S702 and S703 can be referred to the relevant descriptions in steps S602 and S603, and will not be repeated here.
[0191] S704. When the screen orientation and the application orientation are different, the display management module sets the desktop orientation to the screen orientation.
[0192] When launching a desktop application, if the screen orientation differs from the application orientation, the electronic device can determine that the screen has rotated; the electronic device can set the desktop orientation to the screen orientation to maintain visual consistency with the screen orientation.
[0193] When the screen orientation differs from the application orientation, the electronic device can trigger a fixed-rotation launching app process. This process instructs the application to be locked to a specific orientation (e.g., consistent with the screen orientation) when it launches (e.g., a desktop application). For example, if the screen orientation is portrait, the display management module will update the desktop to a portrait orientation, which can be referenced... Figure 1 The layout of the various application icons or service cards in the interface shown in b.
[0194] Furthermore, after triggering the fixed-direction application launch process, the electronic device can first process the procedures related to the application going to the background, such as setting the application exit animation; then process the procedures related to returning to the desktop, such as the process of switching between landscape and portrait orientations for multiple user interface elements other than the desktop. The electronic device can delay the process of switching between landscape and portrait orientations for multiple user interface elements other than the desktop. At this time, user interface elements such as wallpaper and status bar remain aligned with the application orientation of the first application; where the application orientation of the first application (e.g., the camera application) is landscape, the wallpaper on the desktop is the first wallpaper, the wallpaper type of the first wallpaper is landscape-adapted, and the first wallpaper is, for example, wallpaper A; the status bar orientation is landscape.
[0195] The process of setting the application exit animation can be done as follows: steps S705 and S706. The process of switching between portrait and landscape modes for other user interface elements can be done as follows: steps S707-S713.
[0196] It is understandable that when the screen orientation is the same as the application orientation, the electronic device can perform steps such as S604 and S605, which will not be described in detail here.
[0197] S705, the motion effect control module creates the first motion effect in the vertical screen direction.
[0198] The first animation effect is the application exit animation of the first application; the first animation effect can be the animation effect that transitions from the full-screen window of the first application to the icon of the first application; the first animation effect in portrait mode can be understood as the first animation effect displayed on the top layer of the portrait desktop. The first animation effect in portrait mode can be, for example... Figure 3 The interface shown in 'a' is... Figure 3 The animation shown in d is as follows: as the camera application window screenshot 303 gradually shrinks, the camera application window screenshot 303 gradually moves downward; after the camera application icon 305 is displayed, the camera application icon 305 gradually moves downward until the distance between the camera application icon 305 and the second side is the same as the distance between the other icons in the dock and the second side.
[0199] The motion control module can call the Transition createAndstartCollecting(int type) method to create the first motion effect. The motion effect type of the first motion effect can be either the return to background type or the close type.
[0200] After creating the first animation effect, the animation control module can collect the window parameters of the first application (such as the window parameters of the camera application), such as: the size of the full-screen window 301 of the camera application, the initial size, end size and scaling ratio of the camera application window screenshot 303, and the position of the camera application icon 305, etc.; the position of the camera application icon 305 is related to the position of the first application on the portrait desktop.
[0201] S706, the motion effect control module plays the first motion effect in the vertical screen direction.
[0202] When the first animation effect in portrait orientation is played, the electronic device can display something like this. Figure 3 The interface shown in 'a' is... Figure 3 The interface shown in d is shown in the image.
[0203] Understandably, prior to step S706, the electronic device had already updated the desktop layout according to the screen orientation, and the electronic device had not switched the wallpaper type or status bar orientation; the desktop was in portrait orientation, the wallpaper was the first wallpaper, the wallpaper type was landscape-adapted, and the status bar orientation was landscape. During the playback of the first animation in portrait orientation, the camera application window screenshot 303 gradually shrank; the electronic device could display the portrait desktop beneath the camera application window screenshot 303, the enlarged wallpaper A302, and the landscape status bar 307, etc. Figure 3 The interface shown in b is shown in the image.
[0204] S707, The display rotation module obtains the screen orientation and generates a rotation event; the rotation event is used to indicate that the orientation of the user interface element is updated to the screen orientation.
[0205] After the application exit animation finishes playing, the rotation module can obtain the screen orientation to determine whether the current wallpaper, desktop orientation, and status bar orientation correspond to the screen orientation. For example, the screen orientation is portrait, the wallpaper is the first wallpaper, the wallpaper type is landscape-adapted, the desktop orientation is portrait, and the status bar orientation is landscape. However, if the wallpaper and screen orientation do not correspond, or the status bar orientation differs from the screen orientation...
[0206] If the orientation of a user interface element is inconsistent with the screen orientation, the display rotation module can notify the display management module to update the landscape / portrait state of the user interface element; and the display rotation module can notify the motion effect control module to create and execute the state switching motion effect of the user interface element.
[0207] It is understood that in step S707, the desktop orientation is the same as the screen orientation; the wallpaper and status bar orientations do not correspond to the screen orientation; the rotation event may include an event for indicating an update of the wallpaper and an event for indicating an update of the status bar orientation.
[0208] S708, Display rotation module indicates motion effect control module creates state switching motion effect.
[0209] Status transition animations could include, for example, switching the second wallpaper to the first wallpaper, or switching the status bar orientation to portrait mode. Figure 3 The interface shown in d is to Figure 3In the interface shown in f, the electronic device displays a state switching animation. The duration of the state switching animation is short, for example, switching from one frame of the interface to another.
[0210] S709, The display rotation module transmits rotation events to the display management module.
[0211] Rotation events can include events indicating wallpaper updates and events indicating status bar orientation updates. The display management module can use rotation events to instruct the corresponding modules to update configuration information. Configuration information can be used to indicate orientation changes of user interface elements.
[0212] For example, the display management module can generate wallpaper configuration information based on an event indicating an update to the wallpaper; the display management module can also generate status bar orientation configuration information based on an event indicating an update to the status bar orientation. Subsequently, the display management module instructs the activity task manager to process the corresponding configuration information, as in step S710.
[0213] S710, The display management module instructs the active task manager to update configuration information; the configuration information may include wallpaper configuration information and status bar orientation configuration information.
[0214] The configuration information obtained by the Activity Task Manager can be global, such as wallpaper and status bar orientation settings. The Activity Task Manager can invoke corresponding modules to process the configuration information of different user interface elements. For example, the Activity Task Manager can instruct the image wallpaper module to update the wallpaper using the wallpaper's configuration information; the Activity Task Manager can instruct the system user interface to update the status bar orientation using the status bar orientation configuration information.
[0215] The wallpaper before updating the configuration information can be the first wallpaper, for example... Figure 3 The enlarged wallpaper A302 shown in b of the interface; the wallpaper's configuration information can be used to instruct the drawing of a second wallpaper to update the first wallpaper to the second. The status bar orientation before updating the configuration information can be landscape, for example... Figure 3 The status bar 307 in the landscape orientation shown in b of the interface; the configuration information of the status bar orientation can be used to indicate the drawing of the status bar in the portrait orientation, so as to update the status bar orientation from the landscape orientation to the portrait orientation.
[0216] It should be noted that the status bar is located at the edge of the electronic device and is relatively transparent; when changing the orientation of the status bar, the electronic device will not experience noticeable screen flickering due to the change in the orientation of the status bar, so the following explanation will only focus on the process of changing the wallpaper.
[0217] The process of switching wallpaper types on an electronic device can be shown in steps S711-S713:
[0218] S711, the Activity Task Manager sends wallpaper type configuration information to the Image Wallpaper Module.
[0219] The Activity Task Manager manages global configuration updates for user interface elements; the Image Wallpaper module handles wallpaper-related processes, and the Activity Task Manager can distribute wallpaper type configuration information to the Image Wallpaper module to instruct it to update the wallpaper type.
[0220] Optionally, the Activity Task Manager can also send configuration information about the status bar orientation to the system user interface to instruct the system user interface to update the status bar orientation (not shown in the figure).
[0221] S712, The image wallpaper module loads the second wallpaper from the image wallpaper assistant and draws the second wallpaper according to the wallpaper configuration information.
[0222] The wallpaper configuration information can be used to identify the second wallpaper, and the image wallpaper module can load the second wallpaper from the image wallpaper assistant; after obtaining the second wallpaper, the image wallpaper module redraws the second wallpaper.
[0223] For example, the image wallpaper module can call the loadWallpaperAndDraw frameInternal() method to load and redraw the second wallpaper; the image wallpaper module can also call the getDoubleWallpaper() method to load dual wallpaper resources from the image wallpaper assistant, such as the first wallpaper and the second wallpaper.
[0224] It should be noted that the image wallpaper assistant may include dual wallpaper resources and / or single wallpaper resources; a single wallpaper resource can be defined as a third wallpaper, which can be understood as the electronic device displaying the same wallpaper regardless of whether the screen orientation is landscape or portrait. It should be understood that for the third wallpaper, the electronic device will not change the wallpaper due to changes in screen orientation, so in a single wallpaper scenario, the electronic device will not experience screen flickering caused by wallpaper switching. Therefore, this application embodiment does not involve the use case of single wallpaper resources. The image wallpaper module can call the getDoubleWallpaper() method to load the second wallpaper from the dual wallpaper resources.
[0225] Understandably, once the second wallpaper is drawn, the electronic device can display it on the screen. The user will see a screen-splitting process as the wallpaper switches from the first to the second. For example... Figure 3 Switching to the interface shown in d Figure 3 The process shown in the f section.
[0226] S713, animation control module for switching playback status animations.
[0227] State transition animations can be used to switch from landscape to portrait mode, such as jumping from one frame to another in portrait mode. Understandably, after creating a state transition animation, the electronic device can configure the animation. For example, the device can load and draw a second wallpaper, such as wallpaper B; before playing the state transition animation, the device already displays wallpaper B and the portrait desktop. In this case, the state transition animation may not include any specific animation effects, and the user may not see the animation.
[0228] As can be seen, between the completion of the application exit animation and the start of the playback state switching animation (e.g., steps S706-S713), the electronic device can load and complete the drawing of the second wallpaper, and display the process of switching from the first wallpaper to the second wallpaper on the screen; the user can see the wallpaper switching, thus causing a screen flickering phenomenon.
[0229] against Figure 7 The screen flickering phenomenon in the illustrated embodiment is addressed by this application embodiment, which provides a desktop display method whereby electronic devices can make the wallpaper switching process invisible to the user through application exit animations in landscape orientation, full-screen screenshots, and rotation animations.
[0230] Figure 8 This illustrates a scenario in this application where the electronic device returns to the desktop when the screen orientation and application orientation are different (which can correspond to...). Figure 4 and Figure 5 The diagram illustrates the interaction flow of various software modules within an electronic device in the scenario shown. Figure 8 As shown:
[0231] S801, In response to the triggering operation of returning to the desktop, the task module switches the application to the background.
[0232] S802, the task module indicates that the display management module obtains the screen orientation.
[0233] S803, the display management module instructs the display rotation module to calculate the screen orientation.
[0234] Steps S801-S803 can be referred to the relevant descriptions in steps S701-S703, and will not be repeated here.
[0235] S804. When the screen orientation and the application orientation are different, and the first preset condition is met, the display rotation module returns to the application orientation from the display management module; the application orientation is landscape orientation.
[0236] The screen orientation calculated by the display rotation module can be portrait or landscape, and the screen orientation and application orientation can be different.
[0237] The first preset condition is used to determine whether the application is in a dual-wallpaper scenario where it has moved to the background and returned to the desktop. For example, the first preset condition includes one or more of the following: a page exists at the top level in a first state; the page is not empty; the page includes a desktop-type window; the page includes a wallpaper window; the wallpaper manager of the wallpaper window is not empty and the wallpaper manager's type is dual-wallpaper; or, the page is during a first animation effect, and the animation effect type of the first animation effect is either a return to the background type or a close type. The first state can be a resume state; the resume state can be used to indicate that the desktop has entered the foreground and begun interacting with the user. The determination process of the first preset condition will be described in detail later in this application embodiment, and will not be elaborated here.
[0238] When the screen orientation differs from the application orientation and the first preset condition is met, the display rotation module can set the screen orientation to the application orientation, such as landscape orientation; the display rotation module can return the landscape orientation as the modified screen orientation to the display management module to prevent the desktop orientation from changing with the screen orientation.
[0239] Alternatively, if the screen orientation is the same as the application orientation, the electronic device may execute steps S604 and S605. Alternatively, if the screen orientation is different from the application orientation and the first preset condition is not met, the display rotation module may return the screen orientation to the display management module.
[0240] When the desktop orientation (which follows the application orientation, e.g., landscape) and the modified screen orientation (actually the application orientation, e.g., landscape) are the same, the display management module does not update the desktop orientation. It should be understood that when the screen orientation and application orientation are the same, the electronic device does not trigger a fixed-orientation application launch process. In this case, the desktop orientation and status bar orientation are landscape, the modified screen orientation is landscape, the calculated screen orientation is portrait, the wallpaper is the primary wallpaper, and the wallpaper type is a landscape-adapted type.
[0241] S805, the motion effect control module creates the first motion effect in the landscape direction.
[0242] The first animation in landscape mode can be understood as the first animation displayed on the top layer of the landscape desktop. For example, the first animation in landscape mode could be... Figure 4 The interface shown in 'a' is... Figure 4 The animation shown in d is as follows: as the camera application window screenshot 401 gradually shrinks, the camera application window screenshot 401 gradually moves to the left; after the camera application icon 404 is displayed, the camera application icon 404 gradually moves to the left until the distance between the camera application icon 404 and the first side is the same as the distance between other icons in the dock and the first side.
[0243] The motion control module can call the Transition createAndstartCollecting(int type) method to create the first motion effect. The motion effect type of the first motion effect can be either the return to background type or the close type.
[0244] After creating the first animation effect, the animation control module can collect the window parameters of the first application (such as the window parameters of the camera application), such as: the size of the full-screen window 301 of the camera application, the initial size, end size and scaling ratio of the camera application window screenshot 401, and the position of the camera application icon 404, etc.; the position of the camera application icon 404 is related to the position of the first application in the landscape desktop.
[0245] S806, the motion effect control module plays the first motion effect in the landscape direction.
[0246] When the first animation is played, the electronic device can display something like this. Figure 4 The interface shown in 'a' is... Figure 4 The interface shown in d is shown in the image.
[0247] Understandably, prior to step S805, the modified screen orientation is the same as the application orientation, and the electronic device does not update the desktop orientation, wallpaper, or status bar orientation; the desktop is in landscape orientation, the wallpaper is the first wallpaper, the wallpaper type is landscape-adapted, and the status bar orientation is landscape orientation. When displaying the full-screen window of the first application, the electronic device can continue to display the landscape desktop, the first wallpaper, and the landscape-oriented status bar, etc., below the full-screen window of the first application.
[0248] During the initial animation in landscape mode, the camera application window screenshot 401 gradually shrinks; the electronic device can display the landscape desktop, landscape wallpaper A101, and landscape status bar 402, etc., beneath the camera application window screenshot 401. Figure 4 The interface shown in b is shown in the image.
[0249] Thus, compared to the first animation effect in portrait orientation, in this embodiment, the first application is a landscape orientation application, and user interface elements such as the desktop, wallpaper, and status bar all correspond to the landscape orientation; this maintains visual consistency and reduces the visual jumpiness of user interface elements in the application exit animation effect; at the same time, it avoids situations where wallpaper objects are too large or too small due to inconsistencies between wallpaper type and wallpaper display orientation, such as the electronic device not displaying the wallpaper. Figure 3 The enlarged version of wallpaper A302.
[0250] S807. When the second preset condition is met, the display rotation module obtains the screen orientation and generates a rotation event.
[0251] The second preset condition is used to determine whether the application is in a dual-wallpaper scenario where it has been moved to the background, returned to the desktop, and the first animation has finished playing. The second preset condition includes one or more of the following: a page in the first state exists at the top layer, the page is not empty, the page includes a desktop-type window, the lower layer of the page includes a wallpaper window, the wallpaper manager of the wallpaper window is not empty and the type of the wallpaper manager is dual-wallpaper type, or the animation type of the first animation is a return to the background type or a close type. The determination process of the second preset condition will be described in detail in the following embodiments of this application, and will not be elaborated here.
[0252] Rotation events can include events for indicating wallpaper updates, events for indicating status bar orientation updates, and events for updating desktop orientation.
[0253] It is understandable that in step S804, the application orientation is different from the calculated screen orientation, but the display rotation module modifies the screen orientation, setting it to the application orientation, for example, setting the screen orientation to landscape mode. Since the modified screen orientation matches the application orientation, the electronic device can avoid triggering the fixed-orientation application launch process. Subsequently, the electronic device will default to the desktop orientation, wallpaper, and status bar orientation all corresponding to the screen orientation, thus avoiding subsequent operations to switch the desktop, wallpaper, and status bar. For example, in... Figure 6 In the illustrated embodiment, the screen orientation is consistent with the application orientation, and the electronic device does not perform a second process to obtain the screen orientation. In this case, when holding the electronic device vertically, the user can continuously see... Figure 4 As shown in d, this scenario affects user operation. Therefore, in this embodiment, after changing the screen orientation, the electronic device adds step S807 to correct the modified screen orientation.
[0254] In some embodiments, after the screen orientation is calculated in S803, the display rotation module can cache the screen orientation. In step S807, the display rotation module can directly obtain the calculated screen orientation; thereby reducing the process of recalculating the screen orientation and improving computational efficiency.
[0255] In other embodiments, the display rotation module may also recalculate the screen orientation using, for example, step S803, to improve the accuracy of the screen orientation. The calculation process is described in the relevant description of step S803, and will not be repeated here.
[0256] Understandably, after correcting the screen orientation, the display rotation module can determine that the desktop, wallpaper, and status bar orientations do not correspond to the screen orientation. The display rotation module can generate rotation events to instruct the rearrangement of user interface elements such as the desktop, wallpaper, and status bar; the display rotation module can also instruct the creation of rotation animations to smoothly display the switching process of user interface elements.
[0257] S808, Display rotation module indicates that the motion effect control module creates rotation motion effects.
[0258] Rotation animations can be used to rotate user interface elements from landscape to portrait orientation; for example, rotation animations can be used to switch from a landscape to a portrait desktop, from the first wallpaper to the second wallpaper, and the animation of a full-screen screenshot gradually disappearing; such as... Figure 5 The interface shown in 'a' transitions to Figure 5 The animation shown in d is an example of motion effects.
[0259] The motion control module can create motion transition objects, and the motion transition type of the motion transition object can be a combined motion transition; for example, in Figure 5 In the interface shown in b, the rotation animation includes the fade-out animation of screenshot 501, the fade-in animation of wallpaper B102 and the portrait desktop, and the rotation animation of screenshot 501, wallpaper B102 and the portrait desktop. The rotation animation may also include other types of animation, such as scaling animation, sliding animation, etc., which are not limited in this embodiment.
[0260] After creating a rotation animation, the animation can enter an animation collection state. During the collection process, the electronic device can collect user interface elements that participate in the rotation animation, such as the desktop, wallpaper, and status bar.
[0261] This application embodiment can display a full-screen screenshot at the top between the creation of the rotation animation and the start of playback of the rotation animation, so that the user cannot see the wallpaper switching process. For example, step S809:
[0262] S809, the screenshot module obtains a full-screen screenshot and instructs the user to display the full-screen screenshot; the full-screen screenshot is located on top of the desktop and wallpaper.
[0263] A full-screen screenshot can be taken as a screenshot of the full-screen interface after the first animation in landscape mode has finished playing, such as... Figure 5 Screenshot 501 of the interface shown in 'a'. The desktop orientation is landscape, the wallpaper is the first wallpaper, the wallpaper type is landscape-adapted, and the first wallpaper is displayed in landscape orientation. The status bar orientation is also landscape, etc.
[0264] After obtaining a full-screen screenshot, the electronic device can display the full-screen screenshot on top. The electronic device can then perform desktop rearrangement, status bar orientation switching, and wallpaper changes below the full-screen screenshot, without the user being able to see these transitions.
[0265] It should be noted that in this embodiment, the electronic device may execute step S809 first and then step S808. The wallpaper switching process still occurs during the full-screen screenshot display, thus achieving the purpose of using the full-screen screenshot to cover up the screen flickering phenomenon. This embodiment does not restrict the order in which the rotation animation is created and the full-screen screenshot is displayed on top.
[0266] During the process of displaying a full-screen screenshot, the electronic device may execute steps S810-S816.
[0267] S810, the display rotation module transmits rotation events to the display management module.
[0268] Rotation events can include events for indicating wallpaper updates, events for indicating status bar orientation updates, and events for updating desktop orientation.
[0269] The process can be referred to in the relevant description in step S709, and will not be repeated here.
[0270] S811, Display Management Module instructs Active Task Manager to update configuration information.
[0271] The display management module can generate wallpaper configuration information based on events that indicate wallpaper updates; the display management module can generate status bar orientation configuration information based on events that indicate status bar orientation updates; and the display management module can generate desktop orientation configuration information based on events that indicate desktop orientation updates.
[0272] The wallpaper before the configuration information was updated is the first wallpaper, for example... Figure 4 The wallpaper A101 in the interface shown by d; the wallpaper's configuration information can be used to instruct the drawing of a second wallpaper to update the first wallpaper to the second wallpaper. The status bar orientation before updating the configuration information can be landscape, for example... Figure 4 The status bar shown in 'd' is in landscape mode. The status bar orientation configuration information can be used to indicate the orientation of the status bar in portrait mode, thus updating the status bar orientation from landscape to portrait. The desktop orientation before updating the configuration information can be landscape, for example... Figure 4 The desktop shown in d is a landscape orientation; the desktop orientation configuration information can be used to indicate the drawing of a portrait orientation desktop, so as to update the desktop orientation from landscape to portrait.
[0273] The Activity Task Manager manages global configuration updates for user interface elements.
[0274] The image wallpaper module can be used to handle wallpaper-related processes. The activity task manager can distribute wallpaper configuration information to the image wallpaper module to instruct the image wallpaper module to update the wallpaper; as in step S812.
[0275] Desktop applications can be used to handle desktop-related processes. The Active Task Manager can distribute desktop orientation configuration information to desktop applications to instruct them to update the desktop orientation; as in step S814.
[0276] Optionally, the Activity Task Manager can also send configuration information about the status bar orientation to the system user interface to instruct the system user interface to update the status bar orientation (not shown in the figure).
[0277] The process of updating the wallpaper may include steps S812 and S813, as follows:
[0278] S812, the Activity Task Manager sends wallpaper configuration information to the Image Wallpaper Module.
[0279] The wallpaper configuration information is used to identify the second wallpaper.
[0280] S813, the image wallpaper module loads the second wallpaper from the image wallpaper assistant according to the wallpaper configuration information and draws the second wallpaper; the second wallpaper is located below the full-screen screenshot.
[0281] The process of loading and drawing the second wallpaper using the image wallpaper module can be found in the relevant description in step S712, and will not be repeated here.
[0282] It should be noted that after the second wallpaper is drawn, the electronic device may display the process of switching from the first wallpaper to the second wallpaper, resulting in screen flickering. However, step S813 occurs during the full-screen screenshot display, and the electronic device completes the switching process from the first wallpaper to the second wallpaper below the full-screen screenshot. The user is unaware of the wallpaper switching process and therefore will not see the screen flickering.
[0283] The process of updating the desktop orientation may include steps S814 and S815, as follows:
[0284] S814, the Activity Task Manager sends desktop orientation configuration information to desktop applications.
[0285] The desktop orientation configuration information is used to identify whether the desktop orientation is portrait.
[0286] S815, Desktop application draws portrait desktop; portrait desktop is located below the full-screen screenshot and above the second wallpaper.
[0287] Portrait desktop can be, for example Figure 1 The interface shown in b is an example. It's understandable that updating the desktop orientation from landscape to portrait can cause a visual jump. In this embodiment, the desktop orientation update also occurs during the full-screen screenshot being displayed on top, so the user is unaware of the change in desktop orientation.
[0288] S816, the motion effect control module plays rotational motion effects.
[0289] After switching the wallpaper to the second wallpaper and changing the desktop orientation to portrait mode, the motion control module can play a rotation animation.
[0290] The rotation animation includes full-screen screenshots, portrait desktop, and second wallpaper. In the rotation animation, the full-screen screenshot, portrait desktop, and second wallpaper can go through the following process: the full-screen screenshot, portrait desktop, and second wallpaper are displayed in landscape orientation; the full-screen screenshot, portrait desktop, and second wallpaper rotate around the center in the same direction by a preset angle (e.g., 90°), and the full-screen screenshot gradually disappears; the portrait desktop and second wallpaper are displayed in portrait orientation.
[0291] by Figure 5 The interface shown in 'a' transitions to Figure 5 Taking the animation shown in d as an example, when the rotation animation starts playing, the full-screen screenshot 501, the portrait desktop and wallpaper B 102 are displayed in landscape orientation; then, the full-screen screenshot 501, the portrait desktop and wallpaper B 102 rotate 90° in the same direction, and the full-screen screenshot 501 gradually disappears; after the rotation is completed, the portrait desktop and wallpaper B 102 are displayed in portrait orientation.
[0292] It should be noted that, in this embodiment, the rotation animation effect may include the fade-out animation effect of the full-screen screenshot 501. This is because: when the rotation animation effect starts playing, if the electronic device cancels the display... Figure 5 In the full-screen screenshot 501 shown in Figure 'a', the user can see the transition from the last frame of the full-screen screenshot 501 (e.g., wallpaper A and landscape desktop) to the rotating wallpaper B102 and portrait desktop, creating a visual jump. To improve the smoothness of the rotation animation, in this embodiment, the electronic device can display the full-screen screenshot 501, wallpaper B102, and portrait desktop rotating synchronously. During the rotation, the transparency of the full-screen screenshot 501 gradually decreases, and the electronic device gradually displays wallpaper B102 and the portrait desktop, making the transition from wallpaper A and landscape desktop in the full-screen screenshot to wallpaper B and portrait desktop smoother and more fluid, thus improving the user experience.
[0293] It should be noted that this application embodiment describes the desktop display method in this application embodiment with the screen orientation as portrait and the application orientation as landscape. In practical applications, when the screen orientation is landscape and the application orientation is portrait, the electronic device can first display the application exit animation in the portrait orientation; after the application exit animation finishes playing, a full-screen screenshot is taken and displayed on top. During the display of the full-screen screenshot, the electronic device switches the wallpaper adapted to the portrait orientation to the wallpaper adapted to the landscape orientation; the electronic device displays a rotation animation of the user interface elements switching from the portrait orientation to the landscape orientation. This application embodiment will not describe the above process in detail.
[0294] In this way, during the wallpaper switching process, the electronic device displays a full-screen screenshot of the first animation in landscape mode after it finishes playing on the top layer; the screen flickering caused by the wallpaper switching process is invisible to the user; the smoothness of returning to the desktop is improved, enhancing the user experience.
[0295] The first preset condition for executing step S804 and the second preset condition for executing step S807 will be explained below.
[0296] For step S804, the process for determining the first preset condition can be as follows:
[0297] Condition 1: The electronic device obtains the top-level page that is in a persistent state.
[0298] Condition 2: The electronic device obtains the wallpaper manager when the page is not empty, the page contains a desktop-type window, the page is in the midst of an animation, and the page contains a wallpaper window at its lower level.
[0299] Condition 3: If the wallpaper manager is not empty and the wallpaper manager type is dual wallpaper type, and the animation is in animation collection state or animation playback state, and the animation type is return to background type or close type, then the electronic device will set the screen orientation to the application orientation.
[0300] It is understood that in the embodiments of this application, when the screen orientation and the application orientation are inconsistent, the solution of setting the screen orientation to the application orientation needs to occur in the specific scenario provided in the embodiments of this application. The above conditions 1, 2 and 3 can be used to determine whether the electronic device is in the dual wallpaper scenario of the application being pushed to the background and returning to the desktop as shown in the embodiments of this application.
[0301] Specifically, for condition 1: During the process of returning to the desktop, the desktop application can resume from a paused state and prepare to interact with the user, and the electronic device can call the onResume() method. Therefore, the scenario of returning to the desktop requires that the desktop application is in the top-level position and in a held state. Without a held state, the electronic device is not in a scenario where the application has been moved to the background and returned to the desktop.
[0302] After condition 1 is met, the current scene may be a dual-wallpaper scene, and the electronic device can continue to use condition 2 for judgment.
[0303] For condition 2: When the page is empty or does not contain a desktop-type window, the electronic device is not in a scenario where it is returning to the desktop. After receiving a command to query the screen orientation, the electronic device can report the calculated screen orientation without modifying it.
[0304] When the page is not in the midst of an animation, the electronic device may be displaying the desktop but not executing animations such as application exit animations, and therefore is not in a scenario where the application has been moved to the background. After receiving a command to query the screen orientation, the electronic device can report the calculated screen orientation without modifying it.
[0305] If the bottom layer of the page does not include the wallpaper window, there will be no screen flickering issues caused by wallpaper switching during the display process; after receiving the instruction to query the screen orientation, the electronic device can report the calculated screen orientation without modifying the screen orientation.
[0306] After condition 2 is met, the current scene may be a dual-wallpaper scene, and the electronic device can continue to use condition 3 for judgment.
[0307] For condition 3: If the wallpaper manager is empty or the wallpaper manager type is not dual wallpaper type, the electronic device may not display a wallpaper or may display a single wallpaper type. This process will not involve screen flickering issues caused by wallpaper switching. After receiving the instruction to query the screen orientation, the electronic device can report the calculated screen orientation without modifying the screen orientation.
[0308] When the animation is not in the animation collection state or the animation playback state, the electronic device may not be in the animation period. The electronic device can query the animation collection state and the animation playback state. In the embodiments of this application, the animation collection state and the animation playback state can be used to determine whether the electronic device is in the animation period.
[0309] If the animation type is not a "return to background" or "close" type, the electronic device may not be in a scenario where the application has been moved to the background or closed. After receiving a command to query the screen orientation, the electronic device can report the calculated screen orientation.
[0310] After condition 3 is met, the electronic device can determine that it is currently in a dual-wallpaper scenario where the application is in the background and back to the desktop. The electronic device will then use the application orientation as the modified screen orientation and return it to the display management module.
[0311] It should be noted that this application embodiment describes the determination process of a dual-wallpaper scene in the order of conditions 1, 2, and 3. This application embodiment may also use other orders for judgment; after all three conditions are met simultaneously, the electronic device can be determined to be in a dual-wallpaper scene. Furthermore, this application embodiment may also use more or fewer judgment conditions to determine a dual-wallpaper scene. This application embodiment does not impose any limitations on this.
[0312] Regarding step S807, the process of determining whether to obtain the screen orientation again based on the second preset condition after the application exit animation has finished playing can be as follows:
[0313] Condition 4: The electronic device obtains the top-level page that is in a persistent state.
[0314] Condition 5: The electronic device obtains the wallpaper manager if the animation type is a return to background or close type, the page is not empty, the page includes a desktop type window, and the lower layer of the page includes a wallpaper window.
[0315] If condition 6 is not empty in the wallpaper manager and the wallpaper manager is a dual wallpaper type, the electronic device will obtain the screen orientation again.
[0316] It is understood that the process of determining whether to modify the screen orientation is also used to determine whether the electronic device is in the application scenario provided in this application embodiment. Therefore, the process of determining whether to obtain the screen orientation again is similar to the process of determining whether to modify the screen orientation. This application embodiment will not repeat the explanation of similar principles.
[0317] Unlike the process of determining whether to change the screen orientation, after the application exit animation finishes playing, the electronic device can execute a process to determine whether to retrieve the screen orientation again. Since the application exit animation has finished playing, meaning the page is no longer in the animation's duration, the electronic device can query whether the completed animation type is a "return to background" or "close" type to determine if the completed animation was indeed an application exit animation. Therefore, the second preset condition does not need to involve the condition that the page is in the animation's duration.
[0318] Figure 9 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.
[0319] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0320] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system may include: an application layer, an application framework layer, and a kernel layer, where the kernel layer may be called the driver layer.
[0321] The application layer can include a series of application packages, desktop applications (also known as the desktop launcher), and the system user interface (SystemUI).
[0322] The application package may include, for example, a camera application.
[0323] Desktop applications can be used for application management, interface display, and interactive response. In this embodiment, the desktop application can provide different desktop layouts depending on the desktop orientation. For example, the desktop application can provide the arrangement and layout of user interface elements such as application icons, service cards, and widgets on the desktop in landscape mode; such as... Figure 1 The interface shown in 'a' is an example. Desktop applications provide the arrangement and layout of user interface elements such as application icons, service cards, and widgets on the desktop in portrait mode; for example... Figure 1 The interface shown in b is shown in the image.
[0324] The system user interface can be used to manage user interface elements, such as the status bar, navigation bar, lock screen, and animations. In this embodiment, the system user interface can manage the playback of animations and the setting of animation parameters. For example, the system user interface may include an image wallpaper module and an image wallpaper assistant; the image wallpaper module can be used to load and draw wallpapers; the image wallpaper assistant can be used to store wallpapers. For example, if the electronic device supports dual wallpaper functionality, the image wallpaper assistant may include wallpaper A and wallpaper B.
[0325] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0326] like Figure 9 As shown, the application framework layer may include an Activity Manager, a Window Manager Service (WMS), a motion control module, and a screenshot module.
[0327] The Activity Manager can be used to monitor and manage running applications and system processes. For example, the Activity Manager may include a Task Module and an Activity Task Management Service (ATMS); the Task Module can manage the switching of applications between the foreground and background, and manage activity rebuilding and layout adjustments caused by changes in screen orientation or configuration (such as screen rotation). The Activity Task Manager can be used to notify relevant activities to reconfigure when the electronic device undergoes a configuration change, such as reloading resources and rearranging the UI. In this embodiment, the Activity Task Manager can be used to instruct the reloading and redrawing of the wallpaper when the screen orientation changes.
[0328] A window manager can be used to manage window programs. The window manager can obtain the screen size, determine if a status bar exists, lock the screen, touch the screen, drag the screen, and capture the screen, etc. In this embodiment, the window manager may include a display management module and a display rotation module; the display management module can be used to manage windows on the electronic device and their related layout and animation operations. The display rotation module can be used to manage and handle changes in the device screen orientation.
[0329] The motion control module can be used to manage and execute motion effects.
[0330] The screenshot module can be used to take screenshots of the user interface.
[0331] The kernel layer is the layer between hardware and software. It drives the hardware, enabling it to function. The kernel layer may include display drivers, sensor drivers, etc., but this application embodiment does not limit this. In this application embodiment, the sensor driver may be, for example, a touch sensor area driver, an accelerometer sensor driver, and a gyroscope sensor driver.
[0332] The following is combined Figure 9 The software structure diagram shown in the embodiments of this application Figure 4 and Figure 5 The interaction flow of each software module of the electronic device in the scenario shown is explained. Figure 9 This application provides an embodiment of an electronic device with interactive flowcharts for each software module. Figure 9 As shown:
[0333] The interaction process can be found in steps (1) to (15). Specifically:
[0334] Upon receiving a trigger to return to the desktop, the touch sensor driver in the kernel layer obtains the touch event and reports it to the task module in the application framework layer. The task module can instruct the camera application in the application layer to switch to the background and instruct the display management module in the application framework layer to obtain the screen orientation.
[0335] The display management module interacts with the display rotation module to obtain the screen orientation. The display rotation module can receive inertial measurement units reported by the accelerometer sensor driver and / or gyroscope sensor driver in the kernel layer and calculate the actual screen orientation (e.g., portrait orientation). When the desktop orientation (e.g., landscape orientation) is different from the screen orientation and there is a dual wallpaper scenario, the display rotation module can modify the screen orientation to landscape orientation and pass the modified screen orientation to the display management module.
[0336] The modified screen orientation is the same as the desktop orientation, and the display management module does not trigger the fixed-orientation application launch process. The animation control module in the application framework layer can first execute the first animation in landscape orientation. In the application exit animation, the desktop orientation, wallpaper orientation, and status bar orientation all correspond to the landscape orientation. After the animation finishes playing, the animation control module can instruct the display rotation module to obtain the screen orientation again to correct it. The corrected screen orientation is the calculated screen orientation, which does not correspond to the desktop orientation, wallpaper orientation, and status bar orientation. The display rotation module can generate a rotation event. The display rotation module can also instruct the animation control module to create a rotation animation. During the creation and execution of the rotation animation, the electronic device can display a full-screen screenshot on top.
[0337] Furthermore, during the creation and execution of rotation animations, the display management module can instruct the activity task manager to update configuration information based on rotation events. This configuration information includes desktop orientation and wallpaper settings. The activity task manager can instruct the application-layer image wallpaper module to update the wallpaper based on the wallpaper configuration information, and it can also instruct the application-layer desktop application to update the desktop orientation based on the desktop orientation configuration information. Regarding the wallpaper update process, the image wallpaper module can retrieve a second wallpaper from the image wallpaper assistant and draw it on the screen. After drawing, the first wallpaper switches to the second wallpaper, resulting in a screen flash, but this flash is located below the full-screen screenshot and is invisible to the user. Regarding the desktop orientation update process, the desktop application can update the landscape desktop to a portrait desktop; the desktop orientation switching process is located below the full-screen screenshot and is invisible to the user.
[0338] Once the rotation animation is created and executed, the electronic device can begin playing the rotation animation. During the rotation animation, the second wallpaper, the portrait desktop, and the full-screen screenshot rotate synchronously, and the transparency of the full-screen screenshot gradually decreases until it disappears.
[0339] It should be noted that, for the purpose of explaining the data flow process in the software architecture of electronic devices, Figure 9 The illustrated embodiments show multiple numbers; however, these numbers do not limit the processing order of the desktop display method provided in this application embodiment. The multiple steps can be executed sequentially, simultaneously, or the order between the multiple steps can be adjusted. For example, the electronic device can execute step (8) first and then step (9); the electronic device can also execute step (9) first and then step (8); the electronic device can also execute steps (8) and (9) simultaneously. This application embodiment does not impose any restrictions on this.
[0340] Therefore, when moving an application to the background and returning to the desktop, a full-screen screenshot with a rotating animation can be used to cover up the screen-flashing process, so users will not see the screen-flashing process, thus improving the smoothness and continuity of the desktop display process.
[0341] To better understand the embodiments of this application, the structure of the electronic device of this application is described below:
[0342] Figure 10 A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 140, a wireless communication module 150, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a subscriber identification module (SIM) card interface 195, and an embedded secure element (eSE) chip 196, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0343] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 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.
[0344] Processor 110 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.
[0345] The electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In this embodiment, the display screen 194 can display, for example... Figure 1 , Figure 2 , Figure 4 and Figure 5 The interface shown.
[0346] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B.
[0347] The 180E accelerometer sensor can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic device and applied to applications such as landscape / portrait switching and pedometers.
[0348] In this embodiment, the gyroscope sensor 180B and the accelerometer sensor 180E can be used to detect the screen orientation.
[0349] 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 electronic device 100, in a different position than display screen 194.
[0350] In this embodiment, the touch sensor 180K can detect user-triggered operations, such as receiving a trigger operation to return to the desktop.
[0351] In this application embodiment, the electronic device may include fewer or more hardware modules or software modules, and this application embodiment does not limit this.
[0352] It should be noted that the module names involved in the embodiments of this application can all be defined as other names, as long as they can achieve the function of each module, and no specific restrictions are placed on the module names.
[0353] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0354] The desktop display method according to the embodiments of this application has been described above. The apparatus for performing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced by each other, and the related apparatus provided in the embodiments of this application can perform the steps in the above desktop display method.
[0355] like Figure 11 As shown, the desktop display device 1100 can be used in communication equipment, circuits, hardware components, or chips. The desktop display device includes a display unit 1101 and a processing unit 1102. The display unit 1101 supports the display steps performed by the desktop display device 1100; the processing unit 1102 supports the information processing steps performed by the desktop display device 1100.
[0356] Optionally, the desktop display device 1100 may also include a communication unit 1103. Specifically, the communication unit is used to support the desktop display device 1100 in performing data transmission and data reception steps. The communication unit 1103 may be an input or output interface, pins, or circuitry, etc.
[0357] Optionally, the desktop display device may further include a storage unit 1104. The processing unit 1102 and the storage unit 1104 are connected via a line. The storage unit 1104 may include one or more memories, which may be devices in one or more devices or circuits used for storing programs or data. The storage unit 1104 may exist independently and be connected to the processing unit 1102 of the desktop display device via a communication line. Alternatively, the storage unit 1104 may be integrated with the processing unit 1102.
[0358] Storage unit 1104 may store computer-executable instructions for methods in an electronic device, so that processing unit 1102 executes the methods in the above embodiments. Storage unit 1104 may be a register, cache, or RAM, etc., and storage unit 1104 may be integrated with processing unit 1102. Storage unit 1104 may be a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, and storage unit 1104 may be independent of processing unit 1102.
[0359] The desktop display method provided in this application can be applied to electronic devices with communication functions. Electronic devices include terminal devices, and the specific device form of the terminal device can be referred to the above-mentioned descriptions, which will not be repeated here.
[0360] This application provides a terminal device, which includes a processor and a memory; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, causing the terminal device to perform the above-described method.
[0361] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.
[0362] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0363] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0364] This application provides a computer program product, which includes a computer program that, when run, causes a computer to perform the above-described method.
[0365] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0366] The above detailed embodiments further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A desktop display method, characterized in that, Applied to electronic devices, the method includes: Display a first interface; wherein the first interface includes a window of a first application, the screen orientation of the electronic device is a first orientation; the application orientation of the first application is a second orientation; the first orientation includes a portrait orientation or a landscape orientation, the second orientation includes a landscape orientation or a portrait orientation, and the second orientation is different from the first orientation; In response to a trigger operation of returning to the desktop, a first motion effect in the second direction is played; the first motion effect is a motion effect that transitions from the window of the first application to the icon of the first application; wherein, in the first motion effect in the second direction, the screen direction is the first direction, the desktop direction is the second direction, the wallpaper in the desktop is the first wallpaper, and the first wallpaper is a wallpaper applicable to the desktop in the second direction; After the first animation effect in the second direction is completed, a full-screen screenshot of the second interface is taken and displayed; the second interface includes the desktop and the first wallpaper in the second direction; Play a rotation animation; the rotation animation is a switch from the desktop in the second direction to the desktop in the first direction, a switch from the first wallpaper to the second wallpaper, and an animation of the full-screen screenshot disappearing; the second wallpaper is a wallpaper applicable to the desktop in the first direction.
2. The method according to claim 1, characterized in that, After displaying the full-screen screenshot, the method further includes: Draw the second wallpaper; the second wallpaper is located below the full-screen screenshot.
3. The method according to claim 1 or 2, characterized in that, After displaying the full-screen screenshot, the method further includes: The desktop in the first direction is drawn; the desktop in the first direction is located below the full-screen screenshot, and the desktop in the first direction is located above the second wallpaper.
4. The method according to claim 1 or 2, characterized in that, The rotation effect includes the full-screen screenshot, the desktop in the first direction, and the second wallpaper; In the rotation animation, the full-screen screenshot, the desktop in the first direction, and the second wallpaper undergo the following process: the full-screen screenshot, the desktop in the first direction, and the second wallpaper are displayed in the second direction; the full-screen screenshot, the desktop in the first direction, and the second wallpaper rotate around the center of the same direction by a preset angle, and the full-screen screenshot disappears; The desktop and the second wallpaper in the first direction are displayed in the first direction.
5. The method according to any one of claims 1-4, characterized in that, Before playing the first motion effect in the second direction, the method further includes: Calculate the screen orientation; the screen orientation is the first orientation; the application orientation of the first application is the second orientation; If the screen orientation is different from the application orientation of the first application, it is determined whether a first preset condition is met; the first preset condition is used to determine whether it is a dual wallpaper scenario where the application is in the background and returns to the desktop; the dual wallpaper scenario is a scenario where the electronic device updates the wallpaper according to the screen orientation; If the first preset condition is met, the screen orientation is set to the second orientation; wherein the desktop orientation is the second orientation, and the wallpaper on the desktop is the first wallpaper; Create the first motion effect in the second direction.
6. The method according to any one of claims 5, characterized in that, Before playing the rotation animation, it also includes: If the second preset condition is met, the screen orientation is obtained; the screen orientation is the first orientation; the second preset condition is used to determine whether the application is in a dual wallpaper scenario where the application is in the background, returns to the desktop, and the first animation effect has finished playing. Create the aforementioned rotational animation; When the desktop orientation is different from the first orientation, configuration information for the desktop orientation is generated; and when the wallpaper does not correspond to the first orientation, configuration information for the wallpaper is generated; the configuration information for the desktop orientation is used to indicate the drawing of the desktop in the first orientation; and the configuration information for the wallpaper is used to indicate the drawing of the second wallpaper.
7. The method according to claim 5, characterized in that, The first preset condition includes one or more of the following: there is a page in the first state at the top level, the page is not empty, the page includes a desktop type window, the page includes a wallpaper window, the wallpaper manager of the wallpaper window is not empty and the type of the wallpaper manager is dual wallpaper type, or, the page is during the first animation effect and the animation effect type of the first animation effect is a return to background type or a close type; the first state is used to indicate that the desktop enters the foreground and begins to interact with the user.
8. The method according to claim 6, characterized in that, The second preset condition includes one or more of the following: the top layer has a page in the first state, the page is not empty, the page includes a desktop type window, the lower layer of the page includes a wallpaper window, the wallpaper manager of the wallpaper window is not empty and the type of the wallpaper manager is dual wallpaper type, or the animation type of the first animation is a return to background type or a close type.
9. The method according to any one of claims 1-8, characterized in that, Also includes: A third interface is displayed; wherein the third interface includes a window of a second application, the screen orientation of the electronic device is the first orientation, and the application orientation of the second application is the first orientation; In response to a triggering operation of returning to the desktop, a second animation effect in the first direction is played; the second animation effect is an animation effect that transitions from the window of the second application to the icon of the second application; wherein, in the second animation effect in the first direction, the screen direction is the first direction, the desktop direction is the first direction, the wallpaper in the desktop is the second wallpaper, and the second wallpaper is a wallpaper applicable to the desktop in the first direction.
10. The method according to claim 9, characterized in that, Before playing the second motion effect in the first direction, it also includes: Calculate the screen orientation; the screen orientation is the first orientation; the application orientation of the second application is the first orientation; When the screen orientation is the same as the application orientation of the second application, the second motion effect in the first orientation is created.
11. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in any one of claims 1-10.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.
13. A chip system, characterized in that, It includes at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the at least one processor being configured to run a computer program or instructions to perform the method as described in any one of claims 1-10.
14. A computer program product, characterized in that, Includes a computer program that, when run, causes a computer to perform the method as described in any one of claims 1-10.