Method for displaying wallpaper and electronic equipment

By supplementing the wallpaper with additional images, the problem of poor display after screen rotation was solved, achieving complete display of the wallpaper content and improving the user experience.

CN120909682APending Publication Date: 2025-11-07HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410537657.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

The wallpaper display is poor before and after the screen of an electronic device is rotated, resulting in a poor user experience.

Method used

After detecting a rotation operation, the wallpaper in portrait mode is processed to generate a new wallpaper in landscape mode, making its size suitable and displaying it in landscape mode to ensure content integrity.

Benefits of technology

By using image supplementation, the wallpaper content is displayed completely after the screen is rotated, avoiding incompleteness and magnification issues caused by cropping, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909682A_ABST
    Figure CN120909682A_ABST
Patent Text Reader

Abstract

The invention relates to the field of terminals, and provides a wallpaper display method and electronic device.The method comprises the steps that a first display interface is displayed in a vertical screen state, the first display interface comprises first wallpaper and at least one component, and the first wallpaper comprises a first element; the size of the first wallpaper is the same as the screen size in the vertical screen state; detecting a rotation operation on the electronic equipment; in response to the rotation operation, displaying a second display interface in a landscape state, the second display interface comprising a second wallpaper and a component, the second wallpaper comprising the first element, the second wallpaper being obtained by at least performing image supplement processing on the first wallpaper, and the size of the second wallpaper being the same as the screen size in the landscape state; the second display direction of the second wallpaper on the electronic equipment is different from the first display direction of the first wallpaper on the electronic equipment. Based on the technical scheme of the invention, the wallpaper can adapt to the screen size before and after the rotation of the electronic equipment, the content integrity is ensured, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the terminal field, in particular to a method for displaying wallpaper and an electronic device. BACKGROUND

[0002] The wallpaper in the electronic device can generally reflect the aesthetic needs of the user; different wallpapers can be set based on the interests and hobbies of the user for different users to meet the personalized needs of the user for the display effect of the wallpaper. At present, the electronic device can provide some static wallpaper, dynamic wallpaper, etc. for the user to choose, the user can also use a photo or the like to customize the picture as the wallpaper, or apply the wallpaper template with the frame to use the customized picture as the display content in the frame.

[0003] However, the effect of the electronic device in displaying the same wallpaper before and after the screen rotation is still not good, which makes the user experience not good. SUMMARY

[0004] The present application provides a method for displaying wallpaper and an electronic device, which can adapt the wallpaper to the screen size and ensure the completeness of the content before and after the screen rotation of the electronic device, thereby improving the user experience.

[0005] In a first aspect, a method for displaying wallpaper is provided, applied to an electronic device, including: displaying a first display interface in a portrait screen state, the first display interface including a first wallpaper and at least one component, the first wallpaper including a first element; the size of the first wallpaper being the same as the screen size in the portrait screen state; detecting a rotation operation on the electronic device; in response to the rotation operation, displaying a second display interface in a landscape screen state, the second display interface including a second wallpaper and the component, the second wallpaper including the first element, wherein the second wallpaper is obtained by at least performing a picture filling processing on the first wallpaper, the size of the second wallpaper being the same as the screen size in the landscape screen state; the second wallpaper being different from the first wallpaper in a first display direction of the electronic device.

[0006] The electronic device of the present application embodiment can be a folding screen mobile phone, a tablet computer, etc.

[0007] It should be understood that the height of the second wallpaper after the picture filling processing is equal to the screen height in the landscape screen state, and the width of the second wallpaper after the picture filling processing is equal to the screen width in the landscape screen state.

[0008] In the present application embodiment, the second wallpaper after the picture filling processing can meet the requirements of the screen size in the landscape screen state. The size of the first element in the landscape screen state is reduced relative to the size of the first element in the portrait screen state.

[0009] In the embodiments of the present application, in the portrait screen state, the first wallpaper is vertical relative to the electronic device in the first display direction of the electronic device; and in the landscape screen state, the second wallpaper is horizontal relative to the electronic device in the second display direction of the electronic device.

[0010] In the embodiments of the present application, after the electronic device detects the rotation operation, the second wallpaper obtained by performing the image processing on the first wallpaper displayed before the rotation can be used for the landscape display after the rotation. Since the image processing is performed after the rotation, the size of the first element in the landscape screen state after the rotation is smaller than that in the portrait screen state, but the content is complete, and thus the second wallpaper displayed after the rotation is equivalent to including the first element content in the complete first wallpaper before the rotation, avoiding the problems of incomplete content display and content magnification caused by cropping in the related art. Therefore, by using the method for displaying the wallpaper provided in the embodiments of the present application, the wallpaper content can be displayed completely and reasonably, and the user experience is improved.

[0011] With reference to the first aspect, in some implementations of the first aspect, before displaying the first display interface in the portrait screen state, the method further includes: in response to an operation of applying the first wallpaper on the electronic device, applying the first wallpaper on the electronic device, and performing image processing on the first wallpaper to obtain and store the second wallpaper.

[0012] Exemplarily, the operation of applying the first wallpaper to the first display interface can be a click operation on the application control as shown in FIG. 1. Figure 22

[0013] In the embodiments of the present application, after the second wallpaper is stored, the second wallpaper can be directly called and displayed in the landscape screen state, thereby saving resources and improving efficiency.

[0014] With reference to the first aspect, in some implementations of the first aspect, performing image processing on the first wallpaper to obtain and store the second wallpaper includes: performing equal-ratio scaling processing on the first wallpaper to obtain a target wallpaper; performing the image processing on the target wallpaper to obtain and store the second wallpaper; wherein the height of the target wallpaper is less than or equal to the screen height in the landscape screen state; and the local content of the second wallpaper includes all the content of the target wallpaper.

[0015] In the embodiments of the present application, the height of the target wallpaper is less than or equal to the screen height in the landscape screen state, and the screen height in the landscape screen state is less than the screen height in the portrait screen state. Therefore, the height of the target wallpaper is less than the height of the first wallpaper, and thus it can be known that the target wallpaper is obtained by performing the first image processing on the first wallpaper, that is, the target wallpaper is obtained by performing the scaling processing on the first wallpaper.

[0016] ​In the embodiments of the present application, since the scaling processing is equal scaling, when the height of the target wallpaper after scaling processing is less than or equal to the height of the screen in the horizontal screen state, the width of the target wallpaper after scaling is naturally less than the width of the screen in the horizontal screen state. In this way, it can be ensured that the content of the wallpaper displayed after rotation includes the complete content of the wallpaper before rotation, avoiding the problems of incomplete content display and picture enlargement caused by cropping in the related art.

[0017] In combination with the first aspect, in some implementations of the first aspect, when the first wallpaper is a non-depth-of-field wallpaper, the scaling ratio in the equal scaling processing is a ratio of the height of the screen in the horizontal screen state to the width of the screen.

[0018] In the embodiments of the present application, for a non-depth-of-field wallpaper, since the scaling ratio is the height of the screen to the width of the screen in the horizontal screen state, the height of the screen is less than the width of the screen at this time, so that the size of the wallpaper after equal scaling processing is equivalent to being reduced, thereby realizing that the content of the wallpaper is reduced when displayed in the horizontal screen state.

[0019] In combination with the first aspect, in some implementations of the first aspect, when the first wallpaper is a depth-of-field wallpaper, the scaling ratio in the equal scaling processing is a ratio between a difference between the height of the screen in the horizontal screen state and a first distance, and a difference between the width of the screen in the horizontal screen state and the first distance.

[0020] In combination with the first aspect, in some implementations of the first aspect, the first distance is a distance from a top edge of the first element to a top edge of the screen.

[0021] It should be understood that the distance from the top edge of the first element to the top edge of the screen in the horizontal screen state is the same as the distance from the top edge of the first element to the top edge of the screen in the vertical screen state.

[0022] In the embodiments of the present application, for a depth-of-field wallpaper, when determining the scaling ratio, the first distance is removed, and the height of the first element in the depth-of-field wallpaper that is shielded to the first component before and after scaling will remain unchanged, thereby achieving the purpose of keeping the depth-of-field effect unchanged.

[0023] In combination with the first aspect, in some implementations of the first aspect, when the first wallpaper is a non-depth-of-field wallpaper, the picture supplementing processing includes: centering the target wallpaper with the width of the screen in the horizontal screen state as a reference; and supplementing pictures on the left and right sides of the target wallpaper.

[0024] In the embodiments of the present application, centering can ensure that the horizontal position of the wallpaper before and after screen rotation is unchanged, and the height of the non-depth-of-field wallpaper before and after screen rotation is the same as the height of the screen, so that no other picture supplementing is needed.

[0025] With reference to the first aspect, in some implementations of the first aspect, when the first wallpaper is a depth-of-field wallpaper, the supplemental image processing includes: centering the target wallpaper based on a screen width in a landscape state, and aligning a bottom edge of the target wallpaper with a screen bottom edge in the landscape state; and supplementing an upper portion and both sides of the target wallpaper.

[0026] In the embodiments of the present application, the distance between the first component and the screen top edge is unchanged before and after the screen rotation, and when the distance between the top edge of the first element in the depth-of-field wallpaper and the screen top edge is unchanged, the relative position between the first element and the first component is fixed. For example, the first element occludes the first component by a certain height, and when the distance between the top edge of the first element and the screen top edge is unchanged, the height of the occlusion of the first element to the first component before and after the rotation is unchanged. Therefore, when the scaling processing is performed, the distance between the top edge of the first element and the screen top edge can be removed in the scaling calculation, and the target wallpaper can be aligned with the screen bottom edge in the supplemental image processing. In this way, the position of the first element in the first wallpaper that occludes the first component is unchanged from the position of the first element in the second wallpaper that occludes the first component.

[0027] With reference to the first aspect, in some implementations of the first aspect, the first display interface and the second display interface are both lock screen interfaces or both desktops.

[0028] With reference to the first aspect, in some implementations of the first aspect, the at least one component includes one or more of weather information, sports information, health information, a date, a clock indicator, a font, a number, an image, music, or a video.

[0029] With reference to the first aspect, in some implementations of the first aspect, when the first wallpaper is a depth-of-field wallpaper, the first element is a foreground object identified from a custom picture.

[0030] For example, the foreground object is a person as shown in (a) of FIG. 1A and (a) of FIG. 1B. Figure 7 Figure 8

[0031] With reference to the first aspect, in some implementations of the first aspect, when the first wallpaper is a non-depth-of-field wallpaper, the first element is a custom picture.

[0032] With reference to the first aspect, in some implementations of the first aspect, when the first wallpaper is a template wallpaper, a template picture included in the template wallpaper is replaced by a custom picture.

[0033] In the embodiments of the present application, the custom picture can be a regular shape or an irregular shape.

[0034] ​​For example, a custom picture can be a picture in a first display area as shown in (a) of FIG. 10, or a mountain as shown in (a) of FIG. 11. Figure 16 Figure 17

[0035] In a second aspect, an electronic device is provided, including one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is configured to store computer program code including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the following operations:

[0036] displaying a first wallpaper in a portrait state; displaying a first display interface in the portrait state, the first display interface including the first wallpaper and at least one component, the first wallpaper including a first element; a size of the first wallpaper being the same as a size of a screen in the portrait state; detecting a rotation operation on the electronic device; in response to the rotation operation, displaying a second display interface in a landscape state, the second display interface including a second wallpaper and the component, the second wallpaper including the first element, wherein the second wallpaper is obtained by at least performing a padding processing on the first wallpaper, and a size of the second wallpaper is the same as a size of the screen in the landscape state; the second wallpaper being different from the first wallpaper in a second display direction of the electronic device.

[0037] In a third aspect, an electronic device is provided, including a module / unit for performing the method of displaying a wallpaper in the first aspect or any one of the implementation manners of the first aspect.

[0038] In a fourth aspect, an electronic device is provided, including one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is configured to store computer program code including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method of displaying a wallpaper in the first aspect or any one of the implementation manners of the first aspect.

[0039] In combination with the fourth aspect, in some implementation manners of the fourth aspect, the electronic device is a foldable-screen electronic device, the foldable-screen electronic device including a first display screen and a second display screen that are foldable, the portrait state is used to indicate that the first display screen and the second display screen are unfolded in the same plane and an axis direction of a folding axis is a portrait direction, and the landscape state is used to indicate that the first display screen and the second display screen are unfolded in the same plane and the axis direction of the folding axis is a landscape direction.

[0040] ​​In a fifth aspect, a chip system is provided, which is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform the method of displaying a wallpaper in the first aspect or any of the implementation manners of the first aspect.

[0041] In a sixth aspect, a computer-readable storage medium is provided, which stores computer program codes, and when the computer program codes are run by an electronic device, the electronic device is caused to perform the method of displaying a wallpaper in the first aspect or any of the implementation manners of the first aspect.

[0042] In a seventh aspect, a computer program product is provided, which includes computer program codes, and when the computer program codes are run by an electronic device, the electronic device is caused to perform the method of displaying a wallpaper in the first aspect or any of the implementation manners of the first aspect.

[0043] In the embodiments of the present application, after the electronic device detects the rotation operation, the second wallpaper obtained by performing the image filling processing on the first wallpaper displayed before the rotation can be used for the horizontal screen display after the rotation. Since the image filling processing is performed after the rotation, the size of the first element in the horizontal screen state after the rotation is reduced relative to the size of the first element in the vertical screen state, but the content is complete, and then the second wallpaper displayed after the rotation is equivalent to including the first element content in the complete first wallpaper before the rotation, avoiding the problems of incomplete content display and content enlargement caused by cropping in the related art. Therefore, by using the method of displaying a wallpaper provided in the embodiments of the present application, the wallpaper content can be displayed completely and reasonably, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 FIG. 1 is a schematic diagram of a hardware system of an electronic device suitable for the present application;

[0045] Figure 2 FIG. 1 is a schematic diagram of a hardware system of an electronic device suitable for the present application;

[0046] Figure 3 FIG. 1 is a schematic diagram of a hardware system of an electronic device suitable for the present application;

[0047] Figure 4 FIG. 1 is a schematic diagram of a hardware system of an electronic device suitable for the present application;

[0048] Figure 5 FIG. 1 is a schematic diagram of a hardware system of an electronic device suitable for the present application;

[0049] Figure 6 FIG. 1 is a schematic diagram of a hardware system of an electronic device suitable for the present application;

[0050] Figure 7 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0051] Figure 8 is another schematic diagram of an application scenario provided by an embodiment of the present application;

[0052] Figure 9 is another schematic flowchart of displaying a wallpaper provided by an embodiment of the present application;

[0053] Figure 10 is a schematic diagram of wallpaper adaptation provided by an embodiment of the present application;

[0054] Figure 11 is another schematic diagram of wallpaper adaptation provided by an embodiment of the present application;

[0055] Figure 12 is a schematic diagram of displaying a non-depth-of-field wallpaper on a foldable screen mobile phone;

[0056] Figure 13 is a schematic diagram of wallpaper adaptation in a portrait screen state according to related art;

[0057] Figure 14 is a schematic diagram of wallpaper adaptation in a landscape screen state according to related art;

[0058] Figure 15 is another schematic flowchart of displaying a wallpaper provided by an embodiment of the present application;

[0059] Figure 16 is another schematic diagram of an application scenario provided by an embodiment of the present application;

[0060] Figure 17 is another schematic diagram of an application scenario provided by an embodiment of the present application;

[0061] Figure 18 is a schematic diagram of wallpaper adaptation provided by an embodiment of the present application;

[0062] Figure 19 is a schematic diagram of a graphical user interface suitable for an embodiment of the present application;

[0063] Figure 20 is a schematic diagram of a graphical user interface suitable for an embodiment of the present application;

[0064] Figure 21 is a schematic diagram of a graphical user interface suitable for an embodiment of the present application;

[0065] Figure 22 is a schematic diagram of a graphical user interface suitable for an embodiment of the present application;

[0066] Figure 23 FIG. 1 is a schematic diagram of a graphical user interface suitable for embodiments of the present application;

[0067] Figure 24 FIG. 2 is an interaction flowchart suitable for embodiments of the present application. DETAILED DESCRIPTION

[0068] In the embodiments of the present application, the terms "first", "second" and the like are used only for descriptive purposes, and cannot be construed as indicating or implying relative importance or an indicated number of the technical features. Thus, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the embodiments, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0069] It should also be understood that the term "comprise" (also "comprises", "comprising", "includes" and / or "including") when used in this specification, specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0070] In order to facilitate the understanding of the embodiments of the present application, first, the related terms involved in the embodiments of the present application are briefly described.

[0071] 1. Widget

[0072] A widget is an information carrier that provides some important or closely related information to the user in a condensed form for intuitive and quick display of information. The widget can be displayed in the display interface of the electronic device, such as the desktop or lock screen interface of the electronic device. The widget can include weather information, sports information, health information, date, clock indicator, artistic font, etc.

[0073] For example, the clock indicator for displaying time information can be displayed in the lock screen interface and the desktop. When the clock indicator is displayed in the desktop, the electronic device can switch to display the main interface corresponding to the clock application after the user clicks the clock indicator. Of course, a widget can provide information related to one application or information related to multiple applications. For another example, a widget in which the date and the clock indicator are combined can be displayed in the lock screen interface, and a widget in which the date, the clock indicator and the weather are combined can be displayed in the desktop.

[0074] The widget can be displayed in the form of a card, in the form of pure text, or in other forms, such as a clock indicator can be displayed in the form of a card, in the form of pure text, or in the form of a clock dial, and the embodiments of the present application do not make any limitation in this regard.

[0075] The content displayed in the widget includes, but is not limited to, text, numbers, images, music, and videos, and the embodiments of the present application do not make any limitation in this regard.

[0076] 2, wallpaper

[0077] 1) According to the application scenario of the wallpaper, the wallpaper can include an off-screen wallpaper, a lock screen wallpaper, and a desktop wallpaper. The off-screen wallpaper refers to the wallpaper applied to the off-screen display interface. The lock screen wallpaper refers to the wallpaper applied to the lock screen interface. The desktop wallpaper refers to the wallpaper applied to the desktop.

[0078] 2) According to the visual effect of the wallpaper, the wallpaper can include a flat wallpaper and a depth-of-field wallpaper. The flat wallpaper can also be referred to as a two-dimensional (2D) wallpaper, and the depth-of-field wallpaper can also be referred to as a three-dimensional (3D) wallpaper. Compared with the flat wallpaper, the depth-of-field wallpaper can include foreground objects and background objects, which can make the picture three-dimensional and realistic, and can bring a cooler visual experience to the user. When the depth-of-field wallpaper is applied to the lock screen interface, the foreground object refers to an object or layer located in front of the subject and relatively close in the lock screen interface, such as a person, a layer where the person is located, etc. The background object refers to an object or layer located behind the subject and relatively far away in the lock screen interface, such as trees, buildings, or layers where the trees and / or buildings are located, etc.

[0079] In the embodiments of the present application, the main concern is the depth-of-field wallpaper, and the subject in the picture can indicate a widget, such as a clock indicator.

[0080] For example, as shown in Figure 3 When the depth-of-field wallpaper is applied to the lock screen interface, the lock screen interface also displays a widget, such as a clock indicator, the foreground object can indicate an object or layer located in front of the clock indicator and relatively close, and the background object can indicate an object or layer located behind the clock indicator and relatively far away.

[0081] 3) According to the motion effect of the wallpaper, the wallpaper can be divided into static wallpaper and dynamic wallpaper.

[0082] In the embodiments of the present application, the main concern is the static wallpaper.

[0083] The method for displaying a wallpaper and the electronic device provided in the embodiments of the present application will be described below with reference to the drawings.

[0084] Figure 1 A hardware system suitable for the electronic device of the present application is shown.

[0085] The electronic device 100 can be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, a vehicle-mounted electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, and the like. The specific type of the electronic device 100 is not limited in the embodiments of the present application. For example, the electronic device 100 is a foldable screen mobile phone.

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

[0087] It should be noted that, Figure 1 The structures shown do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or the electronic device 100 can include a combination of some of the components shown, or the electronic device 100 can include sub-components of some of the components shown. Figure 1 The structures shown do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or the electronic device 100 can include a combination of some of the components shown, or the electronic device 100 can include sub-components of some of the components shown. Figure 1 The structures shown do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or the electronic device 100 can include a combination of some of the components shown, or the electronic device 100 can include sub-components of some of the components shown. Figure 1 The structures shown do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or the electronic device 100 can include a combination of some of the components shown, or the electronic device 100 can include sub-components of some of the components shown.Figure 1 The illustrated components can be implemented in hardware, software, or a combination of both hardware and software.

[0088] The processor 110 can include one or more processing units. For example, the processor 110 can include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU). Among them, different processing units can be independent devices, or can be integrated devices. The controller can generate operation control signals according to instruction operation codes and timing signals, complete the control of fetching instructions and executing instructions.

[0089] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. Avoiding repeated access reduces the waiting time of the processor 110, thus improving the efficiency of the system.

[0090] In some embodiments, the processor 110 can include one or more interfaces. For example, the processor 110 can include at least one of the following interfaces: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, a USB interface.

[0091] Exemplarily, in the embodiments of the present application, the processor 110 can be configured to execute the method for displaying a wallpaper provided by the embodiments of the present application; for example, displaying a first display interface in a portrait screen state, the first display interface comprising a first wallpaper and at least one component, the first wallpaper comprising a first element; the size of the first wallpaper being the same as the size of the screen in the portrait screen state; detecting a rotation operation on the electronic device; in response to the rotation operation, displaying a second display interface in a landscape screen state, the second display interface comprising a second wallpaper and the component, the second wallpaper comprising the first element, wherein the second wallpaper is obtained by at least performing a padding processing on the first wallpaper, the size of the second wallpaper being the same as the size of the screen in the landscape screen state; the second wallpaper being different from the first wallpaper in the first display direction of the electronic device.

[0092] Figure 1 The connection relationship between the modules shown is only illustrative and does not constitute a limitation on the connection relationship between the modules of the electronic device 100. Alternatively, the modules of the electronic device 100 can also adopt a combination of the above-mentioned various connection modes.

[0093] The wireless communication function of the electronic device 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0094] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

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

[0096] The display screen 194 can be used to display images or videos.

[0097] Optionally, the display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED, or a quantum dot light emitting diode (QLED). In some embodiments, the electronic device 100 can include 1 or N display screens 194, and N is a positive integer greater than 1.

[0098] For example, in the embodiments of the present application, the display screen 194 can display a lock screen wallpaper and a desktop wallpaper. The lock screen wallpaper displayed by the display screen can be a flat wallpaper or a depth-of-field wallpaper.

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

[0100] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the camera, the light signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can optimize the noise, brightness, and color of the image through an algorithm, and the ISP can also optimize the exposure and color temperature of the shooting scene and other parameters. In some embodiments, the ISP can be arranged in the camera 193.

[0101] The camera 193 (may also be referred to as a lens) is used to capture still images or videos. The camera 193 can be triggered to start by application instructions, and the camera function can be implemented, such as capturing images of any scene. The camera 193 can include an imaging lens, a filter, an image sensor, and the like. Light emitted or reflected by an object enters the imaging lens, passes through the filter, and finally converges on the image sensor. The imaging lens is mainly used to converge the light emitted or reflected by all objects (may also be referred to as a scene to be photographed, a target scene, and can also be understood as a scene image that a user expects to capture) in the photographing angle of view into an image; the filter is mainly used to filter out excess light waves (for example, light waves other than visible light, such as infrared) in the light; and the image sensor can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The image sensor is mainly used to perform photoelectric conversion on the received light signal, convert the light signal into an electrical signal, and then transmit the electrical signal to an ISP to convert the electrical signal into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into a standard RGB, YUV, or the like image signal.

[0102] Exemplarily, the digital signal processor is used to process digital signals, and in addition to processing digital image signals, the digital signal processor can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.

[0103] Exemplarily, the video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, and MPEG 4.

[0104] Exemplarily, the gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of shaking of the electronic device 100, calculates the distance that needs to be compensated by the lens module according to the angle, and lets the lens offset the shaking of the electronic device 100 by reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B can also be used in scenarios such as navigation and motion sensing games.

[0105] Exemplarily, the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally, x-axis, y-axis and z-axis). The magnitude and direction of gravity can be detected when the electronic device 100 is static. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 as an input parameter of the application program such as horizontal-vertical screen switching and pedometer.

[0106] Exemplarily, the distance sensor 180F is used to measure distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, for example in the scene shooting, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0107] Exemplarily, the ambient light sensor 180L is used to perceive the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent false touch.

[0108] Exemplarily, the fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize functions such as unlocking, accessing application lock, taking pictures and answering incoming calls.

[0109] Exemplarily, the touch sensor 180K is also called touch device. The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called touch screen. The touch sensor 180K is used to detect the touch operation acting on or near it. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the touch event type. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, and disposed at a different position from the display screen 194.

[0110] The hardware system of the electronic device 100 is described in detail above, and the software system of the electronic device 100 is introduced below.

[0111] Figure 2 is a schematic diagram of the software system of the electronic device provided by the embodiments of the present application.

[0112] The layered architecture of the electronic device 100 divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.

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

[0114] As shown in Figure 2 , the application package can include lock screen, camera, gallery, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0115] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0116] As shown in Figure 2 , the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0117] The Android Runtime includes the core library and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.

[0118] The core library contains two parts: one is the function function that the java language needs to call, and the other is the core library of Android.

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

[0120] The system library can include a plurality of functional modules. For example: surface manager, media library, three-dimensional graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0121] The kernel layer is the layer between hardware and software. The kernel layer at least contains display driver, camera driver, audio driver, sensor driver, Wi-Fi driver, etc.

[0122] It should be noted that the electronic device mentioned in the embodiments of the present application can include more or less modules in the above-mentioned electronic device.

[0123] Taking a folding screen mobile phone including two display screens as an example, the two display screens are distributed on both sides of the folding axis. When the included angle between the two display screens is 0°, and the back surfaces (the side not used for display) of the two display screens are relatively attached together, the folding screen can be referred to as an outer folding screen, and this state can be referred to as a folded state of the outer folding screen. When the included angle between the two display screens is 180°, this state can be referred to as an unfolded state of the outer folding screen. In addition, the two display screens can be collectively referred to as outer screens of the outer folding screen. When the included angle between the two display screens is 0°, and the display surfaces (the side used for display) of the two display screens are relatively attached together, the folding screen can be referred to as an inner folding screen, and this state can be referred to as a folded state of the inner folding screen. When the included angle between the two display screens is 180°, this state can be referred to as an unfolded state of the inner folding screen. In addition, the two display screens can be collectively referred to as inner screens of the inner folding screen.

[0124] It should be understood that the number of display screens included in the folding screen is based on the folding axis around which the folding screen is folded as the reference line for dividing and naming the display screens. Here, the two display screens do not represent the actual panel structure of the folding screen. For example, the folding screen can be composed of two rigid panels and a hinge, and one of the two rigid panels can be referred to as a display screen. Alternatively, the folding screen is composed of a flexible panel and a hinge, and half of the flexible panel can be referred to as a display screen based on the hinge as the reference line. Here, the specific structure of the folding screen can be set as needed, and the embodiments of the present application do not make any limitation in this regard.

[0125] When the two display screens included in the folding screen mobile phone are distributed left and right along the folding axis, it can be indicated as a portrait screen state. When the two display screens included in the folding screen mobile phone are distributed up and down along the folding axis, it can be indicated as a landscape screen state. Then, the outer screens of the outer folding screen in the unfolded state and the inner screens of the inner folding screen in the unfolded state both include the portrait screen state and the landscape screen state. For the outer screens of the outer folding screen in the unfolded state, whether in the portrait screen state or the landscape screen state, when not unlocked, a lock screen interface is displayed; when successfully unlocked, a desktop is displayed. For the inner screens of the inner folding screen in the unfolded state, whether in the portrait screen state or the landscape screen state, when not unlocked, a lock screen interface is displayed; when successfully unlocked, a desktop is displayed.

[0126] I. Taking a depth-of-field wallpaper as an example for illustration

[0127] Figure 3 A schematic diagram of displaying a depth-of-field wallpaper on a folding screen mobile phone is shown.

[0128] Specifically, the depth-of-field wallpaper can be applied to the outer screen of the outer-fold folding screen in the unfolded state, or the inner screen of the inner-fold folding screen in the unfolded state; the depth-of-field wallpaper can be applied in the lock screen interface, or can also be applied in the desktop.

[0129] For example, as shown in (a) of FIG. 13, a depth-of-field wallpaper is displayed in the current lock screen interface, a foreground object 310 in the depth-of-field wallpaper is a person, and a background object 320 can indicate a framed area (such as the mountains and water in the oval frame) or can also indicate a framed area and an area filled with dot patterns outside the frame. The lock screen interface can also include a plurality of widgets, such as a clock indicator 330, a date 340, a lock screen control 350, a camera control 360, and the like. Figure 3

[0130] In the embodiment of the present application, the foreground object 310 is located above or in front of the clock indicator 330, and the background object 320 is located below or behind the clock indicator 330, so that the foreground object 310 and the background object 320 combined together can present a depth-of-field effect to form a depth-of-field wallpaper.

[0131] At present, whether it is the outer screen of the outer-fold folding screen in the unfolded state or the inner screen of the inner-fold folding screen, the screen is usually rectangular, and the sizes of two adjacent sides are different. For example, as shown in (a) of FIG. 14, the size of the outer screen of the outer-fold folding screen in the unfolded state is 1920*1080, and the size of the inner screen of the inner-fold folding screen in the unfolded state is 1080*1920. Figure 3 Figure 3 As shown in (a) of FIG. 14 and (b) of FIG. 15, when the electronic device is switched from a vertical screen state to a horizontal screen state, the size of the wallpaper changes. In order to maintain the same depth-of-field effect in the horizontal screen state and the vertical screen state, the related art processing method for such a wallpaper is to crop the depth-of-field wallpaper in the vertical screen state to adapt to the size of the wallpaper in the horizontal screen state, but this will cause the problem of incomplete content display, as shown in (b) of FIG. 15, the lower content of the foreground object 310 is cropped. Figure 3

[0132] For the background object 320 shown in (a) of FIG. 14, since the depth-of-field wallpaper is composed of a picture applied to a framed wallpaper template, when cropping, the lower content in the oval frame included in the background object 320 is also cropped, that is, the content of the foreground object 310 and the background object 320 after the cropping processing will together cause the problem of incomplete content display. If no cropping is performed, only scaling is performed, the wallpaper content will be stretched horizontally and compressed vertically, and the depth-of-field effect will be lost. Figure 3 Exemplarily,

[0133] is a schematic diagram of the size of a wallpaper displayed in a vertical screen state related to the related art, Figure 4 is a schematic diagram of the size of a wallpaper displayed in a horizontal screen state related to the related art. As shown in (a) of FIG. 14 and (b) of FIG. 15, when the electronic device is switched from a vertical screen state to a horizontal screen state, the size of the wallpaper changes. In order to maintain the same depth-of-field effect in the horizontal screen state and the vertical screen state, the related art processing method for such a wallpaper is to crop the depth-of-field wallpaper in the vertical screen state to adapt to the size of the wallpaper in the horizontal screen state, but this will cause the problem of incomplete content display, as shown in (b) of FIG. 15, the lower content of the foreground object 310 is cropped. Figure 5 Figure 4 ​​​​As shown, assuming that the screen has a vertical size of 2344px (pixel) and a horizontal size of 2156px, the size of the depth-of-field wallpaper displayed in the vertical screen state is 2156px*2344px; when the electronic device is switched from the vertical screen state to the horizontal screen state, as shown in FIG. 1B, the size of the depth-of-field wallpaper displayed in the horizontal screen state is 2344px*2156px. Figure 5 As shown, the size of the depth-of-field wallpaper needs to be enlarged based on 2344px, and then, in order to maintain the same depth-of-field effect in the horizontal screen state and the vertical screen state, the area beyond 2156px at the bottom needs to be cropped.

[0134] In combination with the wallpaper shown in (b) of FIG. 1C, it can be seen that, although the second wallpaper after cropping can adapt to the screen size in the horizontal screen state, the content at the bottom is not displayed completely, thereby resulting in poor user experience effect. Figure 3

[0135] Therefore, embodiments of the present application provide a method for displaying a wallpaper and an electronic device; in embodiments of the present application, after the electronic device detects a rotation operation, a target wallpaper corresponding to a first wallpaper displayed before rotation and after first image processing can be called, and a second wallpaper obtained after second image processing of the target wallpaper can be used for horizontal screen display after rotation; since the content of the wallpaper displayed after rotation includes the complete content of the wallpaper before rotation, the problem of incomplete content display caused by cropping in the related art is avoided, and therefore, by the method for displaying a wallpaper provided in embodiments of the present application, the complete content of the wallpaper can be displayed, thereby improving user experience.

[0136] Exemplarily, when the first wallpaper is a depth-of-field wallpaper, scaling is performed according to a preset ratio in the first image processing process, further ensuring that the position of the foreground object shielding the small component remains consistent with the position of the foreground object shielding the small component before rotation, thereby preserving the integrity of the content of the wallpaper while also preserving the depth-of-field effect.

[0137] Optionally, the method for displaying a wallpaper in embodiments of the present application can be applied to display of an electronic device; for example, the display of the electronic device includes but is not limited to: screen-off display of the electronic device, lock screen display of the electronic device, or desktop display of the electronic device, etc.; by the method for displaying a wallpaper in embodiments of the present application, after the electronic device detects a rotation operation of the electronic device by a user, a target wallpaper corresponding to the current wallpaper can be called, a second wallpaper can be obtained after processing of the target wallpaper, and the second wallpaper can be displayed in the display screen of the electronic device.

[0138] In the following, a method for displaying a depth-of-field wallpaper provided in embodiments of the present application is described in detail. Figure 6 to Figure 9 Exemplarily, as shown in (a) of FIG. 1D, the lock screen interface of the electronic device, and as shown in (b) of FIG. 1D, the wallpaper of the electronic device, are the same as (a) and (b) of FIG. 1C.

[0139] Figure 7 Figure 3 ​​​The lock screen interface shown in (a) is the same as that shown in (a) of FIG. 3; the wallpaper 300 displayed in the lock screen interface includes a foreground object 310, which can be a person, an animal, or the like; the foreground object 310 can be static or dynamic, which is not limited in the present application; the background object 320 is a framed area in a framed wallpaper template, or can also be the entire screen area; it should be understood that the partial framed area can indicate a first display area, and the first display area can be superimposed with a custom foreground object 310; the content in the framed area, such as the mountain, can be static, and the water can be dynamic, which is not limited in the present application; in other words, the lock screen interface can display a dynamic or static depth-of-field wallpaper, a depth-of-field wallpaper using a framed wallpaper template, or a depth-of-field wallpaper without a framed wallpaper template.

[0140] It should be understood that the above is an example of an application scenario of the depth-of-field wallpaper, and does not limit the application scenarios of the present application.

[0141] Figure 6 FIG. 4 is a schematic flowchart of a method for displaying a wallpaper according to an embodiment of the present application. The method 400 can be executed by the electronic device shown in FIG. 1; the method 400 includes steps S410 to S430, which are described in detail below. Figure 1

[0142] Step S410, display a first wallpaper in a portrait state.

[0143] Optionally, in a bright screen operation, the electronic device can display the first wallpaper in the portrait state.

[0144] For example, the bright screen operation is a click operation of the user on the power button of the electronic device; in response to the click operation, the electronic device switches from a black screen to a lock screen interface, and displays the first wallpaper in the lock screen interface.

[0145] It should be understood that the vertical edge of the screen is longer than the horizontal edge in the portrait state, and the horizontal edge of the screen is longer than the vertical edge in the landscape state.

[0146] In the present embodiment, the first wallpaper is a depth-of-field wallpaper.

[0147] Optionally, when the background object is a framed area in a framed wallpaper template, the first wallpaper is a depth-of-field wallpaper with a frame for the background object; when the background object is the entire screen area, the first wallpaper is a depth-of-field wallpaper without a frame; the first wallpaper can be a dynamic or static depth-of-field wallpaper. It should be understood that the dynamic depth-of-field wallpaper can include a wallpaper with a dynamic foreground object and / or a dynamic background object.

[0148] For example, the electronic device displays, in the portrait state, a lock screen interface as shown in FIG. 3(a), and the lock screen interface includes a depth-of-field wallpaper with a frame for the background object. Figure 7 ​The depth-of-field wallpaper shown in (a) has a background object 320 consisting of a framed area (such as an elliptical area) and an area outside the frame filled with a dotted pattern in a framed wallpaper template. In this example, the person in the foreground object 310 can be static, the mountain in the background object 320 can be static, while the water flow can be dynamic, and the dotted pattern can also be dynamic, such as the dotted pattern being blinking or scrolling.

[0149] For example, electronic devices displaying images in portrait mode, such as... Figure 8 The depth-of-field wallpaper shown in (a) has a background object 320 that is entirely filled with a dotted pattern. In this example, both the person in the foreground object 310 and the dotted pattern in the background object 320 are static.

[0150] Step S420: A rotation operation on the electronic device is detected.

[0151] For example, an inertial measurement unit in an electronic device can detect rotational operations on the electronic device.

[0152] The rotation operation is used to instruct the user to rotate the electronic device in physical space. For example, when the screen of the electronic device is perpendicular to the horizontal plane, the rotation operation can instruct the user to rotate the electronic device by 90° with an axis parallel to the horizontal plane and perpendicular to the screen as the rotation axis.

[0153] For example, such as Figure 7 (a) and Figure 7 As shown in (b) above, or, as in Figure 8 (a) and Figure 8 As shown in (b), the rotation operation can be an operation that rotates an electronic device from portrait mode to landscape mode.

[0154] Step S430: In response to the rotation operation, display the second wallpaper obtained by at least supplementing the first wallpaper in landscape mode.

[0155] Optionally, a second wallpaper obtained by performing a first image processing and a second image processing on the first wallpaper can be displayed.

[0156] In this embodiment, the second wallpaper is a depth-of-field wallpaper.

[0157] The second wallpaper is displayed in the same direction as the first wallpaper, so that the visual direction of the wallpaper displayed on the user's electronic device remains unchanged before and after rotation.

[0158] For example, such as Figure 7 (a) and Figure 7 As shown in (b) above, or, as in Figure 8 (a) and Figure 8As shown in (b) of FIG. 13, the display directions of the first wallpaper and the second wallpaper are both the X direction. It should be understood that, in the portrait screen state, the X direction is parallel to the axial direction of the folding axis of the electronic device; in the landscape screen state, the X direction is perpendicular to the axial direction of the folding axis of the electronic device.

[0159] Optionally, before the step S410, the method provided by the embodiment of the present application can further include:

[0160] In response to a click operation on the automatic rotation control, the automatic rotation function is opened.

[0161] The control center interface can be displayed in response to a sliding operation of the desktop from the edge of the screen, and the automatic rotation control can be included in the control center interface.

[0162] It should be understood that, when the automatic rotation function is opened, in step S430, in response to the rotation operation, the wallpaper displayed by the electronic device can be switched from the first wallpaper adapted to the portrait screen state to the second wallpaper adapted to the landscape screen state, otherwise, when the automatic rotation function is not opened, the first wallpaper will not be switched.

[0163] Optionally, Figure 9 Another flowchart for displaying the depth-of-field wallpaper is provided by the embodiment of the present application.

[0164] As Figure 9 shown, before the step S410, the method for displaying the depth-of-field wallpaper provided by the present application further includes:

[0165] S401, a lock screen wallpaper preview interface is displayed, and the lock screen wallpaper preview interface includes an application control.

[0166] In the preview area of the lock screen wallpaper preview interface, the first wallpaper is displayed correspondingly, and the first wallpaper is a depth-of-field wallpaper that can adapt to the inner screen or the outer screen in the portrait screen state.

[0167] As shown in (a) of FIG. 14, other contents of the lock screen wallpaper preview interface can be referred to the subsequent description of (b). Figure 21 Figure 21 The description of (b) is not repeated here.

[0168] S402, in response to a click operation on the application control, the first wallpaper is set as the wallpaper in the lock screen interface displayed by the electronic device in the portrait screen state.

[0169] S403, while S402 is executed, the first wallpaper is subjected to first image processing to obtain a target wallpaper.

[0170] S404, the target wallpaper is subjected to second image processing to obtain a second wallpaper.

[0171] ​The target wallpaper contains the same content as the first wallpaper; the second wallpaper includes the target wallpaper, and the second image processing differs from the first image processing.

[0172] Optionally, the target wallpaper may be a wallpaper obtained by the electronic device itself after performing a first image processing on the first wallpaper; or, the target wallpaper may refer to a wallpaper downloaded by the user through the electronic device, which is obtained by performing a first image processing on the first wallpaper; this application does not limit the source of the target wallpaper.

[0173] Optionally, the target wallpaper can be stored in the cache of the electronic device, or it can be stored on a cloud server and downloaded by the electronic device in response to a rotation operation. This application does not limit the storage of the target wallpaper. Of course, in actual processing, the target wallpaper may not be stored.

[0174] Optionally, the first image processing may include, but is not limited to: proportional scaling processing, wherein the height of the scaled wallpaper is less than or equal to the screen height in landscape mode.

[0175] It should be understood that after the first wallpaper is scaled proportionally, it can be ensured that the content of the first wallpaper is complete when the electronic device is displayed in landscape mode.

[0176] Optionally, combined Figure 20 As shown, when the user clicks the "Set as Lock Screen" control and sets the character as the foreground object 310 in the first wallpaper, or, in combination with... Figure 21 As shown, when the user clicks the application control to apply the first wallpaper, including the foreground object 310 and the background object 320, to the lock screen interface in portrait mode, the electronic device can perform first image processing on the first wallpaper and store the target wallpaper obtained after the first image processing in a cache location that corresponds to the first wallpaper.

[0177] Alternatively, the second wallpaper may be used only for display, or it may be stored in the cache of the electronic device and recalled when displayed.

[0178] It should be understood that, compared to performing first and second image processing on the first wallpaper after responding to a rotation operation, by performing first and second image processing on the first wallpaper simultaneously when clicking the "Set as Lock Screen" control or clicking the "Apply" control to apply the first wallpaper, and then obtaining and storing the second wallpaper, the second wallpaper can be directly called and displayed when needed, thus avoiding wasting the system resources of the electronic device.

[0179] Optionally, the second image processing may include, but is not limited to: centering the target wallpaper horizontally based on the screen size in landscape mode, and then performing image supplementation processing on the target wallpaper.

[0180] Exemplarily, the supplementary image processing can include, but is not limited to, copying or mirroring processing on partial content of the image, stretching processing on the image, and the like.

[0181] For example, when the first wallpaper is a depth-of-field wallpaper, which is divided into two layers of foreground objects and background objects, the target wallpaper after the first image processing also includes two layers of foreground objects and background objects, so that, when the second image processing is performed, the target wallpaper can be horizontally centered and arranged, and then the foreground objects and the background objects of the target wallpaper are processed in layers. The background objects can be processed by copying, mirroring, stretching, and the like, while the foreground objects can be processed by transparent supplementary image processing. In other words, the surrounding of the foreground objects is supplemented by transparent content, and only the layer in which the foreground objects are located needs to meet the size requirement of the horizontal screen state.

[0182] It should be understood that, after the supplementary image processing, the target wallpaper can meet the size requirement of the electronic device in the horizontal screen state while keeping the content of the target wallpaper unchanged.

[0183] It should be further understood that, when the background objects included in the target wallpaper are not background with a frame template, for example, the background is composed of pure color, lines, graphics, and the like, the above-mentioned supplementary image processing can be performed. If the background is a complex pattern or color, a network model, an AI algorithm, or the like can be used to learn appropriate supplementary image content for supplementary image processing, so as to ensure a natural transition of the content of the wallpaper. The specific learning method can be selected as required, and the embodiments of the present application do not limit the same.

[0184] In the embodiments of the present application, after the electronic device detects the rotation operation on the electronic device, the second wallpaper corresponding to the first wallpaper displayed before rotation can be called for display after rotation. Since the second wallpaper is obtained by performing first image processing on the first wallpaper to obtain a target wallpaper, and then performing second image processing on the target wallpaper, and since the target wallpaper and the first wallpaper include the same content and the second wallpaper includes the target wallpaper, the content of the second wallpaper displayed after rotation actually includes the content of the complete first wallpaper displayed before rotation, thereby avoiding the problem of incomplete content display caused by cropping in the related art. Therefore, by using the method for displaying a wallpaper provided in the embodiments of the present application, the content of the wallpaper can be displayed completely, thereby improving the user experience.

[0185] Optionally, as a first implementation manner, the first image processing can include scaling processing according to the ratio of the vertical edge size to the horizontal edge size of the electronic device in the vertical screen state.

[0186] It should be understood that the first wallpaper is scaled according to the ratio of the vertical to horizontal side dimensions of the electronic device in portrait mode. The vertical side dimension of the target wallpaper obtained after scaling is the same as the vertical side dimension of the electronic device in landscape mode.

[0187] For example, such as Figure 10 As shown in (a), the horizontal side of the electronic device in portrait mode is 2156px (also known as width), and the vertical side is 2344px (also known as height). Therefore, the size of the first wallpaper is 2156px × 2344px. By scaling the first wallpaper according to the ratio of the vertical side to the horizontal side of the electronic device in portrait mode, the vertical side of the first wallpaper can be changed from 2344px to 2156px, and the horizontal side can be changed from 2156px to 1983px. Thus, as shown in (a), the horizontal side of the first wallpaper is 2156px × 2344px. Figure 10 As shown in (b), the target wallpaper size is 1983px × 2156px.

[0188] Based on this, the required wallpaper size in landscape mode is determined to be 2344px × 2156px. Therefore, during the second image processing, after centering the target wallpaper horizontally, image supplementation can be performed on the left and right sides, increasing the horizontal size of the target wallpaper from 1983px to 2344px while ensuring the content is centered. Thus, as... Figure 10 As shown in (b), the dimensions of the second wallpaper are 2156px × 2344px.

[0189] Combination Figure 10 (a) and Figure 10 As shown in (b), since the difference between the vertical dimensions of the first wallpaper before scaling and the vertical dimensions of the target wallpaper after scaling (2344px and 2156px) is not significant, after scaling the first wallpaper, which is a depth-of-field wallpaper, in this way, the vertical dimensions of the foreground objects in the depth-of-field wallpaper change little, and the difference in the overlap height between the foreground objects and the widgets before and after scaling is also small and can be ignored.

[0190] Optionally, as a second possible implementation, before and after the rotation operation, the size of the widget on the screen is fixed, the distance between the widget and the top edge of the screen remains unchanged, and the first distance h1 between the top edge of the foreground object in the depth-of-field wallpaper and the top edge of the screen remains unchanged. Then, the first image processing can also perform proportional scaling processing according to a preset ratio. The preset ratio is the ratio of the first difference and the second difference. The first difference is the difference between the vertical dimension and the first distance h1 in portrait mode, and the second difference is the difference between the vertical dimension and the first distance h1 in landscape mode.

[0191] It should be understood that the distance between the widget and the top edge of the screen is unchanged before and after the screen rotation, and when the distance between the top edge of the foreground object in the depth-of-field wallpaper and the top edge of the screen is also unchanged, the relative position between the foreground object and the widget is fixed. For example, the foreground object occludes the widget by a certain height, and when the distance between the top edge of the foreground object and the top edge of the screen is unchanged, the height of the occlusion of the widget by the foreground object before and after the rotation can be unchanged, and thus, when the scaling processing is performed, the distance between the top edge of the foreground object and the top edge of the screen can be removed in the proportion calculation process.

[0192] In the embodiment, the widget can include a date component and a clock indicator.

[0193] For example, as shown in (a) of FIG. 13, the screen width of the electronic device in the portrait state is 2156px, and the screen height is 2344px, and thus the size of the first wallpaper is 2156px x 2344px. Assuming that the first distance h1 between the top edge of the foreground object and the top edge of the screen is 500px, the scaling ratio can be determined as (2156-500) / (2344-500)≈0.898, and after the scaling processing according to the ratio, as shown in (b) of FIG. 13, the size of the target wallpaper will be changed to 1936px x 2104px. Figure 11 Figure 11 On this basis, it can be determined that the wallpaper size requirement in the landscape state is 2344px x 2156px, and when the second image processing is performed, the target wallpaper can be horizontally centered and then bottom-aligned, that is, the bottom edge of the target wallpaper is aligned with the bottom edge of the screen in the landscape state, and then the top and left and right sides of the target wallpaper are supplemented, so that the horizontal size of the target wallpaper is increased from 1936px to 2344px, the vertical size of the target wallpaper is increased from 2104px to 2156px, and the content is complete and centered. As shown in (b) of FIG. 13, the size of the second wallpaper obtained is 2156px x 2344px.

[0194] On this basis, it can be determined that the wallpaper size requirement in the landscape state is 2344px x 2156px, and when the second image processing is performed, the target wallpaper can be horizontally centered and then bottom-aligned, that is, the bottom edge of the target wallpaper is aligned with the bottom edge of the screen in the landscape state, and then the top and left and right sides of the target wallpaper are supplemented, so that the horizontal size of the target wallpaper is increased from 1936px to 2344px, the vertical size of the target wallpaper is increased from 2104px to 2156px, and the content is complete and centered. As shown in (b) of FIG. 13, the size of the second wallpaper obtained is 2156px x 2344px. Figure 11

[0195] As shown in FIG. 13, because the first distance is removed when the scaling ratio is determined, the distance between the foreground object and the widget in the first wallpaper before scaling and the distance between the foreground object and the widget in the second wallpaper after scaling remain unchanged, so that the purpose of keeping the depth-of-field effect unchanged is achieved. Figure 11 The above is only an example of a first distance, and the embodiments of the present application are not limited thereto. Different scaling ratios can be determined in combination with the definition of different first distances, and then scaling processing can be performed according to different scaling ratios.

[0196]

[0197] ​​​It should be noted that, as shown in (b) of Figure 23 , if the wallpaper template applied by the user is the framed depth-of-field wallpaper template shown in style 2 or the unframed depth-of-field wallpaper template shown in style 3, the first distance between the top edge of the foreground object and the top edge of the screen is a fixed value. At this time, in the actual processing process, the electronic device can calculate the scaling ratio according to the fixed first distance in advance, and after the user clicks the application control, the scaling ratio is directly called for processing when the second wallpaper is determined according to the first wallpaper. As shown in Figure 22 , even if the wallpaper template applied by the user is the framed depth-of-field wallpaper template shown in style 2 or the unframed depth-of-field wallpaper template shown in style 3, the user adjusts the position of the foreground object and / or the position of the widget before clicking the application control. When the user clicks the application control, the electronic device can obtain the adjusted parameters of the user from the first wallpaper, and calculate the scaling ratio according to the adjusted parameters, and apply it to the process of determining the second wallpaper according to the first wallpaper.

[0198] In the embodiment of the present application, when the first wallpaper is a depth-of-field wallpaper, the method for displaying the wallpaper provided in the embodiment of the present application can ensure that the position of the foreground object after rotation that blocks the widget and the position of the foreground object before rotation that blocks the widget remain consistent in the first image processing process, thereby preserving the integrity of the wallpaper content while preserving the depth-of-field effect.

[0199] II. Take a non-depth-of-field wallpaper (ordinary wallpaper) as an example for description

[0200] Figure 12 A schematic diagram for displaying a non-depth-of-field wallpaper on a foldable screen phone is shown.

[0201] Specifically, the non-depth-of-field wallpaper can be applied to the outer screen of an outer-fold foldable screen in an unfolded state, or the inner screen of an inner-fold foldable screen in an unfolded state; the non-depth-of-field wallpaper can be applied in the lock screen interface, or also can be applied in the desktop.

[0202] For example, as shown in (a) of Figure 12 , a non-depth-of-field wallpaper is displayed in the current lock screen interface, the non-depth-of-field wallpaper includes a first display area 510, which can be used to display a picture customized by the user. Here, the first display area is a square area, of course, it can also be other shapes, and the present application does not limit this. The lock screen interface can also include a plurality of widgets, such as a clock indicator, a date, a lock screen control, a camera control, etc.

[0203] In the embodiments of the present application, the area of the lock screen interface other than the first display area can display the wallpaper template content of the electronic device, or can display preset content based on a wallpaper algorithm. For example, after the user selects a picture for display in the first display area, the area of the lock screen interface other than the first display area can be displayed with the dominant color in the picture as the fill color.

[0204] At present, whether it is the outer screen of the outer folding folding screen in the unfolded state or the inner screen of the inner folding folding screen, the screen is usually rectangular, and the sizes of the two adjacent sides are different. For example, Figure 12 (a) and Figure 12 (b) in FIG. 1, when the electronic device is switched from a portrait screen state to a landscape screen state, the wallpaper size is transformed, but no processing is performed on such a wallpaper in the related art, and the wallpaper is displayed in a center crop manner, resulting in that the entire wallpaper and the picture in the first display area are enlarged, thereby causing poor user experience effect.

[0205] Exemplarily, Figure 13 is a schematic diagram of a wallpaper size displayed in a portrait screen state related to the related art, Figure 14 is a schematic diagram of a wallpaper size displayed in a landscape screen state related to the related art. As shown in Figure 13 , assuming that the vertical size of the screen is 2344px and the horizontal size is 2156px, in the portrait screen state, the size of the first display area in the first wallpaper is assumed to be 1600px×1000px; when the electronic device is rotated from the portrait screen state to the landscape screen state, as shown in Figure 14 , the size of the first display area will be enlarged to 1739px×1087px with the center crop display of the wallpaper, that is, the picture size in the first display area in the second wallpaper is enlarged relative to the first wallpaper.

[0206] It can be known from the wallpaper shown in Figure 14 that although the enlarged second wallpaper can adapt to the screen size in the landscape screen state, the picture in the first display area is enlarged, thereby causing poor user experience effect.

[0207] In view of this, embodiments of this application provide a method for displaying wallpaper and an electronic device. In embodiments of this application, after the electronic device detects a rotation operation, a second wallpaper obtained by performing image supplementation processing on the first wallpaper displayed before rotation can be used for landscape display after rotation. Because image supplementation processing is performed after rotation, the size of the first element in the landscape state after rotation is reduced compared to the size of the first element in the portrait state, but the content is complete. Therefore, the second wallpaper displayed after rotation is equivalent to including the complete content of the first element in the first wallpaper before rotation, avoiding problems such as incomplete content display and enlarged content caused by cropping in related technologies. Thus, the method for displaying wallpaper provided by embodiments of this application can display wallpaper content completely and reasonably, improving the user experience.

[0208] For example, when the first wallpaper is a non-depth-of-field wallpaper, it can also be called a regular wallpaper. After processing by the method provided in this application embodiment, while adapting to the screen size in landscape mode, it can ensure that the image size in the displayed wallpaper is reasonable.

[0209] The following is combined Figure 15 to Figure 18 This application provides a detailed description of a method for displaying non-depth-of-field wallpapers.

[0210] For example, such as Figure 16 The lock screen interface of the electronic device shown in (a) is similar to... Figure 12 The lock screen interface shown in (a) is the same as the one in the previous example. This lock screen interface includes a first display area 510, which is the framed area in the framed wallpaper template. The first display area 510 can display an image with the content "mountain," or other custom images; this application does not limit this. The area before the first display area 510 is filled with a solid color. The content in the first display area can be static or dynamic; this application embodiment does not limit this. In other words, the lock screen interface can display dynamic or static ordinary wallpapers, ordinary wallpapers using framed or unframed wallpaper templates.

[0211] It should be understood that the above is an example of the application scenarios of ordinary wallpaper and does not limit the application scenarios of this application in any way.

[0212] Figure 15 This is a schematic flowchart illustrating a method for displaying wallpaper provided in an embodiment of this application. The method 600 can also be... Figure 1 The electronic device shown executes the method 600, which includes steps S610 to S650. Steps S610 to S650 are described in detail below.

[0213] Step S610: Display the first wallpaper in portrait mode.

[0214] Optionally, when the screen is on, the electronic device can display the first wallpaper in portrait mode.

[0215] For example, the screen-on operation is a user's click on the power button of an electronic device; in response to this click, the electronic device switches from a black screen to a lock screen, where the first wallpaper is displayed.

[0216] In this embodiment, the first wallpaper is a non-depth-of-field wallpaper.

[0217] Optionally, the first wallpaper can be a framed non-depth-of-field wallpaper or a frameless non-depth-of-field wallpaper. The first wallpaper can be a dynamic or static non-depth-of-field wallpaper.

[0218] For example, when an electronic device displays in portrait mode, such as Figure 16 In the non-depth-of-field wallpaper shown in (a), the content in the framed area (such as the first display area 510) of the framed non-depth-of-field wallpaper can be dynamic, while the area outside the frame filled with dotted patterns can be static.

[0219] For example, electronic devices displaying images in portrait mode... Figure 17 The non-depth-of-field wallpaper shown in (a) can have its image content (such as "mountain") in motion, while the areas filled with dotted patterns can be static.

[0220] Step S620: A rotation operation on the electronic device is detected.

[0221] For example, such as Figure 16 (a) and Figure 16 As shown in (b) above, or, as in Figure 17 (a) in Figure 17 As shown in (b), the rotation operation is an operation that allows an electronic device to be rotated from portrait mode to landscape mode.

[0222] Step S630: In response to the rotation operation, perform first image processing on the first non-depth-of-field wallpaper to obtain the target wallpaper.

[0223] Optionally, the target wallpaper may be a wallpaper obtained by the electronic device itself after performing a first image processing on the first non-depth-of-field wallpaper; or, the target wallpaper may refer to a wallpaper downloaded by the user through the electronic device, which is obtained by performing a first image processing on the first non-depth-of-field wallpaper; this application does not limit the source of the target wallpaper.

[0224] Optionally, the target wallpaper can be stored in a cache of the electronic device, or can be stored in a cloud server, and a download instruction is initiated by the electronic device in response to the rotation operation. The storage of the target wallpaper is not limited in the present application. Of course, the target wallpaper can also not be stored.

[0225] Optionally, the first image processing can include, but is not limited to, a scaling processing. The height of the wallpaper after the scaling processing is equal to the screen height in the horizontal screen state.

[0226] Optionally, the scaling ratio in the scaling processing can be a ratio of the screen height to the screen width in the horizontal screen state.

[0227] It should be understood that the first non-depth-of-field wallpaper is complete after the scaling processing, and the content of the wallpaper is guaranteed to be displayed in the horizontal screen state of the electronic device subsequently. Since the screen width in the horizontal screen state is larger than the screen height, when the height of the wallpaper after the scaling processing is equal to the screen height in the horizontal screen state, the width of the wallpaper after the scaling processing is also smaller than the screen width in the horizontal screen state. Therefore, the picture in the first display area of the target wallpaper is equivalent to being reduced in width and height.

[0228] Optionally, in combination with Figure 21 , when the user clicks the "set as lock screen" control and applies the picture to the first display area of the first non-depth-of-field wallpaper, or in combination with Figure 22 , when the user clicks the application control and applies the wallpaper including the picture in the first display area as the first non-depth-of-field wallpaper, the electronic device can perform the first image processing on the first non-depth-of-field wallpaper, and store the target wallpaper obtained after the first image processing in a cache location corresponding to the first non-depth-of-field wallpaper.

[0229] Step S640, performing second image processing on the target wallpaper to obtain a second non-depth-of-field wallpaper.

[0230] Step S650, displaying the second non-depth-of-field wallpaper in the horizontal screen state.

[0231] For example, the electronic device displays the second non-depth-of-field wallpaper with a frame as shown in (b) of Figure 16 , or displays the second non-depth-of-field wallpaper without a frame as shown in (b) of Figure 17 .

[0232] Optionally, the second non-depth-of-field wallpaper can be a wallpaper obtained by the electronic device itself performing second image processing on the target wallpaper; or the second non-depth-of-field wallpaper can be a wallpaper downloaded by the electronic device, which is obtained by performing the first image processing and the second image processing on the first non-depth-of-field wallpaper; the source of the second non-depth-of-field wallpaper is not limited in the present application.

[0233] Alternatively, the second non-depth-of-field wallpaper may be used only for display, or the second non-depth-of-field wallpaper may be stored in the cache of the electronic device and recalled when displayed.

[0234] It should be understood that, compared to performing first and second image processing on the first non-depth-of-field wallpaper after responding to a rotation operation, by performing first and second image processing on the first non-depth-of-field wallpaper simultaneously when clicking the set as lock screen control or clicking the application control to apply the first wallpaper, and obtaining and storing the second wallpaper, the second wallpaper can be directly called and displayed when needed, thus avoiding wasting the system resources of electronic devices.

[0235] Optionally, the second image processing may include, but is not limited to: after centering the target wallpaper horizontally based on the screen size in landscape mode, performing image supplementation processing on the left and right sides of the target wallpaper.

[0236] It should be understood that after the target wallpaper is processed, it can meet the size requirements when the electronic device is displayed in landscape mode, while ensuring that the content of the target wallpaper remains unchanged.

[0237] For example, such as Figure 18 As shown in (a), the screen height of the electronic device in landscape mode is 2156px and the screen width is 2344px. The size of the first non-depth-of-field wallpaper is 2156px × 2344px. The scaling ratio in the proportional scaling process is 2156px / 2344px ≈ 0.92. After scaling according to this ratio, as shown in (a), the screen height is 2156px and the screen width is 2344px. Figure 18 As shown in (b), the target wallpaper size will become 1984px × 2156px.

[0238] like Figure 18 As shown in (b), the target wallpaper's size does not meet the requirements for landscape mode. Therefore, a second image processing step is performed on the target wallpaper. First, the target wallpaper is centered based on the screen width in landscape mode. Then, the left and right sides of the target wallpaper are supplemented with additional images, thereby increasing the horizontal size of the target wallpaper from 1984px to 2344px. Thus, the size of the second wallpaper is 2156px × 2344px.

[0239] It should be noted that since the screen dimensions are fixed, in actual processing, electronic devices can pre-calculate the scaling ratio according to the screen dimensions. When the user clicks the application control and selects the second wallpaper based on the first wallpaper, the scaling ratio can be directly applied for processing.

[0240] In the embodiments of this application, after the electronic device detects a rotation operation on the electronic device, it can call the target wallpaper corresponding to the first non-depth-of-field wallpaper displayed before rotation, which has undergone the first image processing. Then, the second non-depth-of-field wallpaper obtained by the second image processing of the target wallpaper is used for display after rotation. Since the image included in the first non-depth-of-field wallpaper has undergone the first image processing along with the entire wallpaper, the height of the obtained target wallpaper is less than or equal to the screen height in landscape mode. The image in the target wallpaper is shrunk relative to the image in the first non-depth-of-field wallpaper, avoiding the problem of image magnification in related technologies. Therefore, the method of displaying wallpaper provided by the embodiments of this application can display the image in the wallpaper at an appropriate size, improving the user experience.

[0241] The following is combined with Figure 19 to Figure 24 This document provides an example description of the interface diagram and module interaction flow for setting wallpapers on electronic devices.

[0242] For example, such as Figure 19 As shown, Figure 19 The graphical user interface (GUI) shown in (a) is the desktop 701 of the electronic device; the electronic device detects that the user clicks on the control 702 of the gallery application on the desktop 701, such as... Figure 19 As shown in (b); when the electronic device detects that the user clicks on the control 702 of the Gallery application on the desktop 701, it displays as shown in (b); Figure 19 The gallery display interface shown in (c) is an image 703, which includes a person.

[0243] The electronic device detected a user clicking on image 703, such as... Figure 19 As shown in (d) in the image; after the electronic device detects the user's click on image 703, it displays as shown in the image. Figure 20 The image preview interface shown in (a) includes a share control, a favorite control, an edit control, a delete control, and more controls 705. The electronic device detects the user's click on the more controls 705, such as... Figure 20 As shown in (b) above; after the electronic device detects the user's click on the more controls 705, it displays as shown below. Figure 20 The display interface 706 shown in (c) is included in the display interface 706; the display interface 706 includes a display window 707; the display window 707 includes controls such as a set-to-control and a rotation control; the electronic device detects that the user clicks on a control in the display window 707, such as... Figure 20 As shown in (d) in the figure.

[0244] When the electronic device detects that the user has clicked "Set as Control" in display window 707, it displays as follows:Figure 21 The display interface 708 shown in (a) includes a wallpaper control 709, a partial always-on display control, and a contact control. The electronic device detects the user's tap on the wallpaper control 709, such as... Figure 21 As shown in (b) above; after the electronic device detects the user's click on the wallpaper control 709, it displays as shown in (b). Figure 21 The display interface 710 shown in (c) includes a menu card 711, which includes options for "Set as Lock Screen Control," "Set as Desktop Control," and "Set Control Simultaneously." The electronic device detects that the user clicks the "Set as Lock Screen Control" option in the menu card 711. Figure 21 As shown in (d) in the figure.

[0245] After the electronic device detects the user's click to set it as a lock screen control, it displays the following: Figure 22 The lock screen wallpaper preview interface shown in (a) includes a back control, an application control 712, an image change control, a lock screen style control, a depth-of-field effect control, and a preview area for displaying the lock screen interface. Here, since the image 703 selected by the user includes a person, in response to a click operation on the lock screen control, after recognizing that image 703 includes a person, the electronic device can present the person in image 703 with a depth-of-field effect in the preview area of ​​the lock screen wallpaper interface. That is, in the preview area of ​​the lock screen interface, the person in image 703 will be used as a foreground object, located in front of the widget, partially obscuring the widget. Additionally, a background object can be added to the preview area of ​​the lock screen interface, located behind the widget. The background object can be partially obscured by the widget, for example, in... Figure 22 In the preview area of ​​the lock screen interface shown, the mountains and water included in the elliptical area, and the area outside the elliptical area filled with dotted patterns, can be used as background objects.

[0246] The electronic device detects the user's click on the application control 712, such as... Figure 22 As shown in (b) of the document; when the electronic device detects that the user clicks on the application control 712, the electronic device can execute the wallpaper display method provided in this application embodiment. For example, based on the depth-of-field wallpaper in the portrait mode, a first image processing is performed on the depth-of-field wallpaper to generate a target wallpaper, and then a second image processing is performed on the target wallpaper to generate a second wallpaper and store it; in response to the rotation operation of the electronic device, the second wallpaper is called and displayed in the landscape mode.

[0247] For example, such as Figure 23 As shown, Figure 23The interface shown in (a) of FIG. 7A is another lock screen wallpaper preview interface. Since the picture selected by the user is a landscape picture, the depth-of-field effect is not enabled by default.

[0248] Here, the electronic device detects an operation of the user clicking the lock screen style control 713, as shown in (a) of FIG. 7B. Figure 23 After the electronic device detects the operation of the user clicking the lock screen style control 713, an interface as shown in (b) of FIG. 7B is displayed, in which a lock screen style menu is superimposedly displayed. The lock screen style menu can include a plurality of thumbnails indicating different lock screen styles, for example, style 1, style 2, and style 3, etc. Figure 23

[0249] It should be understood that the plurality of styles are wallpaper templates, and the user can select the wallpaper templates as needed. Style 1 can be a non-depth-of-field wallpaper template, in which the middle square region is used to display a template picture, which can be replaced by any custom picture in response to a click operation on the update picture control. Style 2 can be a depth-of-field wallpaper template, in which the middle oval region is used to display a template picture, which can be replaced by any custom picture in response to a click operation on the update picture control. Style 3 can be another depth-of-field wallpaper template, in which an irregular template picture can be displayed, which can be replaced by any custom picture in response to a click operation on the update picture control. Here, the foreground object identified by the template picture is equivalent to an irregular picture displayed.

[0250] The electronic device detects an operation of the user clicking the first thumbnail 714, as shown in (b) of FIG. 7C. Figure 23 After the electronic device detects the operation of the user clicking the first thumbnail 714, an interface as shown in (c) of FIG. 7C is displayed, which has the same layout as the lock screen wallpaper preview interface shown in (a) of FIG. 7A, and includes the same picture, but the presentation of the picture in the preview region of the lock screen interface is different in (c) of FIG. 7C. Figure 23 Figure 23 Figure 23 For example, the picture is displayed in a rectangular frame.

[0251] The electronic device detects an operation of the user clicking the application control 712, as shown in (a) of FIG. 7D. Figure 23 ​​​As shown in (d) in the figure, when the electronic device detects the operation of the user clicking the application control 712, the electronic device can perform the method for displaying a wallpaper provided in the embodiments of the present application, such as generating a target wallpaper by performing first image processing on the non-depth-of-field wallpaper in the portrait state, performing second image processing on the target wallpaper to generate a second non-depth-of-field wallpaper, and storing the second non-depth-of-field wallpaper; in response to the rotation operation of the electronic device, the second non-depth-of-field wallpaper is called and displayed in the landscape state.

[0252] It should be understood that the above is exemplified by taking the display interface for setting an image as a lock screen wallpaper in the electronic device; the method for displaying a wallpaper provided in the embodiments of the present application is also applicable to the screen-off display, desktop display, and the like of the electronic device; the present application does not limit this.

[0253] Exemplarily, as shown in (d) in the figure, in the embodiments of the present application, the process of displaying a wallpaper in the software architecture layer is as follows: Figure 24

[0254] S801, the gallery application can detect that the user sets a first wallpaper in a portrait state.

[0255] It should be understood that the process of setting a custom picture as the first wallpaper in the portrait state can refer to the description of the process of setting a custom picture as the first wallpaper in the portrait state, which will not be described herein again. Figure 19 to Figure 23

[0256] S802, in response to setting the custom wallpaper, the gallery application can notify the lock screen application that the wallpaper has changed through an access interface in the application framework layer, such as executing onWallpaperChanged.

[0257] S803, the lock screen application executes an update operation, such as executing postUpdateWallpaper.

[0258] S804, the lock screen application executes a running method of the lock screen wallpaper, such as executing the run method in LockscreenWallpaper.

[0259] At the same time of executing the running method of the lock screen wallpaper, the lock screen application starts an asynchronous task Async Task, and executes an “update wallpaper double cache method” in the result callback onPostExecute, such as executing the UpdateDoubleWallpaperCache method.

[0260] It should be understood that the lock screen wallpaper is the wallpaper in the lock screen interface. After the lock screen application executes the running method of the lock screen wallpaper, the lock screen interface displayed by the electronic device in the portrait state includes the first wallpaper, which is the lock screen wallpaper at this time.

[0261] ​​S805, the lock screen application calls the loadLandscapeCache method to load the cache mFullLandscapeDepthBgCache.

[0262] S806, the lock screen application determines whether the updated wallpaper belongs to a preset type of wallpaper.

[0263] For example, the lock screen application can determine that the updated wallpaper belongs to a framed depth-of-field wallpaper as shown in Figure 7 Figure 8 an unframed depth-of-field wallpaper as shown in Figure 16 a framed ordinary wallpaper as shown in Figure 17 an unframed ordinary wallpaper as shown in

[0264] S807, when it is determined that the updated wallpaper belongs to a preset type of wallpaper, the lock screen application notifies the hardware abstraction module to process the first wallpaper.

[0265] It should be noted that when it is determined that it does not belong to a preset type of wallpaper, the existing processing operation is performed. For example, as shown in (b) of Figure 23 the display interface, when it is determined that the updated wallpaper is an official wallpaper, it can be processed according to the existing corresponding mode (such as zooming and then cropping) to adapt to the size of the horizontal and vertical screens.

[0266] S808, the hardware abstraction module performs first image processing and second image processing on the first wallpaper, the first image processing being, for example, scaling processing, and the second image processing being, for example, patch processing, so that a second wallpaper adapted to the horizontal screen state can be obtained.

[0267] Optionally, when the lock screen application performs the changing operation in S803, the lock screen application can simultaneously determine whether the updated wallpaper belongs to a preset type of wallpaper. In addition, in order to facilitate subsequent scaling processing, the lock screen application can also obtain processing-related parameters in this process, such as determining a first distance from the top edge of the widget to the top edge of the screen in the vertical screen state, so as to facilitate subsequent determination of the scaling ratio based on the first distance.

[0268] S809, the hardware abstraction module delivers the processing result to the cache for storage, that is, the second wallpaper is stored as a cache.

[0269] For example, after calling the patch solution getShaderBitmap in the second image processing algorithm to obtain the Bitmap (i.e., the second wallpaper) after patching, the Bitmap is stored as a cache.

[0270] S810, the lock screen application displays the first wallpaper in the lock screen interface in the vertical screen state.

[0271] It should be understood that the display of the first wallpaper in the lock screen interface in the vertical screen state can refer to the display of the first wallpaper in the lock screen interface in the vertical screen state in the embodiments of the lock screen application.​Figure 7 (a) Figure 8 (a) Figure 16 (a) Figure 17 The description of the first wallpaper shown in (a) will not be repeated here.

[0272] S811, In response to the user's rotation operation on the electronic device, the lock screen application calls the cached Bitmap for display, that is, displays the second wallpaper in the lock screen interface in landscape mode.

[0273] It should be understood that displaying a second wallpaper on the lock screen in landscape mode can be referenced from [the relevant documentation / reference]. Figure 7 (b) Figure 8 (b) Figure 16 (b) Figure 17 The description of the second wallpaper shown in (b) will not be repeated here.

[0274] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values ​​or scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of this application.

[0275] Optionally, this application also provides a computer program product that, when executed by a processor, implements the method for displaying wallpaper in any of the method embodiments of this application.

[0276] For example, the computer program product can be stored in memory, such as a program, which is eventually converted into an executable object file that can be executed by a processor after processes such as preprocessing, compilation, assembly and linking.

[0277] Optionally, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the method for displaying wallpaper as described in any of the method embodiments of this application. The computer program may be a high-level language program or an executable object program.

[0278] For example, the computer readable storage medium is, for example, a memory. The memory can be a volatile memory or a non-volatile memory, or the memory can include both volatile and non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM) and direct rambus RAM (DR RAM).

[0279] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0280] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0281] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the embodiments of the electronic device described above are merely illustrative. For example, the division of the modules is merely a logical function division. There can be another division manner for the actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0282] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0283] In addition, the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0284] It should be understood that in various embodiments of the present application, the size of the sequence of each process does not mean the execution order, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0285] In addition, the term "and / or" in this paper is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.

[0286] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0287] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims. In summary, the above is only a preferred embodiment of the technical solutions of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method of displaying a wallpaper, characterized by, The method is applied to an electronic device, and the method comprises: displaying a first display interface in a portrait screen state, the first display interface comprising a first wallpaper and at least one component, the first wallpaper comprising a first element; the size of the first wallpaper being the same as the size of the screen in the portrait screen state; detecting a rotation operation on the electronic device; in response to the rotation operation, displaying a second display interface in a landscape screen state, the second display interface comprising a second wallpaper and the component, the second wallpaper comprising the first element, wherein the second wallpaper is obtained by performing at least a padding processing on the first wallpaper, the size of the second wallpaper being the same as the size of the screen in the landscape screen state; the second wallpaper being different from the first wallpaper in a second display direction of the electronic device.

2. The method of claim 1, wherein, Before displaying the first display interface in the portrait screen state, the method further comprises: in response to an operation of applying the first wallpaper on the electronic device, applying the first wallpaper on the electronic device, and performing a padding processing on the first wallpaper to obtain and store the second wallpaper.

3. The method of claim 2, wherein, performing the padding processing on the first wallpaper to obtain and store the second wallpaper, comprising: performing an equal-ratio scaling processing on the first wallpaper to obtain a target wallpaper; performing the padding processing on the target wallpaper to obtain and store the second wallpaper; wherein the height of the target wallpaper is less than or equal to the height of the screen in the landscape screen state; and the local content of the second wallpaper comprises all the content of the target wallpaper.

4. The method of claim 3, wherein, when the first wallpaper is a non-depth-of-field wallpaper, the scaling ratio in the equal-ratio scaling processing is the ratio of the height of the screen to the width of the screen in the landscape screen state.

5. The method of claim 3, wherein, when the first wallpaper is a depth-of-field wallpaper, the scaling ratio in the equal-ratio scaling processing is the ratio between the difference between the height of the screen and a first distance in the landscape screen state and the difference between the width of the screen and the first distance in the landscape screen state.

6. The method of claim 5, wherein, the first distance is the distance from the top edge of the first element to the top edge of the screen.

7. The method of any one of claims 3 to 6, wherein, when the first wallpaper is a non-depth-of-field wallpaper, the padding processing comprises: centering the target wallpaper based on the width of the screen in the landscape screen state; and padding the left and right sides of the target wallpaper. when the first wallpaper is a depth-of-field wallpaper, the padding processing comprises: centering the target wallpaper based on the width of the screen in the landscape screen state, and aligning the bottom edge of the target wallpaper with the bottom edge of the screen in the landscape screen state; and padding the top and left and right sides of the target wallpaper.

8. The method of any one of claims 3 to 6, wherein, the first display interface and the second display interface are both lock screen interfaces or both desktops. the at least one component comprises one or more of weather information, sports information, health information, a date, a clock indicator, a font, a number, an image, music, or a video.

9. The method of any one of claims 1 to 8, wherein, when the first wallpaper is a depth-of-field wallpaper, the first element is a foreground object identified from a custom picture.

10. The method of any one of claims 1 to 9, wherein, when the first wallpaper is a non-depth-of-field wallpaper, the first element is a custom picture.

11. The method of any one of claims 1 to 10, wherein, when the first wallpaper is a template wallpaper, a template picture included in the template wallpaper is replaced by a custom picture.

12. The method of any one of claims 1 to 11, wherein, comprises:

13. The method of claim 11 or 12, wherein, ​ 14. An electronic device, comprising: ​ one or more processors, and a memory; The memory is coupled with the one or more processors, and the memory is configured to store computer program codes including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method according to any one of claims 1 to 13.

15. The electronic device of claim 14, wherein, The electronic device is a foldable-screen electronic device, and the foldable-screen electronic device includes a first display screen and a second display screen foldable along a folding axis, and the portrait screen state is used to indicate that the first display screen and the second display screen are unfolded in the same plane and the axial direction of the folding axis is vertical, and the landscape screen state is used to indicate that the first display screen and the second display screen are unfolded in the same plane and the axial direction of the folding axis is horizontal.

16. A chip system, characterized by The chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform the method according to any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that, The computer readable storage medium includes instructions configured to cause the electronic device to perform the method according to any one of claims 1 to 13 when the instructions are run on the electronic device.