Method for setting wallpaper and electronic device
By setting the folded state wallpaper as part of the expanded state wallpaper in the folded screen electronic device and using specific calculation methods to obtain the folded state wallpaper image, the visual experience inconsistency caused by the independent settings of the expanded state wallpaper and the folded state wallpaper is solved. The continuous display effect is achieved when the equipment state changes.
Patent Information
- Application Number
- CN202310915576.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2043-07-24
AI Technical Summary
In folding screen electronic devices, the independent settings of expanding and folding state wallpapers cause users to fail to obtain a coherent visual experience when the device state changes, and the wallpaper image will jump, affecting the user experience.
By limiting the folded state wallpaper as part of the expanded state wallpaper, when setting the wallpaper, make sure that the folded state wallpaper is adjusted based on the expanded state wallpaper, ensuring that it can be displayed coherently when the device state changes, using specific offsets and corrections The coefficient calculation method is used to obtain the image of the folded state wallpaper, ensuring that it is displayed within the range of the expanded state wallpaper.
It provides a coherent visual experience when the state of the electronic device changes, enhances the user experience, and ensures that the wallpaper has consistent dynamic effects between the expansion and folding states.
Smart Images

Figure CN117724784B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method for setting wallpaper 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.
[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 method for setting wallpaper and an electronic device. When setting the wallpaper, the folded wallpaper is restricted to be a part of the unfolded wallpaper, so as to provide a consistent visual experience for the user when unfolding or folding the electronic device.
[0007] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0008] In a first aspect, a method for setting wallpaper is provided, which is applied to a folding screen electronic device, and the method includes: displaying a first interface for selecting wallpaper of the folding screen electronic device, and displaying a second interface or a third interface in response to a selection operation of a first picture in the first interface; the second interface is used to set the wallpaper of the folding screen electronic device in the unfolded state, and the third interface is used to set the wallpaper of the folding screen electronic device in the folded state. In response to an operation of saving the wallpaper on the second interface or the third interface, the first area image of the first picture is set as the wallpaper of the folding screen electronic device in the unfolded state, and the second area image of the first picture is set as the wallpaper of the folding screen electronic device in the folded state; wherein, the wallpaper of the folding screen electronic device in the unfolded state after setting includes the wallpaper of the folding screen electronic device in the folded state.
[0009] In the method, when setting the expanded wallpaper and the folded wallpaper, the folded wallpaper is limited 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.
[0010] In combination with the first aspect, in one embodiment, 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.
[0011] 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.
[0012] In combination with the first aspect, in one embodiment, the method further includes: acquiring a second area image according to the first picture, the first area image and an offset, wherein the offset is a distance between a left border of the first area image and a left border of the second area image.
[0013] In this method, the image corresponding to the folded wallpaper can be obtained based on the first picture and the image corresponding to the expanded wallpaper and the offset, without having to determine the image corresponding to the folded wallpaper based on the image in the preview box of the folded wallpaper setting interface.
[0014] In one embodiment, the offset is: (W1-W2) / 2-(X1-X2)*correction coefficient. Wherein, W1 is the width of the display area of the foldable screen electronic device in the unfolded state, W2 is the width of the display area of the foldable screen electronic device in the folded state, X1 is the horizontal coordinate of the center point of the first area image in the first picture coordinate system, X2 is the horizontal coordinate of the center point of the second area image in the first picture coordinate system, and the correction coefficient is used to convert from the first picture coordinate system to the screen coordinate system of the foldable screen electronic device.
[0015] The offset satisfies the following condition: 0<=offset<=(W1-W2).
[0016] In this way, it can be achieved that the second area is within the range of the first area, so that the unfolded wallpaper includes the folded wallpaper.
[0017] In combination with the first aspect, in one embodiment, in response to a selection operation on a first picture in a first interface, a second interface is displayed, and in response to a first operation on the second interface, a third interface is displayed; the third interface includes a first preview box, and the first preview box is used to display a preview image of the wallpaper of the folding screen electronic device in a folded state.
[0018] That is to say, first set the wallpaper of the foldable screen electronic device in the unfolded state (set the unfolded wallpaper first), and then set the wallpaper of the foldable screen electronic device in the folded state (set the folded wallpaper later). After setting the unfolded wallpaper, when setting the folded wallpaper, it is not allowed to modify 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); only the second area (second image) is allowed to move 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.
[0019] In one embodiment, the third area image of the first picture is displayed in the first preview frame, the size of the third area is the same as the size of the display area of the folding screen electronic device in the folded state, and the first area image includes the third area image. In response to a left or right swipe gesture on the third area image in the first preview frame, the second area image is displayed in the first preview frame.
[0020] In this method, when the folded wallpaper is set later, the first picture is allowed to be moved left and right.
[0021] In one implementation, an upward or downward sliding gesture on the third region image in the first preview frame is received, and the third region image is displayed in the first preview frame.
[0022] In this method, when the folded wallpaper is set later, the first picture is not allowed to be moved up and down.
[0023] In one implementation, a gesture for changing the zoom ratio of the first image in the first preview frame is received, and the third region image is displayed in the first preview frame.
[0024] In this method, when the folded wallpaper is set later, the zoom ratio of the first picture is not allowed to be modified.
[0025] In one embodiment, the horizontal coordinate and the vertical coordinate of the center point of the first area image in the first picture coordinate system and the zoom ratio of the first picture corresponding to the first area image are obtained; the first horizontal coordinate is obtained according to the position of the left or right sliding gesture on the third area image; the second area image is obtained according to the first horizontal coordinate, the horizontal coordinate and the vertical coordinate of the center point of the first area image in the first picture coordinate system and the zoom ratio of the first picture corresponding to the first area image.
[0026] In one implementation, when drawing the first preview image in the first preview frame, the horizontal and vertical coordinates of the center point of the first region image in the first image coordinate system and the zoom ratio of the first image corresponding to the first region image are obtained.
[0027] In this method, the wallpaper set later (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; this method not only ensures the association and restriction relationship between the wallpaper set later (unlocked wallpaper) and the wallpaper set earlier (locked wallpaper), but also achieves decoupling in the adjustment process of the unlocked wallpaper and the locked wallpaper.
[0028] In combination with the first aspect, in one embodiment, in response to a selection operation on a first picture in a first interface, a third interface is displayed, and in response to a second operation on the third interface, a second interface is displayed; the second interface includes a second preview box, and the second preview box is used to display a preview image of the wallpaper of the folding screen electronic device in the unfolded state.
[0029] That is to say, first set the wallpaper of the foldable electronic device in the folded state (set the folded state wallpaper first), and then set the wallpaper of the foldable electronic device in the unfolded state (set the unfolded state wallpaper later). After setting the folded state wallpaper, when setting the unfolded state wallpaper, it is not allowed to modify 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); 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.
[0030] In one embodiment, a fourth region image of the first picture is displayed in the second preview frame, the size of the fourth region is the same as the size of the display region of the folding screen electronic device in the unfolded state, and the fourth region image includes the second region image. In response to a left or right swipe gesture on the fourth region image in the second preview frame, the first region image is displayed in the second preview frame.
[0031] In this method, when the expanded wallpaper is set later, the first picture is allowed to be moved left and right.
[0032] In one implementation, an upward or downward sliding gesture on the fourth region image in the second preview frame is received, and the fourth region image is displayed in the second preview frame.
[0033] In this method, when the expanded wallpaper is set later, the first picture is not allowed to be moved up and down.
[0034] In one implementation, a gesture for changing the zoom ratio of the first image in the second preview frame is received, and the fourth region image is displayed in the second preview frame.
[0035] In this method, when the expanded wallpaper is set later, the zoom ratio of the first image is not allowed to be modified.
[0036] In one embodiment, the horizontal coordinate and the vertical coordinate of the center point of the second area image in the first picture coordinate system and the zoom ratio of the first picture corresponding to the second area image are obtained; the second horizontal coordinate is obtained according to the position of the left or right sliding gesture on the fourth area image; the first area image is obtained according to the second horizontal coordinate, the horizontal coordinate and the vertical coordinate of the center point of the second area image in the first picture coordinate system and the zoom ratio of the first picture corresponding to the second area image.
[0037] In one implementation, when drawing the first frame image in the second preview frame, the horizontal coordinate and the vertical coordinate of the center point of the second region image in the first image coordinate system and the zoom ratio of the first image corresponding to the second region image are obtained.
[0038] In this method, the wallpaper set later (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; this method not only ensures the association and restriction relationship between the wallpaper set later (unlocked wallpaper) and the wallpaper set earlier (locked wallpaper), but also achieves decoupling in the adjustment process of the unlocked wallpaper and the locked wallpaper.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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.
[0045] 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
[0046] Figure 1 A schematic diagram of an electronic device to which the method for setting wallpaper provided in an embodiment of the present application is applicable;
[0047] Figure 2 A schematic diagram of an electronic device to which the method for setting wallpaper provided in an embodiment of the present application is applicable;
[0048] Figure 3 A schematic diagram of a method for setting wallpaper;
[0049] Figure 4 A schematic diagram of a method for setting wallpaper;
[0050] Figure 5 A schematic diagram of a method for setting wallpaper provided in an embodiment of the present application;
[0051] Fig. 6A A schematic diagram of the principle of the method for setting wallpaper provided in an embodiment of the present application;
[0052] Figure 6B A schematic diagram of the principle of the method for setting wallpaper provided in an embodiment of the present application;
[0053] Figure 6C A schematic diagram of the principle of the method for setting wallpaper provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0055] Fig. 8A A schematic diagram of a scenario example of the method for setting wallpaper provided in an embodiment of the present application;
[0056] Figure 8B A schematic diagram of a scenario example of the method for setting wallpaper provided in an embodiment of the present application;
[0057] Fig.9A A schematic diagram of a scenario example of the method for setting wallpaper provided in an embodiment of the present application;
[0058] Fig. 9B A schematic diagram of a scenario example of the method for setting wallpaper provided in an embodiment of the present application;
[0059] Fig. 10A A schematic diagram of the principle of the method for setting wallpaper provided in an embodiment of the present application;
[0060] Fig. 10B A schematic diagram of the principle of the method for setting wallpaper provided in an embodiment of the present application;
[0061] Fig.11 A schematic diagram of a flow chart of a method for setting wallpaper provided in an embodiment of the present application;
[0062] Fig.12 A schematic diagram of a flow chart of a method for setting wallpaper provided in an embodiment of the present application;
[0063] Fig.13 A schematic diagram of a flow chart of a method for setting wallpaper provided in an embodiment of the present application;
[0064] Fig.14 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] The method for setting wallpaper 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.
[0070] For example, Figure 5 As 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.
[0071] 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.
[0072] 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.
[0073] 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.
[0074] 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.
[0075] 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).
[0076] The electronic device may provide a user interface for setting the expanded wallpaper and the folded wallpaper.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] The method for setting wallpaper 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.
[0084] Figure 7 1 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 191 and application processor.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] The method for setting wallpaper provided in the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.
[0109] 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.
[0110] In some embodiments, the user first sets the expanded wallpaper and then sets the folded wallpaper.
[0111] Exemplary, reference Fig. 8A, the mobile phone screen is in an expanded state. 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 mobile phone. Exemplarily, the wallpaper setting interface 200 includes multiple pictures. In response to the user's selection operation on one of the pictures, the mobile phone displays an expanded wallpaper setting interface 201. 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. 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.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] In the method for setting wallpaper 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).
[0116] 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.
[0117] In other embodiments, the user first sets the folded wallpaper and then sets the unfolded wallpaper.
[0118] 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.
[0119] 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.
[0120] 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.
[0121] 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.
[0122] In the method for setting wallpaper 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.
[0123] In the method for setting wallpaper 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 rightward 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 leftward 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).
[0124] 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.
[0125] 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.
[0126] In the method for setting wallpaper 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.
[0127] 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.
[0128] 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 successfully set first is called the locked wallpaper, and the wallpaper to be set 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.
[0129] In some embodiments, the user first sets the expanded wallpaper and then sets the folded wallpaper.
[0130] 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.
[0131] 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.
[0132] 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.
[0133] The user can adjust the position of the picture displayed in the wallpaper preview box 206 to adjust the area of the folded wallpaper in the picture. In the method for setting wallpaper 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.
[0134] 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'.
[0135] 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'.
[0136] 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.
[0137] 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.
[0138] 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.
[0139] In some embodiments, the user first sets the folded wallpaper and then sets the expanded wallpaper.
[0140] 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.
[0141] 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.
[0142] 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.
[0143] The user can adjust the position of the picture displayed in the wallpaper preview box 306 to adjust the area of the expanded wallpaper in the picture. In the method for setting wallpaper 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.
[0144] 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'.
[0145] 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'.
[0146] 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.
[0147] 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.
[0148] 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.
[0149] 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.
[0150] 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.
[0151] 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.
[0152] 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.
[0153] 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.
[0154] Exemplarily, the following implementation method may be used to limit the horizontal coordinate range of the center point of the unlocked wallpaper.
[0155]
[0156]
[0157] The method for setting wallpaper 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.
[0158] 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.
[0159] In some embodiments, the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, or a cloud architecture. Taking the system as an example, the software structure of the electronic device 100 is exemplarily described.
[0160] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer.
[0161] The application layer can include a series of application packages APK. The application framework layer provides application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. The system library can include multiple functional modules. For example: surface manager, media library, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. Android runtime is responsible for the scheduling and management of the Android system. The kernel layer is the layer between hardware and software.
[0162] The application layer includes a wallpaper application for managing the generation and display of wallpapers. For example, the wallpaper application includes a coordinate conversion module, a wallpaper selection module, and a wallpaper drawing module. The application framework layer includes a sliding listener for monitoring the user's sliding, zooming, and other gestures on the screen.
[0163] For example, Fig.11 FIG. 1 is a schematic diagram showing a processing flow of an electronic device after receiving a sliding gesture from a user. Fig.11 As shown, the method includes:
[0164] S401: A sliding listener detects a sliding gesture of a user on a screen.
[0165] The slide listener obtains the moving distance (dx, dy) of the slide gesture.
[0166] S402: The sliding listener transmits the moving distance (dx, dy) to the coordinate conversion module of the wallpaper application.
[0167] S403. The coordinate conversion module obtains the coordinates (fX, fY) of the current action position of the sliding gesture according to the moving distance (dx, dy).
[0168] The coordinate conversion module obtains the coordinates (fX, fY) of the current position of the sliding gesture according to the saved touch point position and movement distance (dx, dy).
[0169] S404: The coordinate conversion module transmits the current action position (fX, fY) of the sliding gesture to the wallpaper selection module.
[0170] S405. The wallpaper selection module determines a screenshot image according to the current action position (fX, fY) of the sliding gesture.
[0171] In one implementation, if it is determined that the current wallpaper is a locked wallpaper, the screenshot area in the picture is adjusted according to the current action position (fX, fY) of the sliding gesture to determine the screenshot image. If it is determined that the current wallpaper is an unlocked wallpaper, the screenshot area in the picture is adjusted according to the horizontal coordinate fX of the current action position of the sliding gesture to determine the screenshot image.
[0172] S406: The wallpaper selection module notifies the wallpaper drawing module to draw wallpaper.
[0173] S407: The wallpaper drawing module draws the wallpaper according to the screenshot image.
[0174] For example, Fig.12 FIG. 1 is a schematic diagram showing a processing flow of an electronic device after receiving a zoom gesture from a user. Fig.12 As shown, the method includes:
[0175] S501: The sliding listener detects a zooming gesture of the user on the screen.
[0176] The slide listener obtains the coordinates (fX, fY) of the current position of the zoom gesture and the zoom ratio corresponding to the gesture.
[0177] S502: The sliding listener transmits the coordinates (fX, fY) of the current position of the zoom gesture and the zoom ratio corresponding to the gesture to the coordinate conversion module of the wallpaper application.
[0178] S503: The coordinate conversion module transmits the coordinates (fX, fY) of the current position of the zoom gesture and the zoom ratio corresponding to the gesture to the wallpaper selection module.
[0179] S504: The wallpaper selection module determines a screenshot image according to the coordinates (fX, fY) of the current action position of the zoom gesture and the zoom ratio corresponding to the gesture.
[0180] In one implementation, if it is determined that the current wallpaper is a locked wallpaper, the screenshot area in the picture is adjusted according to the coordinates (fX, fY) of the current action position of the zoom gesture and the zoom ratio corresponding to the gesture to determine the screenshot image. If it is determined that the current wallpaper is an unlocked wallpaper, the screenshot area in the picture is not adjusted.
[0181] S505: The wallpaper selection module notifies the wallpaper drawing module to draw wallpaper.
[0182] S506: The wallpaper drawing module draws the wallpaper according to the screenshot image.
[0183] In the above-mentioned method for setting wallpaper provided in the embodiment of the present application, the unlocked wallpaper needs to use mLockCenterX (the horizontal coordinate of the center point of the shared image) to limit the horizontal coordinate range of the center point of the image, and mLockCenterY (the vertical coordinate of the center point of the shared image) 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.
[0184] The method for setting wallpaper 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.
[0185] 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.
[0186] For example, Fig.13 A schematic flow chart of a method for setting wallpaper provided in an embodiment of the present application is shown.
[0187] like Fig.13 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.
[0188] 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.
[0189] 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.
[0190] 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 without worrying about the shared parameters; this method not only ensures the associated restriction relationship between the unlocked wallpaper and the locked wallpaper, but also achieves decoupling in the adjustment process of the unlocked wallpaper and the locked wallpaper.
[0191] 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.
[0192] 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.
[0193] In one example, see Fig.14 , 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 .
[0194] 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.
[0195] 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.
[0196] 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.
[0197] For example, the processing unit 1410 is a processor (such as Figure 7 The processor 110 shown in FIG. 14 ), the storage unit 1420 may be a memory (such as 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.
[0198] 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.
[0199] 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.
[0200] 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.
[0201] 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.
[0202] 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.
[0203] 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.
[0204] 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.
[0205] 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.
[0206] 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 method for setting wallpaper, characterized in that: Applied to a folding screen electronic device, the method comprises: Displaying a first interface, where the first interface is used to select a wallpaper for the folding screen electronic device; In response to a selection operation of the first picture in the first interface, displaying a second interface or a third interface; the second interface is used to set the wallpaper of the folding screen electronic device in the unfolded state, and the third interface is used to set the wallpaper of the folding screen electronic device in the folded state; In response to an operation of saving the wallpaper on the second interface or the third interface, a first area image of the first picture is set as the wallpaper of the folding screen electronic device in the unfolded state, and a second area image of the first picture is set as the wallpaper of the folding screen electronic device in the folded state; the second area is a part of the first area, a size of the first area is the same as a size of a display area of the folding screen electronic device in the unfolded state, and a size of the second area is the same as a size of a display area of the folding screen electronic device in the folded state; Among them, after setting, the wallpaper of the folding screen electronic device in the unfolded state includes the wallpaper of the folding screen electronic device in the folded state.
2. The method according to claim 1, characterized in that: The first area and the second area have the same height.
3. The method according to claim 1, characterized in that The method further comprises: The second region image is acquired according to the first picture, the first region image and an offset, where the offset is a distance between a left border of the first region image and a left border of the second region image.
4. The method according to claim 3, characterized in that The offset is: (W1-W2) / 2-(X1-X2)*correction factor, Among them, W1 is the width of the display area of the folding screen electronic device in the unfolded state, W2 is the width of the display area of the folding screen electronic device in the folded state, X1 is the horizontal coordinate of the center point of the image of the first area in the first picture coordinate system, X2 is the horizontal coordinate of the center point of the image of the second area in the first picture coordinate system, and the correction coefficient is used to convert from the first picture coordinate system to the screen coordinate system of the folding screen electronic device.
5. The method according to claim 4, characterized in that The offset satisfies 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 unfolded state.
6. The method according to any one of claims 1 to 5, characterized in that: In response to a selection operation on the first picture in the first interface, the second interface is displayed, and the method further includes: In response to a first operation on the second interface, the third interface is displayed; the third interface includes a first preview frame, and the first preview frame is used to display a preview image of the wallpaper of the folding screen electronic device in a folded state.
7. The method according to claim 6, characterized in that The first preview frame displays a third area image of the first picture, the size of the third area is the same as the size of the display area of the folding screen electronic device in the folded state, and the first area image includes the third area image.
8. The method according to claim 7, characterized in that The method further comprises: In response to a leftward or rightward sliding gesture on the third region image in the first preview frame, the second region image is displayed in the first preview frame.
9. The method according to claim 7, characterized in that: The method further comprises: An upward or downward sliding gesture for the third region image is received in the first preview frame, and the third region image is displayed in the first preview frame.
10. The method according to claim 7, characterized in that The method further comprises: A gesture for changing a zoom ratio of the first image in the first preview frame is received, and the third region image is displayed in the first preview frame.
11. The method according to claim 8, characterized in that The method further comprises: Acquire the horizontal coordinate and the vertical coordinate of the center point of the first region image in the first picture coordinate system, and the zoom ratio of the first picture corresponding to the first region image; Acquire a first horizontal coordinate according to the action position of the leftward or rightward sliding gesture on the third region image; The second region image is acquired according to the first horizontal coordinate, the horizontal coordinate and the vertical coordinate of the center point of the first region image in the first picture coordinate system, and the zoom ratio of the first picture corresponding to the first region image.
12. The method according to claim 11, characterized in that The acquiring the horizontal coordinate and the vertical coordinate of the center point of the first region image in the first image coordinate system, and the zoom ratio of the first image corresponding to the first region image comprises: When drawing the first preview image in the first preview frame, the horizontal coordinate and the vertical coordinate of the center point of the first region image in the first picture coordinate system and the zoom ratio of the first picture corresponding to the first region image are obtained.
13. The method according to any one of claims 1 to 5, characterized in that: In response to a selection operation on the first picture in the first interface, the third interface is displayed, and the method further includes: In response to a second operation on the third interface, the second interface is displayed; the second interface includes a second preview frame, and the second preview frame is used to display a preview image of the wallpaper of the folding screen electronic device in the unfolded state.
14. The method according to claim 13, characterized in that The second preview frame displays a fourth area image of the first picture, the size of the fourth area is the same as the size of the display area of the folding screen electronic device in the unfolded state, and the fourth area image includes the second area image.
15. The method according to claim 14, characterized in that The method further comprises: In response to a leftward or rightward sliding gesture on the fourth region image in the second preview frame, the first region image is displayed in the second preview frame.
16. The method according to claim 14, characterized in that The method further comprises: A sliding gesture of sliding upward or downward on the fourth region image in the second preview frame is received, and the fourth region image is displayed in the second preview frame.
17. The method according to claim 14, characterized in that The method further comprises: A gesture for changing a zoom ratio of the first image in the second preview frame is received, and the fourth region image is displayed in the second preview frame.
18. The method according to claim 15, characterized in that The method further comprises: Acquire the horizontal coordinate and the vertical coordinate of the center point of the second region image in the first image coordinate system and the zoom ratio of the first image corresponding to the second region image; Acquire a second horizontal coordinate according to the action position of the leftward or rightward sliding gesture on the fourth region image; The first region image is acquired according to the second horizontal coordinate, the horizontal coordinate and the vertical coordinate of the center point of the second region image in the first image coordinate system, and the zoom ratio of the first image corresponding to the second region image.
19. The method according to claim 18, characterized in that The acquiring the horizontal coordinate and the vertical coordinate of the center point of the second region image in the first image coordinate system and the zoom ratio of the first image corresponding to the second region image comprises: When drawing the first frame image in the second preview frame, the horizontal coordinate and the vertical coordinate of the center point of the second region image in the first image coordinate system and the zoom ratio of the first image corresponding to the second region image are obtained.
20. An electronic device, characterized in that: include: one or more processors; Display screen; Memory; Wherein, 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 as described in any one of claims 1-19.
21. A computer-readable storage medium, 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 described in any one of claims 1 to 19.
Citation Information
Patent Citations
Display method, intelligent terminal and storage medium
CN116302259A