Wallpaper preview interface display method and electronic device
By designing the folded state wallpaper as part of the expanded state wallpaper when setting up wallpaper in the folding screen electronic device, and uniformly displaying the wallpaper preview interface when the device state changes, the problem of jumping the wallpaper image when the state is switched is solved, and a coherent visual experience is achieved.
Patent Information
- Application Number
- CN202310919211.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2043-07-24
AI Technical Summary
In folding screen electronic devices, when the wallpaper image switches from the expanded state to the folded state or vice versa, the wallpaper image jumps, unable to provide a coherent visual experience.
Provides a method for displaying wallpaper preview interface, by ensuring that the folded state wallpaper is part of the expanded state wallpaper when setting the wallpaper, and uniformly displaying the wallpaper preview interface when the device state changes to provide a coherent visual experience.
When the state of the electronic device changes, ensure the consistency of wallpaper images and provide a smoother visual experience.
Smart Images

Figure CN117724627B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a wallpaper preview interface display method and an electronic device. Background Art
[0002] Electronic devices are becoming more and more versatile and their forms are becoming more and more diverse. At present, some manufacturers have applied flexible screens to electronic devices. Flexible screens can also be called flexible OLEDs (organic light-emitting diodes). Compared with traditional screens, flexible screens are not only thinner and lighter in size, but also much more durable than traditional screens due to their bendability and flexibility. Figure 1 As shown, the user can fold the electronic device with a flexible screen along one or more virtual straight lines, and can also fold it at different angles. A complete flexible screen can be divided into multiple screens for use after folding. An electronic device with a flexible screen is also called a folding screen electronic device.
[0003] Foldable screen electronic devices can be unfolded for use or folded along one or more folding lines for use. Figure 2 (a), the electronic device is in an unfolded state. The user moves along a folding line. Figure 2 The electronic device shown in (a) is folded. Figure 2 As shown in (b), after the user folds the electronic device along the folding line AB, the flexible screen of the electronic device is divided into two display areas along the folding line AB. The two folded display areas can be displayed as two independent display areas. For example, one display area can be called the main screen and the other display area can be called the sub-screen. The display areas of the main screen and the sub-screen can be the same or different. There is an angle α between the main screen and the sub-screen. The user can continue to fold the electronic device along the folding line AB. When the angle α approaches 0, as shown in FIG. Figure 2 As shown in (c), the electronic device is in a folded state. That is, the screen state of the electronic device may include an unfolded state and a folded state.
[0004] Electronic devices can display wallpapers, such as desktop wallpapers and lock screen wallpapers. In the expanded state, the entire screen of the electronic device displays the wallpaper; in the folded state, a partial area of the screen of the electronic device displays the wallpaper, for example, the main screen of the electronic device displays the wallpaper, and the secondary screen of the electronic device is turned off. In the embodiment of the present application, the wallpaper displayed in the expanded state of the electronic device is called the expanded wallpaper, and the wallpaper displayed in the folded state of the electronic device is called the folded wallpaper. Users can set the expanded wallpaper and folded wallpaper according to their preferences.
[0005] In one implementation, the expanded wallpaper and the folded wallpaper can be set independently, and there is no restriction between the two. In the case where the expanded wallpaper and the folded wallpaper are independent of each other, when the electronic device displays the wallpaper, if the electronic device is expanded from the folded state to the expanded state, or the electronic device is folded from the expanded state to the folded state, the wallpaper image will jump, and a coherent visual experience cannot be provided to the user. Summary of the invention
[0006] The embodiments of the present application provide a wallpaper preview interface display method and an electronic device, wherein the folded wallpaper is a part of the expanded wallpaper. If the state of the electronic device changes during the wallpaper setting, a wallpaper preview interface with a unified visual effect can also be provided to the user.
[0007] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0008] In a first aspect, a wallpaper preview interface display method is provided, which is applied to a folding screen electronic device, the folding screen electronic device includes an unfolded state and a folded state, and the method includes: the folding screen electronic device displays a first interface for selecting the wallpaper of the folding screen electronic device; in response to the selection operation of the first picture in the first interface, the folding screen electronic device displays a second interface in the first state (unfolded state or folded state); the second interface is used to set the wallpaper of the folding screen electronic device in the first state, and the second interface includes a first preview interface for displaying a preview image of the wallpaper in the first state. When the first preview image is displayed on the first preview interface, the folding screen electronic device receives a first operation; in response to the first operation, the folding screen electronic device displays a third interface; the third interface is used to set the wallpaper of the folding screen electronic device in the second state, and the third interface includes a second preview interface, and the second preview interface is used to display a preview image of the wallpaper in the second state. Among them, the second state is an unfolded state or a folded state, and the second state is different from the first state. That is, when the first state is an unfolded state, the second state is a folded state; when the first state is a folded state, the second state is an unfolded state.
[0009] Among them, the wallpaper of the foldable screen electronic device in the unfolded state includes the wallpaper of the foldable screen electronic device in the folded state.
[0010] In the method, when the electronic device is in the expanded state, it can provide an expanded wallpaper setting interface (including an expanded wallpaper preview interface when the electronic device is in the expanded state) and a folded wallpaper setting interface (including a folded wallpaper preview interface when the electronic device is in the expanded state); when the electronic device is in the folded state, it can also provide an expanded wallpaper setting interface (including an expanded wallpaper preview interface when the electronic device is in the folded state) and a folded wallpaper setting interface (including a folded wallpaper preview interface when the electronic device is in the folded state).
[0011] When the electronic device displays the wallpaper preview interface in the first state in the first state, it can switch to displaying the wallpaper preview interface in the second state in response to the user's first operation. When the electronic device displays the wallpaper preview interface in the second state, the electronic device may still be in the first state or in the second state (i.e., the screen state switching occurs).
[0012] No matter which of the four wallpaper preview interfaces is displayed by the electronic device, or when switching between the wallpaper preview interfaces, the folded wallpaper can be a part of the expanded wallpaper.
[0013] In this way, when the electronic device displays the wallpaper, if the electronic device is unfolded from the folded state to the unfolded state, or the electronic device is folded from the unfolded state to the folded state, a more coherent visual experience can be provided to the user.
[0014] In combination with the first aspect, in one implementation, the first preview image corresponds to a first zoom ratio of the first image, and the preview image displayed on the second preview interface corresponds to a second zoom ratio of the first image, where the second zoom ratio is obtained by correcting the first zoom ratio according to a height of the second preview interface and a height of the first preview interface.
[0015] In the method, the height of the expanded wallpaper preview interface when the electronic device is in the expanded state is different from the height of the folded wallpaper preview interface when the electronic device is in the expanded state, and the height of the expanded wallpaper preview interface when the electronic device is in the folded state is different from the height of the folded wallpaper preview interface when the electronic device is in the folded state; that is, the height of the expanded wallpaper preview interface when the electronic device is in the expanded state is different from the height of the expanded wallpaper preview interface when the electronic device is in the folded state, and the height of the folded wallpaper preview interface when the electronic device is in the expanded state is different from the height of the folded wallpaper preview interface when the electronic device is in the folded state.
[0016] By correcting the first zoom ratio according to the height of the second preview interface and the height of the first preview interface to obtain the second zoom ratio, the image corresponding to the expanded wallpaper preview interface can be consistent with the image corresponding to the expanded wallpaper, and the image corresponding to the folded wallpaper preview interface can be consistent with the image corresponding to the folded wallpaper.
[0017] In combination with the first aspect, in one embodiment, if the folding screen electronic device is in the second state when displaying the third interface, a third zoom ratio is obtained, and the third zoom ratio is obtained by correcting the first zoom ratio according to the height of the third preview interface and the height of the first preview interface; the third preview interface is a preview interface in the fourth interface displayed by the folding screen electronic device in the first state, and the fourth interface is used to set the wallpaper of the folding screen electronic device in the second state; then the second zoom ratio is obtained according to the third zoom ratio.
[0018] In the method, when the electronic device displays the wallpaper preview interface in the first state in the first state, in response to the user's first operation, the electronic device is switched to display the wallpaper preview interface in the second state in the second state. That is, the screen state changes during the setting of the expanded state wallpaper and the folded state wallpaper.
[0019] In this case, after the wallpaper in the first state is set, the image zoom ratio after correction (third zoom ratio) is obtained according to the image zoom ratio corresponding to the wallpaper preview interface in the first state, and the third zoom ratio is the image zoom ratio applicable when the electronic device sets the wallpaper in the second state in the first state. When the electronic device sets the wallpaper in the second state in the second state, the third zoom ratio is corrected for the second time to obtain the second zoom ratio; the second zoom ratio is the image zoom ratio applicable when the electronic device sets the wallpaper in the second state in the second state.
[0020] In combination with the first aspect, in an implementation manner, acquiring the second zoom ratio according to the third zoom ratio includes: correcting the third zoom ratio according to a height of the second preview interface and a height of the third preview interface to acquire the second zoom ratio.
[0021] In combination with the first aspect, in one implementation, when drawing a first frame preview image of the second preview interface, a second zoom ratio is obtained.
[0022] In this method, the wallpaper set later (the wallpaper in the second state) obtains shared parameters (including the zoom ratio corresponding to the image) only when the first frame is drawn; the locally saved private data can be used in the subsequent drawing process, and there is no need to care about the shared parameters; this method not only ensures the association and restriction relationship between the wallpaper set later (the wallpaper in the second state) and the wallpaper set earlier (the wallpaper in the first state), but also achieves decoupling in the adjustment process of the wallpaper in the second state and the wallpaper in the first state.
[0023] In combination with the first aspect, in one implementation, the first preview image corresponds to the first area in the first picture, the preview image displayed in the second preview interface corresponds to the second area in the first picture, and the first area and the second area have the same height. In this way, when the electronic device is unfolded from a folded state to an unfolded state, or when the electronic device is folded from an unfolded state to a folded state, the visual effect of switching between the folded state wallpaper and the unfolded state wallpaper can be more coherent.
[0024] In combination with the first aspect, in one embodiment, the size of the first area is the same as the size of the display area of the folding screen electronic device in the unfolded state, and the size of the second area is the same as the size of the display area of the folding screen electronic device in the folded state.
[0025] In combination with the first aspect, in one implementation, the first preview image is set as the wallpaper of the folding screen electronic device in the first state, and the second preview image in the second preview interface is set as the wallpaper of the folding screen electronic device in the second state.
[0026] In conjunction with the first aspect, in one embodiment, the first operation includes an operation of changing the folding screen electronic device from a first state to a second state, for example, unfolding the electronic device from a folded state to an unfolded state, or folding the electronic device from an unfolded state to a folded state.
[0027] In a second aspect, an electronic device is provided, which has the function of implementing the method described in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0028] In a third aspect, an electronic device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to enable the electronic device to perform a method as described in any one of the above-mentioned first aspects.
[0029] In a fourth aspect, an electronic device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute a method as described in any one of the above-mentioned first aspects according to the instructions.
[0030] In a fifth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer can execute any of the methods described in the first aspect.
[0031] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect.
[0032] In a seventh aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
[0033] Among them, the technical effects brought about by any design method in the second to seventh aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of an electronic device to which the wallpaper preview interface display method provided in an embodiment of the present application is applicable;
[0035] Figure 2 A schematic diagram of an electronic device to which the wallpaper preview interface display method provided in an embodiment of the present application is applicable;
[0036] Figure 3 A schematic diagram of a wallpaper preview interface display method;
[0037] Figure 4 A schematic diagram of a wallpaper preview interface display method;
[0038] Figure 5 A schematic diagram of a wallpaper preview interface display method provided in an embodiment of the present application;
[0039] Fig. 6A A schematic diagram of the principle of the wallpaper preview interface display method provided in an embodiment of the present application;
[0040] Figure 6B A schematic diagram of the principle of the wallpaper preview interface display method provided in an embodiment of the present application;
[0041] Figure 6C A schematic diagram of the principle of the wallpaper preview interface display method provided in an embodiment of the present application;
[0042] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0043] Fig. 8A A schematic diagram of a scenario example of the wallpaper preview interface display method provided in an embodiment of the present application;
[0044] Figure 8B A schematic diagram of a scenario example of the wallpaper preview interface display method provided in an embodiment of the present application;
[0045] Fig. 9A A schematic diagram of a scenario example of the wallpaper preview interface display method provided in an embodiment of the present application;
[0046] Fig. 9B A schematic diagram of a scenario example of the wallpaper preview interface display method provided in an embodiment of the present application;
[0047] Fig. 10A A schematic diagram of the principle of the wallpaper preview interface display method provided in an embodiment of the present application;
[0048] Fig. 10B A schematic diagram of the principle of the wallpaper preview interface display method provided in an embodiment of the present application;
[0049] Fig.11 A schematic diagram of a flow chart of a wallpaper preview interface display method provided in an embodiment of the present application;
[0050] Fig. 12A A schematic diagram of a scenario example of a wallpaper preview interface display method provided in an embodiment of the present application;
[0051] Fig. 12B A schematic diagram of a scenario example of a wallpaper preview interface display method provided in an embodiment of the present application;
[0052] Fig.13A A schematic diagram of a scenario example of a wallpaper preview interface display method provided in an embodiment of the present application;
[0053] Fig. 13B A schematic diagram of a scenario example of a wallpaper preview interface display method provided in an embodiment of the present application;
[0054] Fig.14 A schematic diagram of a scenario example of a wallpaper preview interface display method provided in an embodiment of the present application;
[0055] Fig.15 A flowchart of a wallpaper drawing process in the wallpaper preview interface display method provided in an embodiment of the present application;
[0056] Fig.16 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and the appended claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include such expressions as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are a kind of "or" relationship.
[0058] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0059] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0060] In one implementation, the expanded wallpaper and the folded wallpaper can be set independently, and there is no restriction between the two. Figure 3 , set picture 1 as the expanded wallpaper and picture 2 as the folded wallpaper. The expanded wallpaper and folded wallpaper come from two different pictures. For example, refer to Figure 4 , the first area of a picture is set as an expanded wallpaper, and the second area of the picture is set as a folded wallpaper. There is no restriction between the first area and the second area of the picture.
[0061] The wallpaper preview interface display method provided in the embodiment of the present application uses a first image corresponding to a first area of a picture as an expanded wallpaper, and uses a second image corresponding to a second area of the picture as a folded wallpaper, wherein the second image is a part of the first image.
[0062] For example, Figure 5As shown, the first area of the picture is used as the expanded wallpaper, and the second area of the picture is used as the folded wallpaper; the first area completely contains the second area. In this way, when the electronic device displays the wallpaper, if the electronic device is unfolded from the folded state to the expanded state, or the electronic device is folded from the expanded state to the folded state, a more coherent visual experience can be brought to the user. For example, when the electronic device is unfolded from the folded state to the expanded state, the dynamic effect of the folded wallpaper stretching to the expanded state wallpaper is displayed; for example, when the electronic device is folded from the expanded state to the folded state, the dynamic effect of the expanded state wallpaper shrinking to the folded state wallpaper is displayed; because the folded state wallpaper is part of the expanded state wallpaper, the dynamic effect is coherent and the user experience is better.
[0063] In one implementation, reference Fig. 6A , the first image is used to generate an expanded wallpaper, the width W1 of the first image is the width of the expanded wallpaper (i.e. the width of the display area of the electronic device in the expanded state), and the height H1 of the first image is the height of the expanded wallpaper (i.e. the height of the display area of the electronic device in the expanded state). The second image is used to generate a folded wallpaper, the width W2 of the second image is the width of the folded wallpaper (i.e. the width of the display area of the electronic device in the folded state), and the height H2 of the second image is the height of the folded wallpaper (i.e. the height of the display area of the electronic device in the folded state). Exemplarily, the height of the display area of the electronic device in the expanded state is equal to the height of the display area of the electronic device in the folded state, therefore, the height H1 of the first image is the same as the height H2 of the second image. Furthermore, the image zoom ratios corresponding to the first image and the second image are the same, so that the image zoom ratios of the expanded wallpaper and the folded wallpaper can be consistent.
[0064] Exemplarily, the coordinates of the center point of the first image in the image coordinate system are (X1, Y1), and the coordinates of the center point of the second image in the image coordinate system are (X2, Y2). In one example, Y1 is equal to Y2. In this way, the folded wallpaper can be part of the unfolded wallpaper.
[0065] refer to Figure 6B , the distance between the left border of the first image and the left border of the second image is recorded as the offset Offset. Since the second image is part of the first image and the second image has the same height as the first image, the second image can be obtained according to the first image and the value of Offset. In this way, the second image can be easily obtained according to the picture, the first image and the value of Offset, and the first image is set as the expanded wallpaper, and the second image is set as the folded wallpaper.
[0066] Wherein, Offset = (W1-W2) / 2-(X1-X2)*Correction coefficient. W1 is the width of the display area when the electronic device is in the unfolded state, W2 is the width of the display area when the electronic device is in the folded state, X1 is the width coordinate (horizontal coordinate) value of the center point of the first image (unfolded wallpaper) in the picture coordinate system, X2 is the width coordinate (horizontal coordinate) value of the center point of the second image (folded wallpaper) in the picture coordinate system, and the correction coefficient is used to convert from the picture coordinate system to the electronic device screen coordinate system.
[0067] The value range of Offset is: 0<=Offset<=(W1-W2). When the left border of the first image coincides with the left border of the second image, Offset=0; when the right border of the first image coincides with the right border of the second image, Offset=(W1-W2).
[0068] The electronic device may provide a user interface for setting the expanded wallpaper and the folded wallpaper.
[0069] The wallpaper preview interface display method provided in the embodiment of the present application does not allow the image zoom ratio, the height of the second area (second image), and the height coordinate (vertical coordinate) of the center point of the second area (second image) to be modified when the folded wallpaper (second image) is set after the expanded wallpaper (first image) is set; only the second area (second image) is allowed to be moved left and right, and the left border of the second image cannot exceed the left border of the first image, and the right border of the second image cannot exceed the right border of the first image.
[0070] After setting the folded wallpaper (second image), when setting the expanded wallpaper (first image), the image zoom ratio, the height of the first area (first image), and the height coordinate (vertical coordinate) of the center point of the first area (first image) are not allowed to be modified; only the first area (first image) is allowed to be moved left and right, and the left border of the second image cannot exceed the left border of the first image, and the right border of the second image cannot exceed the right border of the first image.
[0071] For example, Figure 6C As shown, the upper and lower boundaries of the first image and the second image overlap, the left boundary of the second image cannot exceed the left boundary of the first image, and the right boundary of the second image cannot exceed the right boundary of the first image. The second image is a part of the first image, and the height of the second image is the same as that of the first image.
[0072] In some implementations, the expanded wallpaper is set first, and then the folded wallpaper is set. When setting the folded wallpaper, the height and image zoom ratio of the folded wallpaper are locked to be consistent with the expanded wallpaper, and the selection area of the folded wallpaper can only be adjusted left and right. In the process of adjusting the selection area of the folded wallpaper, the value of Offset is repeatedly checked to ensure that 0<=Offset<=(W1-W2) is satisfied. The user experience is that the selection area of the folded wallpaper can be slid left and right within a certain range.
[0073] In some implementations, the folded wallpaper is set first, and then the expanded wallpaper is set. When setting the expanded wallpaper, the height and image zoom ratio of the expanded wallpaper are locked to be consistent with the folded wallpaper, and the selection area of the expanded wallpaper can only be adjusted left and right. In the process of adjusting the selection area of the expanded wallpaper, the value of Offset is repeatedly checked to ensure that 0<=Offset<=(W1-W2) is satisfied. The user experience is that the selection area of the expanded wallpaper can be slid left and right within a certain range.
[0074] The wallpaper preview interface display method provided in the embodiment of the present application, when setting the expanded wallpaper and the folded wallpaper, limits the folded wallpaper to be a part of the expanded wallpaper. In this way, when the electronic device displays the wallpaper, if the electronic device is expanded from the folded state to the expanded state, or the electronic device is folded from the expanded state to the folded state, a more coherent visual experience can be provided to the user.
[0075] The wallpaper preview interface display method provided in the embodiment of the present application can be applied to electronic devices including flexible screens (folding screens). The above electronic devices may include mobile phones, tablet computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), handheld computers, netbooks, smart home devices (e.g., smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDAs), wearable devices (e.g., smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiments of the present application do not impose any restrictions on this.
[0076] Figure 71 is a schematic diagram of the structure of an electronic device 100. The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a display screen 191, an indicator 192, a camera 193, etc. The sensor module 180 may include a touch sensor, a temperature sensor, a distance sensor, etc.
[0077] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0078] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0079] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0080] The processor 110 may 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 may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0081] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0082] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0083] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of an electronic device. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0084] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 191, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0085] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0086] The electronic device 100 implements the display function through a GPU, a display screen 191, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 191 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0087] The display screen 191 is used to display images, videos, etc. The display screen 191 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-OLED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc.
[0088] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 191 and application processor.
[0089] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0090] Camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1. In the embodiment of the present application, the camera 193 can be used to capture video images.
[0091] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals. For example, when an electronic device selects a frequency point, a digital signal processor is used to perform Fourier transform on the frequency point energy.
[0092] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. In this way, the electronic device can play or record videos in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0093] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and continuously self-learn. NPU can realize applications such as intelligent cognition of electronic devices, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0094] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor, etc. For example, music playing, recording, etc. In the embodiment of the present application, the audio module 170 can be used to collect audio in recording video.
[0095] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 are arranged in the processor 110. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone 170C, also known as the "microphone" and "microphone", is used to convert sound signals into electrical signals. The headphone interface 170D is used to connect wired headphones. The headphone interface 170D can be a USB interface 130, or it can be a 3.5mm open mobile electronic equipment platform (open mobile terminal platform, OMTP) standard interface, and the cellular telecommunications industry association of the USA (cellular telecommunications industry association of the USA, CTIA) standard interface.
[0096] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, audio, video and other files are stored in the external memory card.
[0097] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 can execute instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area may store data (such as video files) created during the use of the electronic device, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0098] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button or a touch button. The indicator 192 may be an indicator light, which may be used to indicate the charging status, the change of the power, or may be used to indicate messages, missed calls, notifications, etc.
[0099] In the embodiment of the present application, the electronic device 100 is an electronic device that can run an operating system and install application programs. Optionally, the operating system running on the electronic device can be system, system, System, etc.
[0100] The wallpaper preview interface display method provided in the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.
[0101] The electronic device may provide a user interface for the user to set the expanded wallpaper and the folded wallpaper. Take a mobile phone as an example of an electronic device.
[0102] In some embodiments, the user first sets the expanded wallpaper and then sets the folded wallpaper.
[0103] Exemplary, reference Fig. 8A , the mobile phone screen is in an expanded state, and in response to the user's operation of turning on the wallpaper setting function, the mobile phone displays a wallpaper setting interface 200, and the wallpaper setting interface 200 is used to select the wallpaper of the electronic device. Exemplarily, the wallpaper setting interface 200 includes multiple pictures, and in response to the user's selection operation on one of the pictures, an expanded wallpaper setting interface 201 is displayed. The expanded wallpaper setting interface 201 includes a wallpaper preview box 202, which is the display area of the mobile phone in the expanded state, and the wallpaper preview box 202 is used to display the expanded wallpaper preview image. The user can select a picture, and can move and scale the picture, and adjust the range of the picture displayed in the wallpaper preview box 202. The mobile phone can take a screenshot of the picture area displayed in the wallpaper preview box 202, obtain the first image, and set the first image as the expanded wallpaper.
[0104] The user can move the picture by sliding gestures on the mobile phone screen, adjust the range of the picture displayed in the wallpaper preview box 202, that is, change the expanded wallpaper preview image. Exemplarily, in response to the user's rightward sliding gesture, the picture moves to the right; correspondingly, the range of the picture displayed in the wallpaper preview box 202 moves to the left, and the expanded wallpaper preview image changes accordingly.
[0105] The user can also zoom in or out the image by performing a zoom gesture on the mobile phone screen, and adjust the range of the image displayed in the wallpaper preview box 202, that is, change the expanded wallpaper preview image. Exemplarily, in response to the user's zoom-in gesture, the image is zoomed in; accordingly, the range of the image displayed in the wallpaper preview box 202 is reduced, and the expanded wallpaper preview image changes accordingly. Exemplarily, in response to the user's zoom-out gesture, the image is zoomed out; accordingly, the range of the image displayed in the wallpaper preview box 202 is expanded, and the expanded wallpaper preview image changes accordingly.
[0106] The user can continue to set the folded wallpaper. Figure 8B When the mobile phone displays the expanded wallpaper setting interface 201, in response to the user clicking the "folded wallpaper" button, the mobile phone displays the folded wallpaper setting interface 205. The folded wallpaper setting interface 205 includes a wallpaper preview box 206. The wallpaper preview box 206 is used to display a preview image of the folded wallpaper. The mobile phone can take a screenshot of the image area displayed in the wallpaper preview box 206, obtain a second image, and set the second image as the folded wallpaper. It should be noted that the wallpaper preview box 206 is different in size from the display area of the mobile phone in the folded state, so the folded wallpaper preview image is different in display size from the folded wallpaper.
[0107] In the wallpaper preview interface display method provided by the embodiment of the present application, in response to the user's click operation on the "folded wallpaper" button, the mobile phone displays a part of the first image in the wallpaper preview box 206. The user can adjust the range of the picture displayed in the wallpaper preview box 206. In one implementation, the user first sets the expanded wallpaper, and then sets the folded wallpaper, allowing the user to move the display position of the picture on the screen to the left or right, and adjust the left and right range of the picture displayed in the wallpaper preview box 206. Exemplarily, in response to the user's right sliding gesture, the picture moves to the right; accordingly, the range of the picture displayed in the wallpaper preview box 206 moves to the left, and the folded wallpaper preview image changes accordingly. Exemplarily, in response to the user's left sliding gesture, the picture moves to the left; accordingly, the range of the picture displayed in the wallpaper preview box 206 moves to the right, and the folded wallpaper preview image changes accordingly. When the user sets the expanded wallpaper first, and then sets the folded wallpaper, the user is not allowed to move the picture up or down, that is, the range of the picture displayed in the wallpaper preview box 206 cannot be adjusted up or down; and the user is not allowed to modify the picture zoom ratio (enlarge or reduce the picture). In this way, it is achieved that the image range displayed in the wallpaper preview frame 206 is a part of the expanded wallpaper (first image).
[0108] In one implementation, the expanded wallpaper setting interface 201 further includes a "Save" button 203 and a "Cancel" button 204, and the folded wallpaper setting interface 205 further includes a "Save" button 207 and a "Cancel" button 208. In response to the user's click operation on the "Save" button 203 or the "Save" button 207, the mobile phone sets the image (first image) displayed in the wallpaper preview box 202 as the expanded wallpaper, and sets the image area (second image) displayed in the wallpaper preview box 206 as the folded wallpaper, and the folded wallpaper is a part of the expanded wallpaper. In response to the user's click operation on the "Cancel" button 204 or the "Cancel" button 208, the mobile phone cancels setting the image (first image) displayed in the wallpaper preview box 202 as the expanded wallpaper, and cancels setting the image area (second image) displayed in the wallpaper preview box 206 as the folded wallpaper.
[0109] In other embodiments, the user first sets the folded wallpaper and then sets the unfolded wallpaper.
[0110] Exemplary, reference Fig. 9A , the mobile phone screen is in a folded state, and in response to the user's operation of turning on the wallpaper setting function, the mobile phone displays a wallpaper setting interface 300, and the wallpaper setting interface 300 is used to select the wallpaper of the mobile phone. Exemplarily, the wallpaper setting interface 300 includes multiple pictures, and in response to the user's selection operation on one of the pictures, the mobile phone displays a folded wallpaper setting interface 301. The folded wallpaper setting interface 301 includes a wallpaper preview box 302, which is the display area of the mobile phone in the folded state, and the wallpaper preview box 302 is used to display the folded wallpaper preview image. The user can select a picture as the wallpaper, and can move and scale the picture, and adjust the range of the picture displayed in the wallpaper preview box 302. Take a screenshot of the picture area displayed in the wallpaper preview box 302, obtain a second image, and set the second image as the folded wallpaper.
[0111] The user can move the picture by sliding gestures on the mobile phone screen to adjust the range of the picture displayed in the wallpaper preview box 302, that is, change the folded wallpaper preview image. For example, in response to the user's rightward sliding gesture, the picture moves to the right; correspondingly, the range of the picture displayed in the wallpaper preview box 302 moves to the left, and the folded wallpaper preview image changes accordingly.
[0112] The user can also zoom in or out the picture through the zoom gesture on the mobile phone screen, adjust the range of the picture displayed in the wallpaper preview box 302, that is, change the folded wallpaper preview image. Exemplarily, in response to the user's zoom-in gesture, the picture is zoomed in; accordingly, the range of the picture displayed in the wallpaper preview box 302 is reduced, and the folded wallpaper preview image changes accordingly. Exemplarily, in response to the user's zoom-out gesture, the picture is zoomed out; accordingly, the range of the picture displayed in the wallpaper preview box 302 is expanded, and the folded wallpaper preview image changes accordingly.
[0113] The user can continue to set the expanded wallpaper. Fig. 9B When the mobile phone displays the folded wallpaper setting interface 301, in response to the user clicking the "expanded wallpaper" button, the mobile phone displays the expanded wallpaper setting interface 305. The expanded wallpaper setting interface 305 includes a wallpaper preview box 306. The wallpaper preview box 306 is used to display the expanded wallpaper preview image. The mobile phone can take a screenshot of the image area displayed in the wallpaper preview box 306, obtain the first image, and set the first image as the expanded wallpaper.
[0114] In the wallpaper preview interface display method provided in the embodiment of the present application, in response to the user clicking the "expanded wallpaper" button, the mobile phone displays a portion of the picture including the second image in the wallpaper preview frame 306, that is, the expanded wallpaper preview image includes the second image. It should be noted that the wallpaper preview frame 306 is different in size from the display area of the mobile phone in the expanded state, so the expanded wallpaper preview image is different in display size from the expanded wallpaper.
[0115] In the wallpaper preview interface display method provided by the embodiment of the present application, in response to the user's click operation on the "expanded wallpaper" button, the mobile phone displays a part of the picture containing the second image in the wallpaper preview box 306. The user can adjust the range of the picture displayed in the wallpaper preview box 306. In one implementation, the user first sets the folded wallpaper, and then sets the expanded wallpaper, allowing the user to move the display position of the picture on the screen to the left or right, and adjust the left and right range of the picture displayed in the wallpaper preview box 306. Exemplarily, in response to the user's right sliding gesture, the picture moves to the right; accordingly, the range of the picture displayed in the wallpaper preview box 306 moves to the left, and the expanded wallpaper preview image changes accordingly. Exemplarily, in response to the user's left sliding gesture, the picture moves to the left; accordingly, the range of the picture displayed in the wallpaper preview box 306 moves to the right, and the expanded wallpaper preview image changes accordingly. When the user sets the folded wallpaper first, and then sets the expanded wallpaper, the user is not allowed to move the picture up or down, that is, the range of the picture displayed in the wallpaper preview box 306 cannot be adjusted up or down; and the user is not allowed to modify the picture zoom ratio (enlarge or reduce the picture). In this way, the image range displayed in the wallpaper preview box 306 includes the folded wallpaper (the second image).
[0116] Further, the folded wallpaper setting interface 301 further includes a "save" button 303 and a "cancel" button 304, and the expanded wallpaper setting interface 305 further includes a "save" button 307 and a "cancel" button 308. In response to the user's click operation on the "save" button 303 or the "save" button 307, the mobile phone sets the image (second image) displayed in the wallpaper preview box 302 as the folded wallpaper, and sets the image area (first image) displayed in the wallpaper preview box 306 as the expanded wallpaper. In response to the user's click operation on the "cancel" button 304 or the "cancel" button 308, the mobile phone cancels setting the image (second image) displayed in the wallpaper preview box 302 as the folded wallpaper, and cancels setting the image area (first image) displayed in the wallpaper preview box 306 as the expanded wallpaper.
[0117] like Figures 8A-9BAs shown, in some embodiments, the user sets the expanded wallpaper first, and then sets the folded wallpaper; in other embodiments, the user sets the folded wallpaper first, and then sets the expanded wallpaper. The expanded wallpaper is generated based on the first image obtained by taking a screenshot of the first area of the picture, and the folded wallpaper is generated based on the second image obtained by taking a screenshot of the second area of the picture. The wallpaper set first is not restricted when taking a screenshot of the picture, and the wallpaper set later is restricted by preset conditions when taking a screenshot of the picture. In one implementation, the preset condition is: when taking a screenshot of the first area of the picture (obtaining the first image) and when taking a screenshot of the second area of the picture (obtaining the second image), the picture zoom ratio remains unchanged; and the height of the second image is equal to that of the first image; and the height of the center point of the first image is equal to that of the center point of the second image (for example, the ordinate of the center point of the first image in the picture coordinate system is equal to the ordinate of the center point of the second image in the picture coordinate system); and the left boundary of the second image does not exceed the left boundary of the first image, and the right boundary of the second image does not exceed the right boundary of the first image. In this way, it can be achieved that the folded wallpaper is part of the expanded wallpaper.
[0118] In the wallpaper preview interface display method provided in the embodiment of the present application, variables applicable to the global are set, such as class member variables, including: mLockStated (lock state), mLockScale (shared zoom ratio), mLockCenterX (the horizontal coordinate of the center point of the shared image), and mLockCenterY (the vertical coordinate of the center point of the shared image). Set the instance member variable mIsMainCropView, set mIsMainCropView = true when the folded wallpaper is initialized, and set mIsMainCropView = false when the expanded wallpaper is initialized.
[0119] mLockStated includes three states: unlocked state, folded wallpaper locked state and expanded wallpaper locked state. For example, the value of mLockStated is -1, indicating unlocked state; the value of mLockStated is 1, indicating folded wallpaper locked state; the value of mLockStated is 2, indicating expanded wallpaper locked state.
[0120] When both the expanded wallpaper and the folded wallpaper are not set, mLockStated is in the unlocked state; after the folded wallpaper is successfully set, mLockStated is updated to the locked state of the folded wallpaper; after the expanded wallpaper is successfully set, mLockStated is updated to the locked state of the expanded wallpaper. In the embodiment of the present application, the wallpaper that is set first is called the locked wallpaper, and the wallpaper that is set later is called the unlocked wallpaper. It should be noted that in some scenarios, after the user sets the expanded wallpaper, the folded wallpaper is not set, and the wallpaper is saved directly; the expanded wallpaper is the locked wallpaper, and the folded wallpaper is the unlocked wallpaper. Alternatively, after the user sets the folded wallpaper, the expanded wallpaper is not set, and the wallpaper is saved directly; the folded wallpaper is the locked wallpaper, and the expanded wallpaper is the unlocked wallpaper.
[0121] In some embodiments, the user first sets the expanded wallpaper and then sets the folded wallpaper.
[0122] mLockStated defaults to unlocked state. For example, Fig. 8A As shown, the mobile phone screen is in an expanded state, and in response to the user's operation of turning on the wallpaper setting function, the mobile phone displays the expanded wallpaper setting interface 201. The default expanded wallpaper preview image is displayed in the wallpaper preview box 202. For example, the default expanded wallpaper is an image within a preset area in the picture, that is, the horizontal coordinate X1 of the center point of the expanded wallpaper, the vertical coordinate Y1 of the center point of the expanded wallpaper, and the picture zoom ratio S1 corresponding to the expanded wallpaper are default values. The user can move and zoom the picture through gestures to adjust the range of the picture displayed in the wallpaper preview box 202. The electronic device receives the user's sliding gesture, and obtains the value of the horizontal coordinate X1 of the center point of the expanded wallpaper and the vertical coordinate Y1 of the center point of the expanded wallpaper according to the action position of the sliding gesture. The electronic device receives the user's zoom gesture and obtains the values of X1, Y1 and S1 according to the action position of the zoom gesture. In this way, the expanded wallpaper can be determined.
[0123] After the expanded wallpaper is successfully set, the image zoom ratio S1 corresponding to the expanded wallpaper is synchronized to mLockScale, the horizontal coordinate X1 value of the center point of the expanded wallpaper (first image) is synchronized to mLockCenterX, and the vertical coordinate Y1 value of the center point of the expanded wallpaper (first image) is synchronized to mLockCenterY. After the expanded wallpaper is successfully set, mLockStated is updated to the locked state of the expanded wallpaper. At this time, the expanded wallpaper is a locked wallpaper, and the folded wallpaper is an unlocked wallpaper.
[0124] After the expanded wallpaper is set successfully, the initial value of Offset is set to the default value. For example, the default value is (W1–W2) / 2. For example, refer to Figure 8B, when the mobile phone displays the expanded wallpaper setting interface 201, in response to the user's click operation on the "folded wallpaper" button, the mobile phone displays the folded wallpaper setting interface 205. Before receiving the user's operation to adjust the image position in the wallpaper preview box 206, the initial value of Offset is the default value ((W1-W2) / 2). At this time, the default position of the center point of the folded wallpaper coincides with the center point of the expanded wallpaper; in one implementation, the default value of the horizontal coordinate X2 of the center point of the folded wallpaper = the value of mLockCenterX, and the default value of the vertical coordinate Y2 of the center point of the folded wallpaper = mLockCenterY. The image zoom ratio corresponding to the folded wallpaper is the same as the image zoom ratio corresponding to the expanded wallpaper; in one implementation, the image zoom ratio S2 corresponding to the folded wallpaper = mLockScale. The initial value of Offset satisfies that the folded wallpaper is part of the expanded wallpaper.
[0125] The user can adjust the position of the image displayed in the wallpaper preview box 206 to adjust the area of the folded wallpaper in the image. In the wallpaper preview interface display method provided in the embodiment of the present application, after the expanded wallpaper is set, the user is not allowed to modify the value of the vertical coordinate Y2 of the center point of the folded wallpaper in the setting interface of the folded wallpaper, nor is the user allowed to modify the value of the image zoom ratio S2 corresponding to the folded wallpaper in the setting interface of the folded wallpaper.
[0126] In one implementation, the electronic device receives a sliding gesture of the user in the wallpaper preview box 206, obtains the horizontal coordinate X2' of the center point of the current folded wallpaper according to the position of the sliding gesture, and calculates the current Offset value according to Offset = (W1-W2) / 2-(X1-X2)*correction coefficient. Among them, the value of X1 = the value of mLockCenterX, and the value of X2 = the value of X2'.
[0127] If it is determined that the current Offset value satisfies 0<=Offset<=(W1-W2), the value of the horizontal coordinate X2 of the center point of the folded wallpaper is updated to the value of X2'.
[0128] If it is determined that the current Offset value satisfies Offset<0, the value of Offset is set to 0. If it is determined that the current Offset value satisfies Offset>(W1-W2), the value of Offset is set to (W1-W2). The value of X2 is recalculated according to the updated Offset value.
[0129] In one implementation, the electronic device receives a zoom gesture from the user in the wallpaper preview box 206 and does not respond to the zoom gesture.
[0130] In this way, the folded wallpaper is obtained. When setting the folded wallpaper, the user is allowed to adjust the image position to the left or right, that is, the user is allowed to adjust the area of the folded wallpaper in the image to the left or right; and the left border of the folded wallpaper does not exceed the left border of the expanded wallpaper, and the right border of the folded wallpaper does not exceed the right border of the expanded wallpaper.
[0131] In some embodiments, the user first sets the folded wallpaper and then sets the expanded wallpaper.
[0132] mLockStated defaults to unlocked state. For example, Fig. 9A As shown, the mobile phone screen is in a folded state, and in response to the user's operation of turning on the wallpaper setting function, the mobile phone displays a folded wallpaper setting interface 301. The default folded wallpaper preview image is displayed in the wallpaper preview box 302. For example, the default folded wallpaper is an image within a preset area in the picture, that is, the horizontal coordinate X2 of the center point of the folded wallpaper, the vertical coordinate Y2 of the center point of the folded wallpaper, and the picture zoom ratio S2 corresponding to the folded wallpaper are default values. The user can move and zoom the picture through gestures to adjust the range of the picture displayed in the wallpaper preview box 302. The electronic device receives the user's sliding gesture, and obtains the value of the horizontal coordinate X2 of the center point of the folded wallpaper and the vertical coordinate Y2 of the center point of the unfolded wallpaper according to the position of the sliding gesture. The electronic device receives the user's zoom gesture and obtains the values of X2, Y2 and S2 according to the position of the zoom gesture. In this way, the folded wallpaper can be determined.
[0133] After the folded wallpaper is successfully set, the image zoom ratio S2 corresponding to the folded wallpaper is synchronized to mLockScale, the value of the horizontal coordinate X2 of the center point of the folded wallpaper (second image) is synchronized to mLockCenterX, and the value of the vertical coordinate Y2 of the center point of the folded wallpaper (second image) is synchronized to mLockCenterY. After the folded wallpaper is successfully set, mLockStated is updated to the locked state of the folded wallpaper. At this time, the folded wallpaper is a locked wallpaper, and the expanded wallpaper is an unlocked wallpaper.
[0134] After the folded wallpaper is set successfully, the initial value of Offset is set to the default value. For example, the default value is (W1–W2) / 2. For example, refer to Fig. 9B, when the mobile phone displays the folded wallpaper setting interface 301, in response to the user's click operation on the "expanded wallpaper" button, the mobile phone displays the expanded wallpaper setting interface 305. Before receiving the user's operation to adjust the image position in the wallpaper preview box 306, the initial value of Offset is the default value ((W1-W2) / 2). At this time, the default position of the center point of the expanded wallpaper coincides with the center point of the folded wallpaper; in one implementation, the default value of the horizontal coordinate X1 of the center point of the expanded wallpaper = the value of mLockCenterX, and the default value of the vertical coordinate Y1 of the center point of the expanded wallpaper = mLockCenterY. The image zoom ratio corresponding to the expanded wallpaper is the same as the image zoom ratio corresponding to the folded wallpaper; in one implementation, the image zoom ratio S1 corresponding to the expanded wallpaper = mLockScale. The initial value of Offset satisfies that the folded wallpaper is part of the expanded wallpaper.
[0135] The user can adjust the position of the image displayed in the wallpaper preview box 306 to adjust the area of the expanded wallpaper in the image. In the wallpaper preview interface display method provided in the embodiment of the present application, after the folded wallpaper is set, the user is not allowed to modify the value of the vertical coordinate Y1 of the center point of the expanded wallpaper in the setting interface of the expanded wallpaper, nor is the user allowed to modify the value of the image zoom ratio S1 corresponding to the expanded wallpaper in the setting interface of the expanded wallpaper.
[0136] In one implementation, the electronic device receives a sliding gesture of the user in the wallpaper preview box 306, obtains the horizontal coordinate X1' of the center point of the current expanded wallpaper according to the position of the sliding gesture, and calculates the current Offset value according to Offset = (W1-W2) / 2-(X1-X2)*correction coefficient. Among them, the value of X2 = the value of mLockCenterX, and the value of X1 = the value of X1'.
[0137] If it is determined that the current Offset value satisfies 0<=Offset<=(W1-W2), the value of the horizontal coordinate X1 of the center point of the expanded wallpaper is updated to the value of X1'.
[0138] If it is determined that the current Offset value satisfies Offset<0, the value of Offset is set to 0. If it is determined that the current Offset value satisfies Offset>(W1-W2), the value of Offset is set to (W1-W2). The value of X1 is recalculated according to the updated Offset value.
[0139] It should be noted that when determining the expanded wallpaper based on the folded wallpaper, when the condition of 0<=Offset<=(W1-W2) is met, the range of the determined expanded wallpaper may have exceeded the range of the picture. For example, the left border of the folded wallpaper coincides with the left border of the picture. After the folded wallpaper is set successfully, the initial value of Offset is set to the default value, and the default position of the center point of the expanded wallpaper coincides with the center point of the folded wallpaper. At this time, the left border of the expanded wallpaper exceeds the range of the picture. For example, the electronic device receives a sliding gesture from the user in the wallpaper preview box 306, and obtains the horizontal coordinate X1' of the center point of the current expanded wallpaper according to the position of the sliding gesture. The Offset value calculated based on X1' satisfies 0<=Offset<=(W1-W2), but the value of X1' exceeds the range of the picture.
[0140] For example, Fig. 10A As shown, if the folded wallpaper (second image) is located near the left border of the picture, under the condition that the Offset value satisfies 0<=Offset<=(W1-W2), the left border of the expanded wallpaper (first image) has exceeded the picture range.
[0141] In some examples, under the condition that the Offset value satisfies 0<=Offset<=(W1-W2), it is determined whether the left border of the expanded wallpaper (first image) exceeds the picture range; if the left border of the expanded wallpaper (first image) exceeds the picture range, the left border of the expanded wallpaper (first image) is set to coincide with the left border of the picture.
[0142] For example, Fig. 10B As shown, if the folded wallpaper (second image) is located near the right border of the picture, under the condition that the Offset value satisfies 0<=Offset<=(W1-W2), the right border of the expanded wallpaper (first image) has exceeded the picture range.
[0143] In some examples, under the condition that the Offset value satisfies 0<=Offset<=(W1-W2), it is determined whether the right border of the expanded wallpaper (first image) exceeds the picture range; if the right border of the expanded wallpaper (first image) exceeds the picture range, the right border of the expanded wallpaper (first image) is set to coincide with the right border of the picture.
[0144] In one implementation, the electronic device receives a zoom gesture from the user in the wallpaper preview box 306 and does not respond to the zoom gesture.
[0145] In this way, the expanded wallpaper is obtained. When setting the expanded wallpaper, the user is allowed to adjust the image position to the left or right, that is, the user is allowed to adjust the area of the expanded wallpaper in the image to the left or right; and the left border of the folded wallpaper does not exceed the left border of the expanded wallpaper, and the right border of the folded wallpaper does not exceed the right border of the expanded wallpaper.
[0146] Exemplarily, the following implementation method may be used to limit the horizontal coordinate range of the center point of the unlocked wallpaper.
[0147]
[0148]
[0149] The wallpaper preview interface display method provided in the embodiment of the present application, when receiving the user's operation of setting a locked wallpaper, obtains the coordinates of the center point of the locked wallpaper and the image zoom ratio corresponding to the locked wallpaper according to the user's sliding gesture, zooming gesture, etc.; adjusts the position and range of the locked wallpaper in the image accordingly according to the user's sliding gesture, zooming gesture, etc. When receiving the user's operation of setting an unlocked wallpaper, the image zoom ratio corresponding to the unlocked wallpaper uses mLockScale, and the vertical coordinate of the center point of the unlocked wallpaper uses mLockCenterY. In response to the user's sliding gesture, the current horizontal coordinate of the center point of the unlocked wallpaper is obtained, and the value of Offset is calculated according to mLockCenterX and the current horizontal coordinate of the center point of the unlocked wallpaper, so that the value of Offset satisfies 0<=Offset<=(W1-W2). When receiving the user's zoom gesture for the unlocked wallpaper, the electronic device does not respond to the zoom gesture. In this way, when setting the unlocked wallpaper, the user is not allowed to move the picture up or down, and the user is not allowed to modify the image zoom ratio (zoom in or out of the picture), the user is allowed to move the picture left or right, and the folded wallpaper is part of the expanded wallpaper.
[0150] In the above-mentioned wallpaper preview interface display method provided in the embodiment of the present application, the unlocked wallpaper needs to use mLockCenterX (the horizontal coordinate of the shared image center point) to limit the horizontal coordinate range of the image center point, and mLockCenterY (the vertical coordinate of the shared image center point) and mLockScale (shared zoom ratio) are also required to determine the screenshot range. If the unlocked wallpaper has not obtained the values of mLockCenterX, mLockCenterY and mLockScale when these parameters are needed, problems will occur. For example, after the locked wallpaper is set, it switches to the setting interface of the unlocked wallpaper. Before the unlocked wallpaper receives the user's sliding gestures, zoom gestures and other operations, a frame image of the unlocked wallpaper will be drawn. In the embodiment of the present application, this frame image is called the first frame image. If the unlocked wallpaper does not obtain mLockCenterX, mLockCenterY and mLockScale when drawing the first frame image, the image range of the unlocked wallpaper cannot be limited according to the locked wallpaper. In this way, all or part of the folding screen wallpaper may not belong to the unfolded wallpaper.
[0151] The wallpaper preview interface display method provided in the embodiment of the present application obtains shared parameters such as mLockCenterX, mLockCenterY and mLockScale before or when drawing the first frame of the unlocked wallpaper, and saves the values of these shared parameters locally in the unlocked wallpaper. In this way, when drawing the first frame of the unlocked wallpaper, it is drawn according to the shared parameters, and when drawing the wallpaper image subsequently, the locally saved parameter values can be used for drawing.
[0152] In one implementation, a class member variable mIsUnLockFirstScroll is set to identify whether it is the first frame drawing of an unlocked wallpaper. After the locked wallpaper is adjusted, mIsUnLockFirstScroll=true is set. After switching to setting an unlocked wallpaper, if it is determined that the current wallpaper is unlocked and mIsUnLockFirstScroll=true, obtain the shared parameters (mLockCenterX, mLockCenterY, and mLockScale) and synchronize the values of the shared parameters (mLockCenterX, mLockCenterY, and mLockScale) to the unlocked wallpaper locally, and set mIsUnLockFirstScroll=false. If it is determined that the current wallpaper is unlocked and mIsUnLockFirstScroll=false, it means that it is not the first frame drawing, and subsequent drawing will no longer obtain the shared parameters, but use the locally saved shared parameters.
[0153] For example, Fig.11A schematic diagram of a flow chart of a wallpaper preview interface display method provided in an embodiment of the present application is shown.
[0154] like Fig.11 As shown, in the lock wallpaper setting interface, the electronic device receives a sliding gesture or a zooming gesture from the user. The electronic device determines whether the first frame of the unlocked wallpaper is drawn according to mIsUnLockFirstScroll. In one example, the electronic device determines that the current wallpaper is a lock wallpaper, and adjusts the lock wallpaper according to the sliding gesture or the zooming gesture. Furthermore, after the lock wallpaper is set, the electronic device updates the value of the shared parameter according to the private data of the lock wallpaper. Exemplarily, the value of the horizontal coordinate of the center point of the lock wallpaper is synchronized to mLockCenterX, the value of the vertical coordinate of the center point of the lock wallpaper is synchronized to mLockCenterY, and the image zoom ratio corresponding to the lock wallpaper is synchronized to mLockScale. And set mIsUnLockFirstScroll = true.
[0155] Afterwards, according to the user operation, the electronic device switches to the unlocked wallpaper setting interface. The electronic device determines whether the first frame of the unlocked wallpaper is drawn according to mIsUnLockFirstScroll. In one example, the electronic device determines that the current wallpaper is an unlocked wallpaper and it is the first frame drawing (mIsUnLockFirstScroll=true), and synchronizes mLockCenterX, mLockCenterY and mLockScale to the local private data of the unlocked wallpaper. And set mIsUnLockFirstScroll=false. The electronic device draws the unlocked wallpaper according to the private data synchronized to the local unlocked wallpaper.
[0156] Afterwards, in the unlocked wallpaper setting interface, the electronic device receives a sliding gesture or a zooming gesture from the user. The electronic device determines whether the first frame of the unlocked wallpaper is drawn according to mIsUnLockFirstScroll. In one example, the electronic device determines that the current wallpaper is an unlocked wallpaper and is not the first frame drawn, and uses the private data synchronized to the unlocked wallpaper to draw the unlocked wallpaper. When drawing the unlocked wallpaper, the user is not allowed to move the picture up or down, and the user is not allowed to modify the picture zoom ratio (enlarge or reduce the picture), but the user is allowed to move the picture left or right.
[0157] In this method, the unlocked wallpaper only obtains shared parameters when drawing the first frame; the locally saved private data can be used in the subsequent drawing process, and there is no need to care about the shared parameters; that is, the association and restriction relationship between the unlocked wallpaper and the locked wallpaper is guaranteed, and decoupling is achieved in the adjustment process of the unlocked wallpaper and the locked wallpaper.
[0158] Optionally, in some embodiments, the electronic device first receives the user's operation of setting the expanded wallpaper, but does not receive the user's operation of setting the folded wallpaper, and then receives the user's operation of saving the expanded wallpaper and the folded wallpaper. Fig. 8A As shown, the mobile phone screen is in an expanded state, and in response to the user's selection operation on a picture in the wallpaper setting interface 200, the expanded wallpaper setting interface 201 is displayed. Afterwards, the electronic device does not receive the user's click operation on the "folded wallpaper" button on the expanded wallpaper setting interface 201, and then receives the user's click operation on the "save" button 203. In response to the user's click operation on the "save" button 203, the mobile phone sets the image displayed in the wallpaper preview box 202 as the expanded wallpaper. And, the default folded wallpaper is set according to the expanded wallpaper. Exemplarily, the default folded wallpaper is the same as the first frame image of the folded wallpaper. For example, after the expanded wallpaper is set successfully, the image zoom ratio S1 corresponding to the expanded wallpaper is synchronized to mLockScale, the value of the horizontal coordinate X1 of the center point of the expanded wallpaper (first image) is synchronized to mLockCenterX, and the value of the vertical coordinate Y1 of the center point of the expanded wallpaper (first image) is synchronized to mLockCenterY. The default folded wallpaper corresponds to the Offset value (W1–W2) / 2. At this time, the center point of the default folded wallpaper coincides with the center point of the expanded wallpaper, that is, the horizontal coordinate of the center point of the default folded wallpaper is the value of mLockCenterX; the vertical coordinate of the center point of the default folded wallpaper is the value of mLockCenterY; the image zoom ratio corresponding to the default folded wallpaper is the same as the image zoom ratio corresponding to the expanded wallpaper, which is the value of mLockScale.
[0159] Optionally, in some embodiments, the electronic device first receives an operation from the user to set a folded wallpaper, but does not receive an operation from the user to set an expanded wallpaper, and then receives an operation from the user to save the expanded wallpaper and the folded wallpaper. Fig. 9AAs shown, the mobile phone screen is in a folded state, and in response to the user's selection operation of a picture in the wallpaper setting interface 200, the folded wallpaper setting interface 301 is displayed. Afterwards, the electronic device does not receive the user's click operation on the "expanded wallpaper" button on the folded wallpaper setting interface 301, and then receives the user's click operation on the "save" button 303. In response to the user's click operation on the "save" button 203, the mobile phone sets the image displayed in the wallpaper preview box 302 as the folded wallpaper. And, the default expanded wallpaper is set according to the folded wallpaper. Exemplarily, the default expanded wallpaper is the same as the first frame image of the expanded wallpaper. For example, after the folded wallpaper is set successfully, the image zoom ratio S2 corresponding to the folded wallpaper is synchronized to mLockScale, the value of the horizontal coordinate X2 of the center point of the folded wallpaper (second image) is synchronized to mLockCenterX, and the value of the vertical coordinate Y2 of the center point of the folded wallpaper (second image) is synchronized to mLockCenterY. The default expanded wallpaper corresponds to the Offset value (W1–W2) / 2. At this time, the center point of the default folded wallpaper coincides with the center point of the expanded wallpaper, that is, the horizontal coordinate of the center point of the default folded wallpaper is the value of mLockCenterX; the vertical coordinate of the center point of the default expanded wallpaper is the value of mLockCenterY; the image zoom ratio corresponding to the default expanded wallpaper is the same as the image zoom ratio corresponding to the folded wallpaper, which is the value of mLockScale. Optionally, in some cases, if the horizontal coordinate of the center point of the default expanded wallpaper is the value of mLockCenterX, the left border of the default expanded wallpaper exceeds the image range; adjust the horizontal coordinate value of the center point of the default expanded wallpaper so that the left border of the default expanded wallpaper coincides with the left border of the image. If the horizontal coordinate of the center point of the default expanded wallpaper is the value of mLockCenterX, the right border of the default expanded wallpaper exceeds the image range; adjust the horizontal coordinate value of the center point of the default expanded wallpaper so that the right border of the default expanded wallpaper coincides with the right border of the image.
[0160] In some embodiments, the size of the wallpaper preview image displayed in the wallpaper setting interface is different from the size of the actual wallpaper image.
[0161] In one example, reference Fig. 12A When the foldable screen mobile phone is in the unfolded state, the wallpaper preview box 202 of the unfolded wallpaper setting interface is used to display the preview image of the unfolded wallpaper. The display area of the wallpaper preview box 202 is the display area of the mobile phone in the unfolded state; the width W of the display area of the wallpaper preview box 202 is e 1 is the width of the display area of the mobile phone in the unfolded state, which is equal to the width W1 of the first image; the height H of the display area of the wallpaper preview frame 202 e1 is the height of the display area of the mobile phone in the unfolded state, which is equal to the height H1 of the first image.
[0162] When the foldable screen phone is in the unfolded state, the wallpaper preview box 206 of the folded wallpaper setting interface is used to display the preview image of the folded wallpaper. The display area of the wallpaper preview box 206 is different from the display area of the phone in the folded state; in one example, the display area of the wallpaper preview box 206 is smaller than the display area of the phone in the folded state. The width W of the display area of the wallpaper preview box 206 is e 2 is smaller than the width of the display area of the mobile phone in the folded state; the height H of the display area of the wallpaper preview frame 206 e 2 is smaller than the height of the display area of the phone when it is folded.
[0163] In one implementation, W e 2 / W2=H e That is, when the electronic device is in the unfolded state, compared with the display area of the electronic device in the folded state (folded wallpaper), the width and height of the wallpaper preview box display area in the folded wallpaper setting interface are reduced according to the first ratio, and the first ratio = W e 2 / W2=H e 2 / H2. In this way, the ratio of the width to the height of the folded wallpaper preview image displayed by the electronic device when it is in the unfolded state can be kept consistent with the actual folded wallpaper.
[0164] refer to Fig. 12B ,exist Fig. 12A In the scene shown, the ratio of the width of the display area of the wallpaper preview frame 206 to the width of the display area corresponding to the second image (the display area of the electronic device in the folded state) is a first ratio, and the ratio of the height of the display area of the wallpaper preview frame 206 to the height of the display area corresponding to the second image (the display area of the electronic device in the folded state) is a first ratio. Accordingly, the ratio of the width of the folded wallpaper preview image displayed in the wallpaper preview frame 206 to the width of the second image, and the ratio of the height of the folded wallpaper preview image displayed in the wallpaper preview frame 206 to the height of the second image are both the first ratio. Accordingly, the image zoom ratio corresponding to the folded wallpaper preview image displayed in the wallpaper preview frame 206 is the image zoom ratio corresponding to the second image * the first ratio. In this way, when the image center points of the folded wallpaper preview image and the second image coincide, the content of the folded wallpaper preview image displayed in the wallpaper preview frame 206 can be made consistent with that of the second image.
[0165] In another example, reference Fig.13AWhen the foldable screen mobile phone is in the folded state, the wallpaper preview box 302 of the folded wallpaper setting interface is used to display the preview image of the folded wallpaper. The display area of the wallpaper preview box 302 is the display area of the mobile phone in the folded state; the width W of the display area of the wallpaper preview box 302 is f 2 is the width of the display area of the mobile phone in the folded state, which is equal to the width W2 of the second image; the height H of the display area of the wallpaper preview frame 302 f 2 is the height of the display area of the mobile phone in the folded state, which is equal to the height H2 of the second image.
[0166] When the foldable screen phone is in the folded state, the wallpaper preview box 306 of the unfolded wallpaper setting interface is used to display the preview image of the unfolded wallpaper. The display area of the wallpaper preview box 306 is different from the display area of the unfolded state of the phone; in one example, the display area of the wallpaper preview box 306 is smaller than the display area of the unfolded state of the phone. The width W of the display area of the wallpaper preview box 306 is f 1 is smaller than the width of the display area of the mobile phone in the unfolded state; the height H of the display area of the wallpaper preview frame 306 f 1 is less than the height of the display area of the phone when it is unfolded.
[0167] In one implementation, W f 1 / W1=H f That is, when the electronic device is in the folded state, compared with the display area of the electronic device in the unfolded state (the unfolded wallpaper), the width and height of the wallpaper preview box display area in the unfolded wallpaper setting interface are reduced according to the second ratio, and the second ratio = W f 1 / W1=H f 1 / H1. In this way, the ratio of the width to the height of the unfolded wallpaper preview image displayed by the electronic device when it is in the folded state can be kept consistent with the actual unfolded wallpaper.
[0168] refer to Fig. 13B ,exist Fig.13AIn the scene shown, the ratio of the width of the display area of the wallpaper preview frame 306 to the width of the display area corresponding to the first image (the display area of the electronic device in the expanded state) is the second ratio, and the ratio of the height of the display area of the wallpaper preview frame 306 to the height of the display area corresponding to the first image (the display area of the electronic device in the expanded state) is the second ratio. Correspondingly, the ratio of the width of the expanded wallpaper preview image displayed in the wallpaper preview frame 306 to the width of the first image, and the ratio of the height of the expanded wallpaper preview image displayed in the wallpaper preview frame 306 to the height of the first image are both the second ratio. Correspondingly, the image zoom ratio corresponding to the expanded wallpaper preview image displayed in the wallpaper preview frame 306 is the image zoom ratio corresponding to the first image * the second ratio. In this way, when the center point of the expanded wallpaper preview image coincides with the image center point of the first image, the expanded wallpaper preview image displayed in the wallpaper preview frame 306 can be made consistent with the content of the first image.
[0169] In the wallpaper preview interface display method provided by the embodiment of the present application, after the locked wallpaper is set, the value of the horizontal coordinate of the wallpaper center point corresponding to the locked wallpaper is updated to the shared parameter mLockCenterX, the value of the vertical coordinate of the wallpaper center point is updated to the shared parameter mLockCenterY, and the value of the image zoom ratio corresponding to the wallpaper is updated to the shared parameter mLockScale. In this way, the shared parameters are obtained when the unlocked wallpaper draws the first frame image, and the user's adjustment of the unlocked wallpaper can be restricted according to the shared parameters when drawing the unlocked wallpaper.
[0170] according to Figure 12A-Figure 13B In the example shown, the size of the wallpaper preview box is different from the size of the actual wallpaper display area, that is, the size of the wallpaper preview image is different from that of the wallpaper image. Accordingly, when the center points of the wallpaper preview image and the wallpaper image coincide, the image zoom ratios of the wallpaper preview image and the wallpaper image are also different. The image zoom ratios of the unlocked wallpaper and the locked wallpaper are the same, so the image zoom ratios of the wallpaper preview image of the unlocked wallpaper are different from those of the locked wallpaper.
[0171] In one embodiment, the locked wallpaper modifies the shared parameter mLockScale according to the scaling ratio of the wallpaper preview image relative to the wallpaper image. In one implementation, the modified mLockScale = (the height of the preview image of the unlocked wallpaper / the height of the preview image of the locked wallpaper) * the image scaling ratio corresponding to the locked wallpaper. By drawing the preview image of the unlocked wallpaper according to the modified mLockScale, the preview image of the unlocked wallpaper can be made consistent with the unlocked wallpaper.
[0172] In one example, when the electronic device is in the unfolded state, the wallpaper setting interface is opened. Fig. 12A The scene shown.
[0173] If the locked wallpaper is an expanded wallpaper, the corrected mLockScale=(H e 2 / H e 1)*S e 1; among them, H e 2 is the height of the folded wallpaper preview image when the electronic device is unfolded, H e 1 is the height of the preview image of the unfolded wallpaper when the electronic device is unfolded, S e 1 is the image zoom ratio corresponding to the preview image of the wallpaper in the expanded state when the electronic device is in the expanded state. For example, in one implementation, the height H of the preview image of the wallpaper in the expanded state when the electronic device is in the expanded state is e 1 is the same as the height H1 of the unfolded wallpaper, that is, H e 1 = H1; the image zoom ratio S corresponding to the preview image of the unfolded wallpaper when the electronic device is unfolded e 1 is the same as the image zoom ratio S1 corresponding to the expanded wallpaper, that is, S e 1 = S1. In this case, the corrected mLockScale = (H e 2 / H1)*S1.
[0174] If the locked wallpaper is a folded wallpaper, the corrected mLockScale=(H e 1 / H e 2) *S e 2; among them, S e 2 is the image zoom ratio of the folded wallpaper preview image when the electronic device is unfolded. e 2=(H e 2 / H2)*S2, S2 is the image zoom ratio corresponding to the folded wallpaper, H e 1 = H1 = H2; therefore, the modified mLockScale = S2. That is, the image zoom ratio corresponding to the unfolded wallpaper preview image is the same as the image zoom ratio corresponding to the unfolded wallpaper, and the same as the image zoom ratio corresponding to the folded wallpaper.
[0175] In another example, when the electronic device is in a folded state, the wallpaper setting interface is opened. Fig.13A The scene shown.
[0176] If the locked wallpaper is a folded wallpaper, the corrected mLockScale=(H f 1 / H f 2) *S f 2; among them, H f 1 is the height of the preview image of the unfolded wallpaper when the electronic device is folded, H f2 is the height of the folded wallpaper preview image when the electronic device is folded, S f 2 is the image zoom ratio of the folded wallpaper preview image when the electronic device is in the folded state. For example, in one implementation, the height H of the folded wallpaper preview image when the electronic device is in the folded state is f 2 is the same as the height H2 of the folded wallpaper, that is, H f 2 = H2; when the electronic device is in the folded state, the image zoom ratio S corresponding to the folded wallpaper preview image f 2 is the same as the image zoom ratio S2 corresponding to the folded wallpaper, that is, S f 2 = S2. In this case, the corrected mLockScale = (H f 1 / H2)*S2.
[0177] If the locked wallpaper is an expanded wallpaper, the corrected mLockScale=(H f 2 / H f 1)*S f 1; where S f 1 is the image zoom ratio of the wallpaper preview image when the electronic device is folded. f 1=(H f 1 / H1)*S1, S1 is the image zoom ratio corresponding to the expanded wallpaper, H f 2 = H2 = H1; therefore, the modified mLockScale = S1. That is, the image zoom ratio corresponding to the folded wallpaper preview image is the same as the image zoom ratio corresponding to the folded wallpaper, and the same as the image zoom ratio corresponding to the unfolded wallpaper.
[0178] In the wallpaper preview interface display method provided in the embodiment of the present application, the locked wallpaper draws the locked wallpaper preview image according to the image zoom ratio corresponding to the locked wallpaper preview image, and adjusts the image zoom ratio corresponding to the locked wallpaper preview image according to the ratio of the unlocked wallpaper preview image height to the locked wallpaper preview image height, and updates the adjusted image zoom ratio to the corrected mLockScale. In this way, the unlocked wallpaper obtains the corrected mLockScale when drawing the first frame image, and draws the unlocked wallpaper preview image according to the corrected mLockScale, so that the unlocked wallpaper preview image is consistent with the unlocked wallpaper image.
[0179] It is understandable that in other embodiments, the locked wallpaper draws the locked wallpaper preview image according to the image zoom ratio corresponding to the locked wallpaper preview image, and updates the image zoom ratio corresponding to the locked wallpaper preview image to mLockScale. The unlocked wallpaper obtains mLockScale when drawing the first frame image, and adjusts mLockScale accordingly according to the ratio of the unlocked wallpaper preview image height to the locked wallpaper preview image height to obtain the corrected mLockScale. The unlocked wallpaper draws the unlocked wallpaper preview image according to the corrected mLockScale, so that the unlocked wallpaper preview image is consistent with the unlocked wallpaper image content.
[0180] That is to say, the correction of mLockScale can be performed by the locked wallpaper or by the unlocked wallpaper. The embodiment of the present application takes the correction of mLockScale by the locked wallpaper as an example. In this implementation, the locked wallpaper uses local parameters, does not use shared parameters, and is responsible for synchronizing parameters to shared parameters (such as the corrected mLockScale). The unlocked wallpaper directly uses the corrected mLockScale, that is, the default shared parameter mLockScale is correct and can be used directly.
[0181] When the electronic device is in the unfolded state, the locked wallpaper determines the modified mLockScale according to the user operation (for example, a zoom gesture), and the unlocked wallpaper directly draws the wallpaper according to the modified mLockScale. When the electronic device is in the folded state, the locked wallpaper determines the modified mLockScale according to the user operation (for example, a zoom gesture), and the unlocked wallpaper directly draws the wallpaper according to the modified mLockScale.
[0182] In some scenarios, the lock wallpaper is set when the electronic device is in the unfolded state, and the lock wallpaper corrects the value of mLockScale according to the image zoom ratio corresponding to the lock wallpaper preview image to obtain the corrected mLockScale. When the electronic device is in the unfolded state, the unlocked wallpaper preview image can be successfully drawn by directly using the corrected mLockScale. If before drawing the unlocked wallpaper preview image, the user folds the electronic device from the unfolded state to the folded state. Since the size of the unlocked wallpaper preview image is different in the unfolded state and the folded state of the electronic device; that is, when the image zoom ratio corresponding to the lock wallpaper preview image remains unchanged, the image zoom ratio corresponding to the unlocked wallpaper preview image in the unfolded state and the folded state of the electronic device is different; if the unlocked wallpaper preview image in the folded state of the electronic device is drawn directly using the corrected mLockScale of the lock wallpaper in the unfolded state of the electronic device, an error will occur in the unlocked wallpaper preview image in the folded state of the electronic device.
[0183] In some scenarios, the lock wallpaper is set when the electronic device is in a folded state, and the lock wallpaper corrects the value of mLockScale according to the image zoom ratio corresponding to the lock wallpaper preview image to obtain the corrected mLockScale. When the electronic device is in a folded state, the unlocked wallpaper preview image can be successfully drawn by directly using the corrected mLockScale. If before drawing the unlocked wallpaper preview image, the user's operation of unfolding the electronic device from the folded state to the unfolded state is received. Since the size of the unlocked wallpaper preview image is different in the unfolded state and the folded state of the electronic device; that is, when the image zoom ratio corresponding to the lock wallpaper preview image remains unchanged, the image zoom ratio of the unlocked wallpaper preview image in the unfolded state and the folded state of the electronic device is different; if the locked wallpaper is directly used in the folded state of the electronic device to draw the unlocked wallpaper preview image in the unfolded state of the electronic device after the corrected mLockScale, the unlocked wallpaper preview image in the unfolded state of the electronic device will be wrong.
[0184] That is to say, if the electronic device switches between an unfolded state and a folded state during the wallpaper setting process, it will cause an error in the preview image of the unlocked wallpaper.
[0185] The wallpaper preview interface display method provided in the embodiment of the present application, when drawing the unlocked wallpaper preview image, judges the screen state (expanded state or folded state) of the electronic device when drawing the locked wallpaper preview image. If the screen states of the electronic devices corresponding to the unlocked wallpaper preview image and the locked wallpaper preview image are the same, directly use the corrected mLockScale to draw the unlocked wallpaper preview image; if the screen states of the electronic devices corresponding to the unlocked wallpaper preview image and the locked wallpaper preview image are different, perform a second correction on the corrected mLockScale so that the second-corrected mLockScale matches the unlocked wallpaper preview image after the screen state changes, and draw the unlocked wallpaper preview image according to the second-corrected mLockScale.
[0186] In one implementation, an identifier M is set to record the screen state of the electronic device (including the expanded state and the folded state) and the wallpaper type of the lock wallpaper (including the expanded wallpaper and the folded wallpaper) corresponding to the drawing of the preview image of the lock wallpaper (the wallpaper set first). Exemplarily, M=1 indicates that the preview image of the lock wallpaper corresponds to the expanded state of the electronic device, and the wallpaper type of the lock wallpaper is the expanded wallpaper; M=2 indicates that the preview image of the lock wallpaper corresponds to the expanded state of the electronic device, and the wallpaper type of the lock wallpaper is the folded wallpaper; M=3 indicates that the preview image of the lock wallpaper corresponds to the folded state of the electronic device, and the wallpaper type of the lock wallpaper is the expanded wallpaper; M=4 indicates that the preview image of the lock wallpaper corresponds to the folded state of the electronic device, and the wallpaper type of the lock wallpaper is the folded wallpaper.
[0187] In one example, it can be determined whether the currently drawn wallpaper preview image is a locked wallpaper according to mLockStated. The screen state (expanded state or folded state) of the electronic device can also be obtained.
[0188] When drawing a wallpaper, if it is determined that the wallpaper currently being drawn is a lock wallpaper, after the lock wallpaper is drawn, the value of M is updated. For example, Figure 8B In the example scenario shown, when the electronic device is unfolded, the unfolded wallpaper is set first, and then the folded wallpaper is set. Correspondingly, the lock wallpaper is the unfolded wallpaper, and after drawing the unfolded wallpaper preview image, the value of M is updated to 1. For example, Fig. 9B In the example scenario shown, when the electronic device is folded, the folded wallpaper is set first, and then the unfolded wallpaper is set. Correspondingly, the lock wallpaper is the folded wallpaper, and after drawing the folded wallpaper preview image, the value of M is updated to 4.
[0189] When drawing a wallpaper, if it is determined that the wallpaper currently being drawn is unlocked and is the first frame image of the unlocked wallpaper, obtain the value of mLockScale (the value of mLockScale is the corrected mLockScale value). Compare the screen state of the electronic device corresponding to the current unlocked wallpaper with the screen state of the electronic device corresponding to the saved locked wallpaper. If it is determined that the screen state of the electronic device corresponding to the current unlocked wallpaper is the same as the screen state of the electronic device corresponding to the saved locked wallpaper, directly use the corrected mLockScale value to draw the unlocked wallpaper preview image; if it is determined that the screen state of the electronic device corresponding to the current unlocked wallpaper is different from the screen state of the electronic device corresponding to the saved locked wallpaper, indicating that the switch between the expanded state and the folded state occurred before setting the unlocked wallpaper, the corrected mLockScale value is corrected twice, so that the second corrected mLockScale value matches the current unlocked wallpaper preview image. In one implementation, if the current electronic device screen state is the expanded state, the second corrected mLockScale value = (the height of the preview image of the unlocked wallpaper in the expanded state of the electronic device / the height of the preview image of the unlocked wallpaper in the folded state of the electronic device) * the corrected mLockScale value. If the current screen state of the electronic device is folded, the mLockScale value after secondary correction = (the height of the preview image of the unlocked wallpaper in the folded state of the electronic device / the height of the preview image of the unlocked wallpaper in the unfolded state of the electronic device) * the corrected mLockScale value.
[0190] Exemplarily, the electronic device screen state corresponding to the unlocked wallpaper is compared with the electronic device screen state corresponding to the locked wallpaper, and the wallpaper type of the unlocked wallpaper is compared with the wallpaper type of the locked wallpaper:
[0191] 1. The screen state of the electronic device corresponding to the unlocked wallpaper is the expanded state.
[0192] 1. If M=1 (the lock wallpaper is an expanded wallpaper, and the lock wallpaper corresponds to the expanded state of the electronic device); obtain the corrected mLockScale value.
[0193] 2. If M=2 (the lock wallpaper is a folded wallpaper, and the lock wallpaper corresponds to the unfolded state of the electronic device); obtain the corrected mLockScale value.
[0194] 3. If M=3 (the lock wallpaper is an expanded wallpaper, and the lock wallpaper corresponds to the folded state of the electronic device); obtain the corrected mLockScale value, and perform a secondary correction on the corrected mLockScale value, the secondary corrected mLockScale value=(the preview image height of the folded wallpaper in the expanded state of the electronic device / the preview image height of the folded wallpaper in the folded state of the electronic device)*the corrected mLockScale value.
[0195] 4. If M=4 (the lock wallpaper is a folded wallpaper, and the lock wallpaper corresponds to the folded state of the electronic device); obtain the corrected mLockScale value, and perform a secondary correction on the corrected mLockScale value, the secondary corrected mLockScale value=(the height of the preview image of the expanded wallpaper in the expanded state of the electronic device / the height of the preview image of the expanded wallpaper in the folded state of the electronic device)*the corrected mLockScale value.
[0196] 2. The screen state of the electronic device corresponding to the unlocked wallpaper is folded.
[0197] 1. If M=1 (the lock wallpaper is an unfolded wallpaper, and the lock wallpaper corresponds to the unfolded state of the electronic device); obtain the corrected mLockScale value, and perform a secondary correction on the corrected mLockScale value, the secondary corrected mLockScale value=(the preview image height of the folded wallpaper in the folded state of the electronic device / the preview image height of the folded wallpaper in the unfolded state of the electronic device)*the corrected mLockScale value.
[0198] 2. If M=2 (the lock wallpaper is a folded wallpaper, and the lock wallpaper corresponds to the unfolded state of the electronic device); obtain the corrected mLockScale value, and perform a secondary correction on the corrected mLockScale value, the secondary corrected mLockScale value=(the preview image height of the unfolded wallpaper in the folded state of the electronic device / the preview image height of the unfolded wallpaper in the unfolded state of the electronic device)*the corrected mLockScale value.
[0199] 3. If M=3 (the lock wallpaper is an unfolded wallpaper, and the lock wallpaper corresponds to the folded state of the electronic device); obtain the corrected mLockScale value.
[0200] 4. If M=4 (the lock wallpaper is a folded wallpaper, and the lock wallpaper corresponds to the folded state of the electronic device); obtain the corrected mLockScale value.
[0201] Exemplary, reference Fig.14In the unfolded state of the mobile phone, the user first opens the unfolded wallpaper setting interface 201, which includes an unfolded wallpaper preview box 202. For example, the unfolded wallpaper preview image displayed in the unfolded wallpaper preview box 202 on the mobile phone has a picture zoom ratio of S. e 1, the corrected mLockScale value is (H e 2 / H e 1)*S e 1. The value of M is updated to 1, indicating that the lock wallpaper is an expanded wallpaper, and the lock wallpaper corresponds to the expanded state of the electronic device.
[0202] Afterwards, in response to the user's operation of folding the mobile phone from the unfolded state to the folded state, the screen state of the mobile phone is changed to the folded state, and the mobile phone displays the folded state wallpaper setting interface 301, and the folded state wallpaper setting interface 301 includes the folded state wallpaper preview box 302. When drawing the first frame image in the folded state wallpaper preview box 302, the corrected mLockScale value is obtained. It is determined that the screen state of the electronic device corresponding to the current unlocked wallpaper (folded state wallpaper) is the folded state. The corrected mLockScale value is corrected twice.
[0203] The mLockScale value after the second correction=(the height of the preview image of the folded wallpaper when the electronic device is in the folded state / the height of the preview image of the folded wallpaper when the electronic device is in the unfolded state)*the corrected mLockScale value.
[0204] That is, mLockScale value after secondary correction = (H f 2 / H e 2)*(H e 2 / H e 1)*S e 1=S e 1.
[0205] In the embodiment of the present application, the electronic device is an electronic device that can run an operating system and install application programs. Optionally, the operating system running on the electronic device can be system, system, System, etc.
[0206] For example, Fig.15 A schematic flow chart of a wallpaper drawing process is shown.
[0207] like Fig.15 As shown, the electronic device includes a screen status monitoring module, a control life cycle management module, a sliding monitoring module, a wallpaper control module, a drawing module, etc.
[0208] In one example, the screen state monitoring module obtains that the current screen state of the electronic device is a folded state. If the control lifecycle management module determines that the user's adjustment operation (sliding gesture, zooming gesture, etc.) on the preview image is received for the first time, the wallpaper is determined to be a lock wallpaper. The lifecycle management module notifies the sliding monitoring module of the first adjustment operation on the wallpaper preview image. The sliding monitoring module obtains the position of the user's adjustment operation on the preview image on the screen, and transmits the position of the adjustment operation on the screen to the wallpaper control module. The wallpaper control module determines that the current wallpaper is a lock wallpaper, determines the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio and other parameters according to the position of the adjustment operation on the screen, and notifies the drawing module to use local parameters for wallpaper drawing. Exemplarily, the drawing module synchronizes local parameters (the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio, etc.) to shared parameters. For example, the value of the horizontal coordinate of the wallpaper center point is synchronized to mLockCenterX, the value of the vertical coordinate of the wallpaper center point is synchronized to mLockCenterY, and the corresponding image zoom ratio is synchronized to mLockScale. Optionally, the value of mLockScale is also corrected, and the corrected mLockScale = (the height of the preview image of the unlocked wallpaper / the height of the preview image of the locked wallpaper) * the image zoom ratio corresponding to the locked wallpaper; and the value of mLockStated is updated; mIsUnLockFirstScroll is set to true; and the value of M is updated. After the control lifecycle management module receives the user's adjustment operation on the preview image again (sliding gesture, zooming gesture, etc.), the sliding monitoring module is notified to receive the adjustment operation on the wallpaper preview image again. The sliding monitoring module obtains the position of the user's adjustment operation on the preview image on the screen, and transmits the position of the adjustment operation on the screen to the wallpaper control module. The wallpaper control module determines that the current wallpaper is a locked wallpaper, determines the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio and other parameters according to the position of the adjustment operation on the screen, and notifies the drawing module to use local parameters to draw the wallpaper. Exemplarily, the drawing module synchronizes the local parameters (the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio, etc.) to the shared parameters. For example, synchronize the horizontal coordinate value of the wallpaper center point to mLockCenterX, synchronize the vertical coordinate value of the wallpaper center point to mLockCenterY, and synchronize the corresponding image zoom ratio to mLockScale. Optionally, the value of mLockScale is also corrected, and the corrected mLockScale = (the height of the preview image of the unlocked wallpaper / the height of the preview image of the locked wallpaper) * the image zoom ratio corresponding to the locked wallpaper. Optionally, the value of mLockStated can also be updated; mIsUnLockFirstScroll is set to true; and the value of M can be updated.
[0209] In one example, the screen state monitoring module obtains that the current screen state of the electronic device is an expanded state. If the control life cycle management module determines that the user's adjustment operation (sliding gesture, zooming gesture, etc.) on the preview image is received for the first time, the wallpaper is determined to be a locked wallpaper. The life cycle management module notifies the sliding monitoring module of the first adjustment operation on the wallpaper preview image. The sliding monitoring module obtains the position of the user's adjustment operation on the preview image on the screen, and transmits the position of the adjustment operation on the screen to the wallpaper control module. The wallpaper control module determines that the current wallpaper is a locked wallpaper, determines the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio and other parameters according to the position of the adjustment operation on the screen, and notifies the drawing module to use local parameters for wallpaper drawing. Exemplarily, the drawing module synchronizes local parameters (the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio, etc.) to shared parameters. For example, the value of the horizontal coordinate of the wallpaper center point is synchronized to mLockCenterX, the value of the vertical coordinate of the wallpaper center point is synchronized to mLockCenterY, and the corresponding image zoom ratio is synchronized to mLockScale. Optionally, the value of mLockScale is also corrected, and the corrected mLockScale = (the height of the preview image of the unlocked wallpaper / the height of the preview image of the locked wallpaper) * the image zoom ratio corresponding to the locked wallpaper; and the value of mLockStated is updated; mIsUnLockFirstScroll is set to true; and the value of M is updated. After the control lifecycle management module receives the user's adjustment operation on the preview image again (sliding gesture, zooming gesture, etc.), the sliding monitoring module is notified to receive the adjustment operation on the wallpaper preview image again. The sliding monitoring module obtains the position of the user's adjustment operation on the preview image on the screen, and transmits the position of the adjustment operation on the screen to the wallpaper control module. The wallpaper control module determines that the current wallpaper is a locked wallpaper, determines the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio and other parameters according to the position of the adjustment operation on the screen, and notifies the drawing module to use local parameters to draw the wallpaper. Exemplarily, the drawing module synchronizes the local parameters (the horizontal coordinate of the wallpaper center point, the vertical coordinate of the wallpaper center point, the corresponding image zoom ratio, etc.) to the shared parameters. For example, synchronize the horizontal coordinate value of the wallpaper center point to mLockCenterX, synchronize the vertical coordinate value of the wallpaper center point to mLockCenterY, and synchronize the corresponding image zoom ratio to mLockScale. Optionally, the value of mLockScale is also corrected, and the corrected mLockScale = (the height of the preview image of the unlocked wallpaper / the height of the preview image of the locked wallpaper) * the image zoom ratio corresponding to the locked wallpaper. Optionally, the value of mLockStated can also be updated; mIsUnLockFirstScroll is set to true; and the value of M can be updated.
[0210] In one example, the screen state monitoring module obtains that the current screen state of the electronic device is a folded state. If the control lifecycle management module determines that the user's adjustment operation (sliding gesture, zooming gesture, etc.) on the preview image of the unlocked wallpaper is received, the sliding monitoring module is notified to receive the user's adjustment operation on the preview image of the unlocked wallpaper. The sliding monitoring module obtains the position of the user's adjustment operation on the preview image of the unlocked wallpaper on the screen, and transmits the position of the adjustment operation on the screen to the wallpaper control module. In a possible scenario, the wallpaper control module determines that the current wallpaper is an unlocked wallpaper and is in the first frame image drawing process (mIsUnLockFirstScroll is true), and obtains shared parameters; including mLockCenterX, mLockCenterY, and the corrected mLockScale. The drawing module also determines whether the current electronic device screen state is consistent with the electronic device screen state corresponding to the drawing of the locked wallpaper. If it is determined that the current electronic device screen state is different from the electronic device screen state corresponding to the drawing of the locked wallpaper (locked wallpaper corresponds to the expanded state), the corrected mLockScale is corrected twice. The wallpaper control module notifies the drawing module to use the shared parameters to draw the wallpaper. For example, the value of Offset is calculated according to mLockCenterX and the value of the horizontal coordinate of the center point of the current wallpaper, and the value of the horizontal coordinate of the center point of the current wallpaper is verified and corrected. Furthermore, the obtained value of the shared parameter is synchronized to the local parameter; mIsUnLockFirstScroll is set to false. In one possible scenario, the wallpaper control module determines that the current wallpaper is an unlocked wallpaper and is not the first frame image drawing process (mIsUnLockFirstScroll is false), and notifies the drawing module to use local parameters for wallpaper drawing.
[0211] In one example, the screen state monitoring module obtains that the current screen state of the electronic device is in the expanded state. If the control lifecycle management module determines that the user's adjustment operation (sliding gesture, zooming gesture, etc.) on the preview image of the unlocked wallpaper is received, the sliding monitoring module is notified to receive the user's adjustment operation on the preview image of the unlocked wallpaper. The sliding monitoring module obtains the position of the user's adjustment operation on the preview image of the unlocked wallpaper on the screen, and transmits the position of the adjustment operation on the screen to the wallpaper control module. In a possible scenario, the wallpaper control module determines that the current wallpaper is an unlocked wallpaper and is in the first frame image drawing process (mIsUnLockFirstScroll is true), and obtains shared parameters; including mLockCenterX, mLockCenterY, and the corrected mLockScale. The drawing module also determines whether the current electronic device screen state is consistent with the electronic device screen state corresponding to the drawing of the locked wallpaper. If it is determined that the current electronic device screen state is different from the electronic device screen state corresponding to the drawing of the locked wallpaper (the locked wallpaper corresponds to the folded state), the corrected mLockScale is corrected twice. The wallpaper control module notifies the drawing module to use the shared parameters to draw the wallpaper. For example, the value of Offset is calculated according to mLockCenterX and the value of the horizontal coordinate of the center point of the current wallpaper, and the value of the horizontal coordinate of the center point of the current wallpaper is verified and corrected. Furthermore, the obtained value of the shared parameter is synchronized to the local parameter; mIsUnLockFirstScroll is set to false. In one possible scenario, the wallpaper control module determines that the current wallpaper is an unlocked wallpaper and is not the first frame image drawing process (mIsUnLockFirstScroll is false), and notifies the drawing module to use local parameters for wallpaper drawing.
[0212] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module corresponding to each function in order to realize the above functions. Those skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present application.
[0213] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0214] In one example, see Fig.16 , which shows a possible structural diagram of the electronic device involved in the above embodiment. The electronic device 1400 includes: a processing unit 1410 , a storage unit 1420 and a display unit 1430 .
[0215] The processing unit 1410 is used to control and manage the actions of the electronic device 1400. The storage unit 1420 is used to store the program code and data of the electronic device 1400. The processing unit 1410 calls the program code stored in the storage unit 1420 to execute each step in the above method embodiment. The display unit 1430 is used to display the user interface of the electronic device 1400. For example, the expanded wallpaper, the expanded wallpaper preview interface, the expanded wallpaper setting interface, the folded wallpaper, the folded wallpaper preview interface, the folded wallpaper setting interface, etc.
[0216] Of course, the unit modules in the electronic device 1400 include but are not limited to the processing unit 1410, the storage unit 1420 and the display unit 1430. For example, the electronic device 1400 may also include a communication unit, a power supply unit, etc. The communication unit is used for the electronic device 1400 to communicate with other electronic devices; the power supply unit is used to supply power to the electronic device 1400.
[0217] The processing unit 1410 may be a processor or a controller, such as a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The storage unit 1420 may be a memory. The display unit 1430 may be a display screen, etc.
[0218] For example, the processing unit 1410 is a processor (such as Figure 7The processor 110 shown in FIG. 14 ), the storage unit 1420 may be a memory (eg, Figure 7 The internal memory 121 shown in FIG. 14 ), the display unit 1430 may be a display screen (such as Figure 7 The electronic device 1400 provided in the embodiment of the present application may be Figure 7 The electronic device 100 shown in FIG. 1 is a schematic diagram of an embodiment of the present invention. The processor, memory, display screen, etc., can be connected together, for example, via a bus. The processor calls the program code stored in the memory to execute each step in the above method embodiment.
[0219] The embodiment of the present application also provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected by lines. For example, the interface circuit can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.
[0220] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the mobile phone in the above-mentioned method embodiment.
[0221] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step executed by the mobile phone in the above method embodiment.
[0222] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0223] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0224] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0225] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0226] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0227] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A wallpaper preview interface display method, It is characterized in that Applied to a folding screen electronic device, the folding screen electronic device includes an unfolded state and a folded state, and the method includes: The foldable screen electronic device displays a first interface, where the first interface is used to select a wallpaper for the foldable screen electronic device; In response to a selection operation on a first picture in the first interface, the folding screen electronic device displays a second interface in a first state; the first state is an unfolded state or a folded state, the second interface is used to set a wallpaper of the folding screen electronic device in the first state, the second interface includes a first preview frame, the first preview frame includes a first preview image, the first preview image corresponds to a first area range in the first picture, a width of the first area range is the same as a width of a display area of the folding screen electronic device in the first state, and a height of the first area range is the same as a height of a display area of the folding screen electronic device in the first state; After receiving the first operation on the second interface, the foldable screen electronic device displays a third interface; the third interface is used to set the wallpaper of the foldable screen electronic device in a second state, the second state is an unfolded state or a folded state, the second state is different from the first state, the third interface includes a second preview frame, the second preview frame includes a second preview image, the second preview image corresponds to a second area range in the first picture, the width of the second area range is the same as the width of the display area of the foldable screen electronic device in the second state, the height of the second area range is the same as the height of the display area of the foldable screen electronic device in the second state, and the vertical coordinate of the center point of the second area range is the same as the vertical coordinate of the center point of the first area range; After receiving the sliding operation on the third interface, the foldable screen electronic device displays a third preview image; the third preview image corresponds to a third area range in the first picture, the vertical coordinate of the center point of the third area range is the same as the vertical coordinate of the center point of the first area range, and the offset between the left boundary of the third area range and the left boundary of the first area range meets the following conditions: 0 <= offset <= (W1-W2), Among them, W1 is the width of the display area of the folding screen electronic device in the unfolded state, and W2 is the width of the display area of the folding screen electronic device in the folded state.
2. The method according to claim 1, It is characterized in that The first preview image corresponds to a first zoom ratio of the first picture, and the second preview image corresponds to a second zoom ratio of the first picture, where the second zoom ratio is obtained by correcting the first zoom ratio according to a height of the second preview frame and a height of the first preview frame.
3. The method according to claim 2, It is characterized in that If the folding screen electronic device is in the second state when displaying the third interface, the method further includes: Acquire a third zoom ratio; the third zoom ratio is obtained by correcting the first zoom ratio according to a height of a third preview frame and a height of the first preview frame; the third preview frame is a preview frame in a fourth interface displayed by the folding screen electronic device in the first state, and the fourth interface is used to set a wallpaper of the folding screen electronic device in the second state; The second zoom ratio is acquired according to the third zoom ratio.
4. The method according to claim 3, It is characterized in that The acquiring the second zoom ratio according to the third zoom ratio comprises: The third zoom ratio is modified according to the height of the second preview frame and the height of the third preview frame to obtain the second zoom ratio.
5. The method according to any one of claims 2 to 4, It is characterized in that The method further comprises: When drawing the first frame preview image of the second preview frame, the second zoom ratio is obtained.
6. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: The first preview image is set as the wallpaper of the folding screen electronic device in the first state, and the second preview image is set as the wallpaper of the folding screen electronic device in the second state.
7. The method according to any one of claims 1 to 4, It is characterized in that The first operation includes an operation of changing the folding screen electronic device from the first state to the second state.
8. An electronic device, It is characterized in that include: one or more processors; Display screen; Memory; One or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, It is characterized in that The method comprises computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Electronic device comprising multiple displays and method for operating same
CN109691073A
Foldable electronic device and method for controlling screen by using gesture
US20210089202A1