WO2025001257A1 - 一种壁纸显示方法及电子设备 - Google Patents
一种壁纸显示方法及电子设备 Download PDFInfo
- Publication number
- WO2025001257A1 WO2025001257A1 PCT/CN2024/079455 CN2024079455W WO2025001257A1 WO 2025001257 A1 WO2025001257 A1 WO 2025001257A1 CN 2024079455 W CN2024079455 W CN 2024079455W WO 2025001257 A1 WO2025001257 A1 WO 2025001257A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- wallpaper
- offset
- display
- screen
- mobile phone
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
- G06F1/1613—Constructional details or arrangements for portable computers
- G06F1/1615—Constructional details or arrangements for portable computers with several enclosures having relative motions, each enclosure supporting at least one I/O or computing function
- G06F1/1616—Constructional details or arrangements for portable computers with several enclosures having relative motions, each enclosure supporting at least one I/O or computing function with folding flat displays, e.g. laptop computers or notebooks having a clamshell configuration, with body parts pivoting to an open position around an axis parallel to the plane they define in closed position
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
- G06F1/1613—Constructional details or arrangements for portable computers
- G06F1/1633—Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
- G06F1/1637—Details related to the display arrangement, including those related to the mounting of the display in the housing
- G06F1/1652—Details related to the display arrangement, including those related to the mounting of the display in the housing the display being flexible, e.g. mimicking a sheet of paper, or rollable
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/16—Constructional details or arrangements
- G06F1/1613—Constructional details or arrangements for portable computers
- G06F1/1633—Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
- G06F1/1675—Miscellaneous details related to the relative movement between the different enclosures or enclosure parts
- G06F1/1677—Miscellaneous details related to the relative movement between the different enclosures or enclosure parts for detecting open or closed state or particular intermediate positions assumed by movable parts of the enclosure, e.g. detection of display lid position with respect to main body in a laptop, detection of opening of the cover of battery compartment
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/0202—Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
- H04M1/0206—Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings
- H04M1/0208—Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings characterized by the relative motions of the body parts
- H04M1/0214—Foldable telephones, i.e. with body parts pivoting to an open position around an axis parallel to the plane they define in closed position
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/0202—Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
- H04M1/026—Details of the structure or mounting of specific components
- H04M1/0266—Details of the structure or mounting of specific components for a display module assembly
- H04M1/0268—Details of the structure or mounting of specific components for a display module assembly including a flexible display panel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72427—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting games or graphical animations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04803—Split screen, i.e. subdividing the display area or the window area into separate subareas
Definitions
- the present application relates to the field of terminal technology, and in particular to a wallpaper display method and electronic device.
- foldable screen technology As foldable screen technology matures, more and more users are using foldable screen devices (such as foldable screen mobile phones).
- foldable screen mobile phones When users use foldable screen mobile phones, foldable screen mobile phones often display wallpapers, for example, foldable screen mobile phones display desktop wallpapers, lock screen wallpapers, etc. Since foldable screen mobile phones have different device states (such as folded state and unfolded state), how to display wallpapers on foldable screen mobile phones has become an urgent problem to be solved.
- the present application provides a wallpaper display method and an electronic device for realizing the display of wallpapers on a folding screen device in different device states.
- the present application provides a wallpaper display method, which is applied to a folding screen device, wherein the folding screen device in an unfolded state displays a first interface, and the first interface displays a first wallpaper in full screen; the first wallpaper has a corresponding offset; the offset of the first wallpaper represents an offset value of a display area of the first wallpaper in the folded state relative to a display area of the first wallpaper in the unfolded state; the size of the display area of the first wallpaper in the folded state is the same as the size of a bright screen area of the screen in the folded state, and the size of the display area of the first wallpaper in the unfolded state is the same as the size of the bright screen area of the screen in the unfolded state;
- the user folds the folding screen device.
- the device state of the folding screen device can be switched from the unfolded state to the folded state.
- the folding screen device in the folded state obtains the offset of the first wallpaper, and displays the second interface based on the offset of the first wallpaper.
- the second interface displays part of the content of the first wallpaper (or is described as the second interface displays the second wallpaper, and the second wallpaper is part of the content of the first wallpaper); wherein, the part of the content of the first wallpaper displayed on the second interface (that is, the second wallpaper) is offset in the target direction relative to the first wallpaper displayed on the first interface corresponding to the offset, that is, the part of the content of the first wallpaper is determined based on the offset of the first wallpaper.
- the foldable screen device when the foldable screen device is in the unfolded state, the foldable screen device displays the content of the display area of the first wallpaper in the unfolded state, and the display area of the first wallpaper in the unfolded state is the same size as the bright screen area of the screen in the unfolded state. That is to say, if the content in the display area of the first wallpaper in the unfolded state is the entire content of the first wallpaper, then the foldable screen device displays the entire content of the first wallpaper when displaying the wallpaper.
- the size of the bright screen area of the screen of the foldable screen device becomes smaller.
- the foldable screen device can determine, based on the offset of the first wallpaper, that part of the content in the display area of the first wallpaper in the unfolded state is determined as the content in the display area of the first wallpaper in the folded state, and the size of the display area of the first wallpaper in the folded state is the same as the size of the bright screen area of the screen in the folded state, and then display the foldable screen.
- the content in the display area of the first wallpaper in the folded state that is, the folding screen device reduces the content of the displayed first wallpaper, to achieve the adaptation of the wallpaper size displayed in different device states, and when switching from the expanded state to the folded state, the content of the displayed first wallpaper is directly reduced without switching the displayed wallpaper, thereby achieving smooth display of the wallpaper, avoiding the problem of sudden picture changes, improving the user's visual experience, and thus improving user satisfaction.
- the user unfolds the foldable screen device again, and the device state of the foldable screen device switches from the folded state to the unfolded state, and the foldable screen device displays the first wallpaper in full screen again, that is, the foldable screen device displays the first wallpaper in full screen on the third interface. Based on this, the adaptive display of the wallpaper is achieved, and there is no need to switch the display wallpaper, so that the wallpaper is displayed smoothly.
- the process of displaying the first wallpaper in full screen again may be that the folding screen device displays the remaining content of the first wallpaper until the complete content of the first wallpaper is displayed, so as to achieve a dynamic display effect of the wallpaper.
- the folding screen device directly displays the complete content of the first wallpaper, so as to achieve a fast and complete display of the first wallpaper.
- the first wallpaper is the wallpaper corresponding to the target theme
- the content in the display area of the first wallpaper in the expanded state is the entire content of the first wallpaper.
- the user can first set the wallpaper theme of the folding screen device to the target theme.
- the process of setting the target theme may include: upon receiving a second operation input by the user, in response to the second operation, the folding screen device may create a wallpaper window with a size equal to the size of the bright screen area of the screen in the folded state; the second operation is used to trigger setting the theme of the folding screen device to the target theme, such as the second operation is a setting operation of the target theme.
- the folding screen device sets the size of the surface corresponding to the wallpaper window, and the size of the surface is the size of the bright screen area of the screen in the unfolded state, that is, the size of the first wallpaper displayed in full screen.
- the folding screen device can draw the complete content of the first wallpaper on the surface.
- the first interface/third interface displays the complete content of the first wallpaper in the surface
- the second interface displays that the second wallpaper is part of the content of the first wallpaper in the surface
- the folding screen device can create a wallpaper window of the same size as the bright screen area of the current screen, and set the surface size corresponding to the wallpaper window to the size of the bright screen area of the screen in the expanded state, that is, the size of the surface is independent of the size of the bright screen area of the current screen, and a complete first wallpaper is drawn on the surface.
- the folding screen needs to display wallpaper, the first wallpaper on the surface is displayed based on the wallpaper window.
- the size of the bright screen area of the current screen is the size of the expanded state
- the size of the wallpaper window is consistent with the size of the surface, and all the content on the surface is displayed, that is, the complete first wallpaper is displayed.
- the size of the wallpaper window is smaller than the size of the surface, and part of the content on the surface is displayed, that is, part of the first wallpaper is displayed, thereby displaying a wallpaper that matches the size of the bright screen area of the current screen, and ensuring the aesthetics of the wallpaper display.
- the size of the surface is the size of the bright screen area of the screen in the unfolded state, when the device state of the folding screen device is switched, the folding screen device does not need to reset the surface to obtain a surface of the same size as the bright screen area of the current screen, thereby avoiding the problem of flickering of the wallpaper screen due to the need to reset the surface when the device state of the folding screen device is switched.
- the foldable screen device sets the size of the surface through the wallpaper application. Based on this, the permission restriction can prevent any application from setting the size of the surface, thereby preventing the surface size from being tampered with by some applications, ensuring the security of wallpaper settings, and improving the stability of wallpaper display, avoiding the size of wallpaper displayed on the foldable screen device. It is constantly being changed. For example, when the foldable screen device is in the unfolded state, the surface is reduced, resulting in a mismatch between the size of the wallpaper displayed on the foldable screen device and the size of the bright screen area of the current screen, thereby ensuring the user experience.
- a preset whitelist is used to determine whether the wallpaper application has settings.
- the folding screen device determines whether there is an identifier of the wallpaper application in the preset whitelist. If there is an identifier of the wallpaper application in the preset whitelist, the wallpaper application has setting permissions, that is, it has the permission to call the preset setting interface to set the surface size.
- the wallpaper application has the permission not to set, that is, does not have the permission to call the preset setting interface.
- all permissions of the application are used to determine whether the wallpaper application has settings.
- the folding screen device obtains all permissions of the wallpaper application. If the full permissions include setting permissions, the wallpaper application has setting permissions, that is, it has the permission to call the preset setting interface to set the surface size.
- the wallpaper application does not have the setting permission, that is, does not have the permission to call the preset setting interface.
- the folding screen device can add the logo of the above-mentioned wallpaper application to the preset whitelist by calling the preset addition interface, so that the wallpaper application has setting permissions and realizes the addition of device permissions.
- the theme package corresponding to the target theme has an offset of the first wallpaper (or is described as an offset corresponding to the first wallpaper).
- the folding screen device can write the offset of the first wallpaper in the theme package corresponding to the target theme into the preset database.
- the folding screen device reads the offset of the first wallpaper from the preset database to obtain the offset of the first wallpaper.
- the process of writing the offset of the first wallpaper may include:
- the folding screen device can directly write the offset of the first wallpaper into the preset database; in the case where the offset of the wallpaper exists in the preset database, the folding screen device can delete the offset of the wallpaper that already exists in the preset database, and then the folding screen device writes the offset of the first wallpaper into the preset database. Based on this, the resource occupation caused by saving wallpapers can be reduced, and the offset of the first wallpaper can be quickly read.
- the offset of the first wallpaper is the offset in the x direction, and accordingly, the target direction is the x direction.
- the offset is the offset in the y direction, and accordingly, the target direction is the y direction.
- the process of determining the display area of the first wallpaper in the folded state may include:
- the folding screen device determines the position of the display area of the first wallpaper in the folded state based on the offset and the size of the bright screen area of the screen in the folded state, thereby determining the display area of the first wallpaper in the folded state.
- the offset mode indicates the offset position of the display area of the first wallpaper in the folded state relative to the display area of the first wallpaper in the unfolded state.
- the offset mode includes one or more of the center mode, the left mode, and the right mode; when the folding screen device is folded up and down, the offset mode includes one or more of the center mode, the top mode, and the bottom mode.
- the offset mode is related to the storage, reading, and application process of the above-mentioned offset (such as Similar to using offset mode to display wallpaper in folded state.
- the present application provides an electronic device, comprising a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the display screen is used to display an image generated by the processor, the display screen comprises a folding screen, the memory is used to store computer program code, and the computer program code comprises computer instructions; when the processor executes the computer instructions, the electronic device executes the wallpaper display method as described in any one of the above-mentioned first aspects.
- the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the wallpaper display method as described in any one of the above-mentioned first aspects.
- the present application provides a computer program product.
- the computer program product When the computer program product is executed on an electronic device, the electronic device executes the wallpaper display method as described in any one of the above-mentioned first aspects.
- FIG1A is a schematic diagram of an interface of a folding screen device in an unfolded state provided by an embodiment of the present application
- FIG1B is a schematic diagram of an interface of a folding screen device in a folded state provided by an embodiment of the present application.
- FIG1C is a schematic diagram 1 of an outward folding process of a folding screen device provided in an embodiment of the present application.
- FIG1D is a schematic diagram 1 of a folding screen device provided in an embodiment of the present application.
- FIG1E is a second schematic diagram of a folding screen device provided in an embodiment of the present application.
- FIG2A is a schematic diagram 1 of a wallpaper display provided in an embodiment of the present application.
- FIG2B is a second schematic diagram of a wallpaper display provided in an embodiment of the present application.
- FIG2C is a third schematic diagram of a wallpaper display provided in an embodiment of the present application.
- FIG3 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
- FIG4 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- FIG5 is a flowchart diagram 1 of a wallpaper display method provided in an embodiment of the present application.
- FIG6A is a first schematic diagram of an interface for wallpaper setting provided in an embodiment of the present application.
- FIG6B is a second schematic diagram of an interface for wallpaper setting provided in an embodiment of the present application.
- FIG6C is a third schematic diagram of an interface for wallpaper setting provided in an embodiment of the present application.
- FIG6D is a fourth schematic diagram of an interface for wallpaper setting provided in an embodiment of the present application.
- FIG6E is a fifth schematic diagram of an interface for wallpaper settings provided in an embodiment of the present application.
- FIG7A is a schematic diagram 1 of a display area of a wallpaper provided in an embodiment of the present application.
- FIG7B is a second schematic diagram of a display area of a wallpaper provided in an embodiment of the present application.
- FIG7C is a schematic diagram 1 of a wallpaper provided in an embodiment of the present application.
- FIG7D is a second schematic diagram of a wallpaper provided in an embodiment of the present application.
- FIG8A is a first schematic diagram of display content of a wallpaper provided in an embodiment of the present application.
- FIG8B is a second schematic diagram of display content of a wallpaper provided in an embodiment of the present application.
- FIG8C is a third schematic diagram of display content of a wallpaper provided in an embodiment of the present application.
- FIG9 is a second flow chart of a wallpaper display method provided in an embodiment of the present application.
- FIG10A is a fourth schematic diagram of a wallpaper display provided in an embodiment of the present application.
- FIG10B is a fifth schematic diagram of a wallpaper display provided in an embodiment of the present application.
- FIG11A is a sixth schematic diagram of a wallpaper display provided in an embodiment of the present application.
- FIG11B is a seventh schematic diagram of a wallpaper display provided in an embodiment of the present application.
- FIG11C is a schematic diagram eight of a wallpaper display provided in an embodiment of the present application.
- FIG12 is a ninth schematic diagram of a wallpaper display provided in an embodiment of the present application.
- FIG. 13 is a third flow chart of a wallpaper display method provided in an embodiment of the present application.
- first and second are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.
- a feature defined as “first” or “second” may explicitly or implicitly include one or more of the features.
- plural means two or more.
- the screen of a foldable screen device is a whole screen, which can be folded or unfolded. Accordingly, there are two device states for a foldable screen device, namely, a folded state and an unfolded state.
- a folded state As shown in FIG. 1A , the entire area of the screen can be used to display data, such as displaying wallpaper.
- a folded state As shown in FIG. 1B , part of the screen is used to display data, and the other part is always in a black screen state and will not be used to display data.
- the size (or described as size) of the bright screen area of the screen of a foldable screen mobile phone in different device states is different.
- the size of the bright screen area of the screen can be the size of the screen.
- the foldable screen mobile phone is folded (as shown in FIG. 1C , the foldable screen mobile phone is folded outward along the folding edge, that is, the foldable screen mobile phone is folded toward the opposite side where the user interface can be displayed) to form a foldable screen mobile phone in a folded state.
- the size of the bright screen area of the screen is the size of part of the screen.
- the folding method of the folding screen mobile phone can be left-right folding as shown in FIG. 1C, or up-down folding as shown in FIG. 1D.
- the embodiment of the present application does not limit the folding method of the folding screen mobile phone.
- the number of folding edges corresponding to the folding screen mobile phone can be one as shown in FIG. 1A, FIG. 1C and FIG. 1D, or a value greater than 1, such as two as shown in FIG. 1E.
- the embodiment of the present application does not limit the number of folding edges.
- the folding screen mobile phone after the folding screen mobile phone applies the theme, the folding screen mobile phone will display the wallpaper corresponding to the theme when displaying the desktop. Since the size of the bright screen area of the screen of the folding screen mobile phone in different device states is different, the size of the wallpaper displayed by the folding screen mobile phone in different device states is different.
- the folding screen mobile phone When the folding screen mobile phone is in the folded state, the folding screen mobile phone can display a wallpaper whose size is adapted to the size of the bright screen area of the screen in the folded state.
- the wallpaper size displayed by the folding screen mobile phone is adapted to the size of the bright screen area of the screen in the unfolded state.
- the device state of the folding screen mobile phone may change.
- the folding screen mobile phone needs to switch to display the wallpaper to display the wallpaper whose size is adapted to the size of the bright screen area of the screen in the changed device state.
- the folding screen mobile phone may flicker before the switch is successful, causing a sudden change in the display screen, affecting the user's visual experience.
- the screen of the folding screen mobile phone will flicker (as shown in Figure 2B).
- the foldable screen mobile phone can display a screen with a size suitable for the bright screen area of the screen in the unfolded state as shown in FIG. Matching wallpaper.
- the wallpaper display method is mainly for a folding screen device whose folding method is an outward folding method (as shown in FIG. 1C above).
- the folding screen device receives a return to desktop operation, indicating that the folding screen device needs to display the desktop wallpaper.
- the folding screen device can respond to the return to desktop operation.
- the folding screen device can directly display the complete first wallpaper, that is, display the first interface on the screen, and the first interface includes the complete first wallpaper.
- the user folds the folding screen device, and the device state of the folding screen device switches to the folded state.
- the folding screen device can obtain the offset information of the first wallpaper, which indicates the offset position of the display area of the first wallpaper in the folded state relative to the display area (i.e., the complete area) of the first wallpaper in the unfolded state, which can be used to determine the position of the display area of the first wallpaper in the folded state, that is, to determine the display content of the first wallpaper in the folded state.
- the folding screen device displays part of the content of the first wallpaper based on the offset information, that is, reduces the display area of the first wallpaper so that the display area of the first wallpaper is adapted to the size of the screen area in the folded state, thereby achieving adaptive display of the wallpaper without switching the display, achieving smooth display of the wallpaper, avoiding the problem of sudden screen changes, improving the user's visual experience, and thus improving user satisfaction.
- a folding screen device when the folding mode of the folding screen device is an inward folding mode, when the folding screen device is in the unfolded state, it displays the wallpaper through the inner screen.
- the folding screen device When the folding screen device is in the folded state, it displays the wallpaper through the outer screen, and the inner screen and the outer screen are opposite to each other and are not on the same side.
- the screen displaying the wallpaper switches from the outer screen to the inner screen, and the screen switching will inevitably cause the problem of sudden picture changes. Therefore, there is no need to apply the wallpaper display method proposed in this application.
- the folding screen device when the folding mode of the folding screen device is an inward folding mode, the folding screen can be folded inward along the folding edge, that is, the folding screen can be folded toward the side that can display the user interface to form a folding screen mobile phone in a folded state.
- the foldable screen device in the embodiments of the present application can be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR) ⁇ virtual reality (VR) device and other electronic devices with a foldable screen.
- UMPC ultra-mobile personal computer
- PDA personal digital assistant
- AR augmented reality
- VR virtual reality
- FIG3 shows a schematic diagram of the structure of the electronic device 200.
- the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 211, a power management module 212, a battery 213, an antenna 1, an antenna 2, a mobile communication module 240, a wireless communication module 250, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.
- SIM subscriber identification module
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 200.
- the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split 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.
- the processor 210 may include one or more processing units.
- the processor 210 may include an application processing unit.
- the processing units may include an application processor (AP), a modem processor, a graphics processing unit (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.
- the different processing units may be independent devices or integrated into one or more processors.
- the controller may be the nerve center and command center of the electronic device 200.
- 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.
- the processor 210 may also be provided with a memory for storing instructions and data.
- the memory in the processor 210 is a cache memory.
- the memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 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 210, and thus improves the efficiency of the system.
- the processor 210 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.
- I2C inter-integrated circuit
- I2S inter-integrated circuit sound
- PCM pulse code modulation
- UART universal asynchronous receiver/transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 200.
- the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the charging management module 211 is used to receive charging input from a charger. While the charging management module 211 is charging the battery 213 , it can also power the electronic device through the power management module 212 .
- the wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 240, the wireless communication module 250, the modem processor and the baseband processor.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
- antenna 1 can be reused as a diversity antenna for a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 240 may provide solutions for wireless communications including 2G/3G/4G/5G etc. applied to the electronic device 200.
- the modem processor may include a modulator and a demodulator.
- the wireless communication module 250 can provide wireless communication solutions for application in the electronic device 200, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
- WLAN wireless local area networks
- Wi-Fi wireless fidelity
- BT Bluetooth
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication technology
- IR infrared technology
- the electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor.
- the GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- the processor 210 may include one or more GPUs, which execute program instructions to generate or change the display. Display information.
- the display screen (or screen) 294 is used to display images, videos, etc.
- the display screen 294 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), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
- the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1.
- the display screen 294 may be a folding screen, wherein the folding method of the folding screen may be an outward folding method as shown in FIG. 1C .
- ⁇ when the folding angle of the folding screen (i.e., the angle between the two parts of the screen folded along the folding edge) ⁇ (such as ⁇ shown in FIG. 1C above) can be in the range of [0°, 180°].
- ⁇ is in the range of [0°, X]
- ⁇ is in the range of (X, 180°]
- X is a first preset angle threshold. X can be set by the folding screen mobile phone before leaving the factory, or it can be set by the user in the folding screen mobile phone, or it can be determined by the folding screen mobile phone based on the user's usage habits.
- X can be set to 85°, 90° or 95°, etc. Assuming that X is set to 90°, when the folding angle ⁇ of the folding screen is less than or equal to 90°, it is determined that the folding screen mobile phone is in a folded state; when the folding angle ⁇ of the folding screen is greater than 90°, it is determined that the folding screen mobile phone is in an unfolded state.
- the electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
- the external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.
- an external memory card such as a Micro SD card
- the internal memory 221 can be used to store computer executable program codes, which include instructions.
- the processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221.
- the internal memory 221 may include a program storage area and a data storage area.
- 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.), etc.
- the data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc.
- the internal memory 221 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.
- UFS universal flash storage
- the electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
- the buttons 290 include a power button, a volume button, etc.
- the indicator 292 may be an indicator light.
- the sensor module 280 may include a folding angle detection sensor, a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
- the folding angle detection sensor is used to detect the folding angle of the electronic device 200, that is, the screen, such as the folding angle ⁇ shown in Fig. 1C.
- the folding angle detection sensor may be a Hall sensor.
- the software system of the electronic device 200 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro Service architecture, or cloud architecture.
- the embodiment of the present application takes the Android TM system of layered architecture as an example to exemplify the software structure of the electronic device 200.
- FIG. 4 is a structural block diagram of an electronic device 200 according to an embodiment of the present invention.
- the layered architecture divides the software into several layers, each with clear roles and division of labor.
- the layers communicate with each other through software interfaces.
- the software system is divided into four layers, from top to bottom: application layer, application framework layer, runtime and system library, and kernel layer.
- the application layer can include a series of application packages.
- the application package may include applications such as camera, gallery, calendar, call, map, theme application, WLAN, music, wallpaper application, short message, etc.
- the theme application can be used to set the wallpaper of the electronic device.
- the wallpaper application also known as wallpaper APK (Android Package), can be used to load the wallpaper required for display.
- the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
- API application programming interface
- the application framework layer includes some predefined functions.
- the application framework layer may include a window manager, a preset database, a view system, a wallpaper framework, a resource manager, a wallpaper window, and the like.
- the preset database can be used to store data, such as offset information of wallpapers.
- the wallpaper window can be used to display wallpapers.
- the wallpaper framework can be used to read and parse wallpaper theme packages, launch wallpaper applications, etc.
- the runtime includes the core library and the virtual machine.
- the runtime is responsible for the scheduling and management of the software system.
- the core library consists of two parts: one part is the function that the Java language needs to call, and the other part is the core library.
- the system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
- functional modules such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
- the software layer can communicate with the hardware layer.
- the software layer can receive the folding angle or device status sent by the folding angle detection sensor to determine the size of the bright screen area of the current screen of the electronic device, the current device status, etc.
- the software layer can send the wallpaper content to be displayed to the display screen so as to display the wallpaper using the display screen.
- the layers in the structure shown in FIG4 and the components contained in each layer do not constitute a specific limitation on the electronic device 200, i.e., the folding screen device.
- the structure may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
- the present application provides a wallpaper display method.
- the user can set the theme of the folding screen device.
- the folding screen device can apply the theme and display the corresponding wallpaper.
- the following will take the above-mentioned electronic device (or folding screen device) as a folding screen mobile phone, and the folding method is an outward folding method as an example, and combine the accompanying drawings to introduce in detail a wallpaper display method provided in an embodiment of the present application. As shown in Figure 5, the method may include steps S301-S313.
- the foldable screen mobile phone receives a second operation input by the user, wherein the second operation is used to trigger the foldable screen mobile phone to use the theme of the foldable screen mobile phone as the target theme.
- the second operation may be a target theme setting operation.
- 6A shows the icon of the settings application.
- the folding screen mobile phone can display the corresponding settings interface, which displays the desktop and wallpaper controls. After that, the user can click on the desktop and wallpaper controls.
- the folding screen mobile phone can display the interface shown in FIG. 6B, which includes a theme control, which can be used to trigger the display of theme resources. After that, when the user clicks on the theme control, the folding screen mobile phone responds to the click operation of the theme control and displays the interface shown in FIG.
- the folding screen mobile phone can display a preview image corresponding to the blooming theme as shown in FIG. 6D, which indicates the display effect after the folding screen mobile phone applies the blooming theme.
- FIG. 6D After receiving the operation of the user clicking on the application control as shown in FIG. 6D, it indicates that the user wants the folding screen mobile phone to apply the blooming theme, and the folding screen mobile phone applies the blooming theme.
- the operation of the user clicking the application control can be the above-mentioned second operation
- the blooming theme selected by the user can be the above-mentioned target theme.
- the folding screen mobile phone needs to display the wallpaper corresponding to the blooming theme, if the folding screen mobile phone receives a return to desktop operation, the folding screen mobile phone can display the wallpaper shown in Figure 6E.
- the folding screen mobile phone obtains configuration data of a first wallpaper corresponding to the target theme, wherein the configuration data of the first wallpaper includes an offset of the first wallpaper.
- the offset of the above-mentioned first wallpaper represents the position offset of the display content (or described as the display area) of the first wallpaper in the folded state relative to the display content of the first wallpaper in the expanded state.
- the offset of the first wallpaper can be used to determine the display portion of the first wallpaper in the folded state.
- the display content of the first wallpaper in the expanded state is the complete first wallpaper.
- the size of the display area of the first wallpaper in the expanded state is adapted to (such as being the same as) the size of the bright screen area of the screen in the expanded state.
- the display content of the first wallpaper in the folded state is part of the content of the first wallpaper, that is, the display area of the first wallpaper in the folded state is a part of the first wallpaper.
- the size of the display area of the first wallpaper in the folded state is adapted to the size of the bright screen area of the screen in the folded state.
- each theme corresponds to a theme package
- the theme package corresponding to the theme may include a configuration file corresponding to the wallpaper corresponding to the theme (such as the first wallpaper described above), and the configuration file may include configuration data of the wallpaper, such as the offset of the wallpaper.
- the theme package may also include other information, such as a preview image after the theme is applied (such as the preview image corresponding to the blooming theme described above). This application does not limit the information included in its theme package.
- the configuration file corresponding to the wallpaper may include not only the offset of the wallpaper, but also at least one of the blur configuration information, depth mode configuration information, and elastic animation stiffness configuration information of the wallpaper. It should be understood that when the wallpaper is a static wallpaper, there is no dynamic playback process, so the configuration file corresponding to the wallpaper may not include the elastic animation stiffness configuration information.
- the blur setting information indicates whether the wallpaper supports blur effects. For example, when a foldable phone displays a wallpaper in the lock screen state, when the user slides up on the screen, if the blur setting information indicates that blur effects are supported, the foldable phone will blur the wallpaper and display the blurred wallpaper.
- the blur setting information can be represented by support_background_blur. When the value of support_background_blur is true, it indicates that the wallpaper supports blur effects. When the value of support_background_blur is false, Indicates that the wallpaper does not support blur effects.
- the above-mentioned depth mode configuration information indicates whether the wallpaper supports the dark mode.
- the depth mode configuration information can be represented by support_dark_mode. When the value of support_dark_mod is true, it indicates that the wallpaper supports the dark mode. When the value of support_dark_mod is false, it indicates that the wallpaper does not support the dark mode.
- the above elastic animation stiffness configuration information represents the dynamic playback effect of the wallpaper.
- the wallpaper is a dynamic wallpaper
- the wallpaper is equivalent to an animation.
- the stiffness value affects the playback speed of the animation
- the pop-up animation stiffness configuration information is the stiffness value of the wallpaper.
- the elastic animation stiffness configuration information can be represented by fold-spring-stiffness. When the value of fold-spring-stiffness is 60, it indicates that the stiffness value of the wallpaper is 60.
- the format of the wallpaper configuration file may be an extensible markup language (XML) format. Accordingly, the configuration of the configuration file is as follows:
- the offset of the wallpaper is the offset in the x direction.
- the offset of the wallpaper is 100 pixels in the x direction.
- the display area of the first wallpaper in the folded state is 100 pixels offset in the horizontal direction (i.e., the x direction) compared to the display area of the first wallpaper in the unfolded state.
- the offset of the wallpaper is the offset in the y direction.
- the offset of the wallpaper is 100 pixels in the y direction.
- the display area of the first wallpaper in the folded state is offset by 100 pixels in the longitudinal direction (i.e., the y direction) compared to the display area of the first wallpaper in the unfolded state.
- the above-mentioned offset is expressed in pixels for only one example, and may also be expressed in other units, such as millimeters, etc., which is not limited in the present application.
- the configuration data of the first wallpaper may not include the offset of the first wallpaper, but include the offset mode of the first wallpaper.
- the offset mode includes at least one of the center mode, the left mode and the right mode.
- the offset mode includes at least one of the top mode, the bottom mode and the center mode.
- the configuration data of the first wallpaper may include the offset information of the first wallpaper, and the offset information includes the offset or the offset mode.
- the following takes the folding method of a foldable screen mobile phone, which is folding left and right, as an example to introduce the offset mode of the wallpaper (such as the first wallpaper).
- the above-mentioned centering mode indicates that the display area of the first wallpaper in the folded state is centered relative to the display area of the first wallpaper in the expanded state.
- the centering mode indicates that the display content of the first wallpaper in the folded state is the middle part of the first wallpaper in the expanded state.
- the above-mentioned left-aligned mode indicates that the display area of the first wallpaper in the folded state is aligned to the left relative to the display area of the first wallpaper in the expanded state.
- the centering mode indicates that the display content of the first wallpaper in the folded state is the left part of the first wallpaper in the expanded state.
- the above-mentioned right-aligned mode indicates that the display area of the first wallpaper in the folded state is aligned to the right relative to the display area of the first wallpaper in the expanded state.
- the centering mode indicates that the display content of the first wallpaper in the folded state is the right part of the first wallpaper in the expanded state.
- the offset or offset mode of the wallpaper can be set according to aesthetic requirements. For example, assuming that the folding screen mobile phone is folded left and right, when the key object on the wallpaper (such as the flower shown in Figure 7A above) is located in the middle of the wallpaper, the offset mode of the wallpaper can be a centered mode or the offset in the x direction is relatively centered to display the key object as much as possible.
- the offset mode of the wallpaper can be a left-aligned display mode, or the offset in the x direction is slightly different from the distance between the upper left corner vertex of the wallpaper.
- the offset mode of the wallpaper can be a left-aligned mode or the offset is slightly different from the distance between the upper left corner vertex of the wallpaper.
- the offset mode of the wallpaper can be the right-aligned mode, or the offset in the x-direction is significantly different from the distance between the upper left corner vertex of the wallpaper.
- the character on the wallpaper is located on the right side of the wallpaper.
- the offset mode of the wallpaper can be the right-aligned mode, or the offset in the x-direction is significantly different from the distance between the upper left corner vertex of the wallpaper.
- the user can set the offset or offset mode of the wallpaper according to usage requirements.
- the folding screen mobile phone can provide corresponding selection controls for the user to select the offset or offset mode when the user selects the wallpaper, or provide corresponding input controls (such as text boxes) for the user to enter the offset or offset mode to meet the user's personalized needs.
- the foldable screen mobile phone writes the offset of the first wallpaper into a preset database.
- the folding screen mobile phone can call the relevant write interface, take the offset of the first wallpaper as an input parameter, and write the offset of the first wallpaper into the preset database in a key-value manner, so that when the folding screen mobile phone is in a folded state and needs to display the first wallpaper, the first wallpaper can be displayed using the offset of the first wallpaper.
- key can represent the field corresponding to the offset of the first wallpaper
- value can represent the specific offset value.
- the preset database may be a local settings database of the foldable screen mobile phone.
- the implementation code of the write interface may be as follows:
- mContext.getUserId() represents the identifier of the current user.
- OUTFOLD_X_COORDINATE represents value
- offset represents key
- the above preset database may include the offset of the wallpaper corresponding to each user identification of the multiple users.
- the folding screen mobile phone can write the offset of the first wallpaper and the identification of the current user into the preset database together.
- the preset database may also only include the offset of the wallpaper corresponding to the identification of the current user. Therefore, the folding screen mobile phone can directly write the offset of the first wallpaper into the preset database without involving the identification of the current user.
- the preset database is dynamically updated, and it can only save the offset of the wallpaper currently used by the folding screen mobile phone, such as the offset of the first wallpaper mentioned above, so as to reduce the resource occupation caused by saving wallpapers, and can realize the quick reading of the offset of the first wallpaper. That is to say, before the folding screen mobile phone writes the offset of a new wallpaper into the preset database, if the preset database already stores the offset of a wallpaper, the folding screen mobile phone can first delete the offset of the wallpaper. Then, the folding screen mobile phone can write the offset of the new wallpaper (ie, the first wallpaper) into the preset database.
- the preset database includes the offsets of wallpapers corresponding to the identifiers of multiple users. If the preset database already stores the offset of the wallpaper corresponding to the identifier of the current user, the folding screen mobile phone can first delete the offset of the wallpaper corresponding to the identifier of the current user. Then, the folding screen mobile phone can write the offset of the first wallpaper into the preset database.
- the foldable screen mobile phone may not write the offset of the first wallpaper into a preset database, but write it into other local locations of the foldable screen mobile phone, such as a file, a cache, etc.
- the foldable screen mobile phone creates a wallpaper window whose size is the size of the bright screen area of the current screen, and sets the size of the drawing area surface to the size of the bright screen area of the screen in the unfolded state.
- the drawing area is used for the foldable screen mobile phone to draw objects (such as the first wallpaper), and the drawing area determines the maximum range that the foldable screen mobile phone can draw.
- the wallpaper window is equivalent to a container, which is used to determine the area that the foldable screen mobile phone can display. It determines the range of content displayed by the foldable screen mobile phone that the user can see.
- the wallpaper window in the folded state can display the content in the display area of the first wallpaper in the folded state
- the wallpaper window in the expanded state can display the content in the display area of the first wallpaper in the expanded state.
- the size of the wallpaper window is the same as the size of the bright screen area of the current screen of the foldable screen mobile phone.
- the foldable screen mobile phone may first obtain the size of the bright screen area of the current screen. Afterwards, the foldable screen mobile phone may create a wallpaper window based on the size of the bright screen area of the current screen. And the foldable screen mobile phone allocates a drawing area to the wallpaper window (or describes it as creating a drawing area), and sets the size of the drawing area to the size of the bright screen area of the screen in the unfolded state, that is, to the size of the screen, so that the foldable screen mobile phone can directly use the wallpaper window and surface to display the first wallpaper when it needs to display it.
- the size of the above-mentioned drawing area is not limited to the size of the bright screen area of the current screen of the folding screen mobile phone.
- the size of the drawing area may be the same as the size of the bright screen area of the current screen of the folding screen mobile phone, that is, the same as the size of the wallpaper window, or it may be different.
- the size of the drawing area is larger than the size of the bright screen area of the current screen, that is, larger than the size of the wallpaper window.
- the size of the drawing area is equal to the size of the bright screen area of the current screen, that is, equal to the size of the wallpaper window.
- each wallpaper window corresponds to a surface
- the surface corresponds to a screen buffer.
- Objects such as view components and wallpapers
- the surface is equivalent to a canvas that can be used to draw content.
- the wallpaper window is equivalent to a frame placed on the canvas.
- the canvas size and the frame size are the same, the user can see the complete contents of the canvas (as shown in Figure 8A).
- the frame size is smaller than the canvas size (as shown in Figure 8B), and the user can see the contents in the window, that is, part of the canvas content (as shown in Figure 8C), but cannot see the contents of the complete drawing area.
- the foldable screen mobile phone in order to avoid repeated creation of wallpaper windows, can first determine whether there is a wallpaper window on the foldable screen mobile phone, that is, determine whether the wallpaper window has not been destroyed. In the case that the foldable screen mobile phone has a wallpaper window corresponding to the current device state, the foldable screen mobile phone does not need to repeatedly create the corresponding wallpaper window. The foldable screen mobile phone can directly use the wallpaper window to display the first wallpaper, avoiding the waste of resources caused by repeated creation of wallpaper windows.
- the foldable screen mobile phone can also first determine whether the foldable screen mobile phone has a surface corresponding to the above wallpaper window, that is, determine whether the surface corresponding to the above wallpaper window has not been destroyed. If the surface exists, the foldable screen mobile phone does not need to allocate the surface or set the size of the surface. If the surface does not exist, the foldable screen mobile phone can allocate the surface and set the size of the surface.
- the above-mentioned folding screen mobile phone can call the preset setting interface (such as public void setFixedSize(int width, int height) interface) based on the BaseSurfaceHolder class to implement the setting of the surface size.
- width represents the width of the bright screen area of the screen in the unfolded state (such as the width of the bright screen area of the screen in the unfolded state shown in FIG1C above)
- height represents the height of the bright screen area of the screen in the unfolded state (such as the height of the bright screen area of the screen in the unfolded state shown in FIG1C above).
- the code file corresponding to the preset setting interface can be saved in the /frameworks/base/core/java/android/service/wallpaper/WallpaperService.java file, of course, it can also be saved in other files, and this application does not limit it.
- the foldable screen mobile phone can use the wallpaper application to set the size of the surface.
- using the wallpaper application to set the size of the surface can refer to S70-S72 shown in Figure 9.
- S70 and foldable screen mobile phones determine whether the wallpaper application has the setting permission.
- the foldable screen mobile phone can first determine whether the wallpaper application has setting permissions. If the wallpaper application has setting permissions, it indicates that the wallpaper application has high security and has permission to set the surface size, that is, it has permission to call the above-mentioned preset setting interface, and the foldable screen mobile phone can execute S71.
- the folding screen mobile phone can execute S72.
- permission restrictions can prevent any application from setting the size of the surface, thereby preventing the surface size from being tampered with by some applications, ensuring the security of the wallpaper setting, and improving the stability of the wallpaper display, preventing the size of the wallpaper displayed on the foldable screen mobile phone from being constantly changed. For example, when the foldable screen mobile phone is in the unfolded state, the surface is reduced, resulting in the size of the wallpaper displayed on the foldable screen mobile phone and the size of the bright screen area of the screen being mismatched, thereby ensuring the user experience.
- the mobile phone can use the offset of the first wallpaper and the size of the bright screen area of the current screen, that is, the size of the bright screen area of the screen in the folded state, to determine the position of the display area of the first wallpaper in the folded state (or referred to as (or referred to as the position of the target display area of the first wallpaper).
- the content in the display area of the first wallpaper is the content of the first wallpaper displayed by the folding screen mobile phone in the folded state, that is, the display content of the first wallpaper in the folded state (or referred to as the target display content of the first wallpaper).
- the offset of the first wallpaper and the size of the bright screen area of the current screen are used to determine the position of the wallpaper window equivalent to the surface.
- the folding screen mobile phone can display the target display content in the wallpaper window. Since the size of the wallpaper window is smaller than the size of the surface, the wallpaper window does not display content other than the target display content on the first wallpaper.
- the screen of a folding screen mobile phone is folded left and right. Whether it is folded or unfolded, the height of the display area of the folding screen mobile phone will not change, but the width will change.
- the offset of the first wallpaper is in the width direction, that is, the offset in the x direction.
- the offset of the first wallpaper in the x direction is 200 pixels (px)
- the position of the 200th pixel in the x direction is the starting position of the left vertex of the wallpaper window.
- the width of the drawing area is 1000px
- the coordinates of the left vertex are (0, 0)
- the coordinates of the right vertex are (1000, 0).
- the width of the wallpaper window in the folded state is 500px
- the x coordinates of the position of the target display area of the first wallpaper can be 200 and 700, that is, the area composed of pixels with x coordinates of 200 to 700 on the first wallpaper represents the display area of the first wallpaper in the folded state
- the folding screen mobile phone displays the content in the display area (as shown in (b) in Figure 10A).
- 200 may represent the coordinates of the left vertex of the target display area
- 700 may represent the coordinates of the right vertex of the target display area.
- the offset in the x direction of the first wallpaper represents the offset in the x direction with the vertex of the first wallpaper (such as the left vertex of the first wallpaper) as the origin.
- the offset in the x direction of the first wallpaper is 200, it means that the position of the 200th pixel in the x direction is the starting position of the left vertex of the wallpaper window with the left vertex of the first wallpaper as the origin.
- the offset in the x direction of the first wallpaper represents the offset in the x direction with the position of the vertex (such as the left vertex) of the surface on the first wallpaper as the origin.
- the width of the first wallpaper is 1200, and the width of the surface is 1000, so only part of the content of the first part can be drawn on the surface (as shown in Figure 10B).
- the position of the left vertex of the surface on the first wallpaper is (100,0).
- the offset in the x direction of the first wallpaper is 200, it means that with (100,0) as the origin, the position of the 200th pixel in the x direction is the starting position of the left vertex of the wallpaper window, that is, the starting position of the left vertex of the wallpaper window is actually the position of the 300th pixel of the first wallpaper.
- the foldable screen mobile phone can directly use the offset mode to display part of the first wallpaper in the above window.
- the offset mode of the first wallpaper is the center mode, so the first wallpaper is centered on the window.
- the size of the drawing area is 1000*2000, that is, the first wallpaper
- the size is 1000*2000.
- the wallpaper window size is 500*2000.
- the x-coordinate of the target display area of the first wallpaper (i.e., the display area of the first wallpaper in the folded state) can be 250 and 750, that is, the target display area of the first wallpaper is the area composed of pixels with x-coordinates from 250 to 750 on the first wallpaper, representing the display area of the first wallpaper in the folded state, and the target display content is the content composed of pixels with x-coordinates from 250 to 750 on the first wallpaper.
- the offset mode of the first wallpaper is the left-aligned mode, so the first wallpaper is displayed on the left side of the window.
- the size of the drawing area is 1000*2000.
- the wallpaper window size is 500*2000.
- the x-coordinate of the position of the target display area of the first wallpaper can be 0 and 500, that is, the target display content of the first wallpaper is the content composed of pixels with x-coordinates of 0 to 500 on the first wallpaper.
- the first wallpaper is left-aligned on the display window.
- the size of the drawing area is 1000*2000.
- the wallpaper window size is 500*2000.
- the x-coordinate of the position of the target display area of the first wallpaper can be 500 and 1000, that is, the target display content of the first wallpaper is the content composed of pixels with x-coordinates of 500 to 1000 on the first wallpaper.
- the user when the user uses the foldable screen mobile phone, the user may unfold or fold the foldable screen mobile phone.
- the foldable screen mobile phone needs to adjust the size of the wallpaper window to the size of the bright screen area of the screen in the unfolded state, that is, to adapt the size of the wallpaper window to the bright screen area of the screen of the foldable screen mobile phone in the unfolded state.
- the foldable screen mobile phone does not need to reallocate or set the size of the surface corresponding to the wallpaper window.
- the foldable screen mobile phone is in the folded state, and it displays part of the first wallpaper. Later, while the first wallpaper is displayed, the user unfolds the foldable screen mobile phone, and the device state of the foldable screen mobile phone is switched from the folded state to the unfolded state. Since the foldable screen mobile phone is still displaying the first wallpaper, the wallpaper window used to display the first wallpaper has not been destroyed. The foldable screen mobile phone does not need to recreate the wallpaper window, and the mobile phone can directly adjust the size of the wallpaper window to the size of the bright screen area of the screen in the unfolded state.
- foldable screen mobile phone displays the complete first wallpaper in the adjusted wallpaper window.
- the adjusted wallpaper window can display all the drawing content on the surface, that is, completely display the first wallpaper, and although the wallpaper window sizes before and after the adjustment are different, they correspond to the same drawing area, and there is no need to reallocate the drawing area or reset the size of the drawing area. Therefore, when the foldable screen mobile phone switches from the folded state to the expanded state, that is, when displaying the first wallpaper that is adapted to the bright screen area of the screen in the expanded state, there is no need to switch to display the first wallpaper. Instead, on the basis of the originally displayed first wallpaper content, other content on the drawing area except the target display content is displayed, and there will be no problem of sudden change of the screen, that is, there will be no problem of switching flickering.
- the first wallpaper when the foldable screen mobile phone switches from the folded state to the unfolded state, the first wallpaper can be dynamically displayed in a manner of gradually increasing the content of the first wallpaper.
- the foldable screen mobile phone can display the first wallpaper based on the above offset and the first preset time.
- the first preset time may represent the time required for the folding screen mobile phone to switch from a folded state to a fully unfolded state.
- the fully unfolded state indicates that the folding angle of the folding screen mobile phone is 180 degrees.
- the offset includes an offset in the x-direction.
- the display speed may include a left display speed and a right display speed.
- the folding screen mobile phone may calculate a first difference between the coordinates of the left vertex of the target display area and the coordinates of the left vertex of the drawing area (i.e., the offset in the x-direction), and calculate a second difference between the coordinates of the right vertex of the target display area and the coordinates of the right vertex of the drawing area. Afterwards, the mobile phone may calculate the ratio between the first difference and the first preset time to obtain the left display speed, and calculate the ratio between the second difference and the first preset time to obtain the right display speed.
- the folding screen mobile phone may slowly enlarge the left part of the display area of the first wallpaper based on the left display speed, that is, increase the display of the left content, and slowly enlarge the right part of the display area of the first wallpaper based on the right display speed, that is, increase the display of the right content.
- the display area of the first wallpaper in the folded state is an area composed of pixels with x-coordinates of 250 to 750 as shown in Figure 11A above, the display speed on the left is 50 pixels/second, and the display speed on the right is also 50 pixels/second.
- the display area of the first wallpaper becomes an area composed of pixels with x-coordinates of 300 to 800, realizing dynamic display of wallpaper, enhancing visual effects, and increasing interest.
- the folding screen mobile phone is in a folded state, and it displays the wallpaper shown in (a) in Figure 12.
- the device state of the folding screen mobile phone changes, switching from the folded state to the unfolded state, and it directly displays the wallpaper shown in (b) in Figure 12.
- the wallpaper shown in (b) in Figure 12 contains more content.
- the degree of unfolding of the folding screen mobile phone increases, the content of the lock screen wallpaper displayed by the folding screen mobile phone gradually increases, as shown in (c) in Figure 12.
- the content of the wallpaper increases compared to the content of the wallpaper shown in (b) in Figure 12, until the complete wallpaper shown in (d) in Figure 12 is displayed.
- the process shown in (a)-(d) in Figure 12 can be understood as the process of slowly enlarging the wallpaper window to display other content on the drawing area, that is, the process of slowly increasing the content of the wallpaper displayed by the folding screen mobile phone.
- the wallpaper shown in (a)-(d) in Figure 12 above can be a desktop wallpaper.
- the application icon is not displayed on the wallpaper.
- the desktop wallpaper will include the application icon.
- the wallpaper dynamic effect presented in (a)-(d) in Figure 12 above is only an example.
- the effect presented by the wallpaper during the unfolding process of the folding screen mobile phone can also be other effects, which is not limited by this application.
- the foldable screen mobile phone can directly display the complete first wallpaper when switching from the folded state to the unfolded state, thereby achieving fast and complete display of the first wallpaper.
- the animation corresponding to the first wallpaper will be played when the display content of the first wallpaper is changed, so as to achieve the dynamic display effect of the first wallpaper.
- the animation corresponding to the flower wallpaper is also dynamically displayed, that is, the process of the flower opening.
- the foldable screen mobile phone displays the first wallpaper
- the first wallpaper is equivalent to a static wallpaper to reduce power consumption.
- the foldable screen mobile phone displays the first wallpaper in the unfolded state
- the animation corresponding to the dynamic wallpaper is not played
- the foldable screen mobile phone plays the first wallpaper when switching from the unfolded state to the folded state.
- Animation corresponding to the wallpaper When the folding angle of the foldable screen mobile phone reaches a preset angle value (such as 0), the foldable screen mobile phone stops playing the animation.
- the foldable screen mobile phone displays the first wallpaper, regardless of whether the device state of the foldable screen mobile phone changes, the foldable screen mobile phone can play the animation corresponding to the first wallpaper.
- the foldable screen mobile phone while displaying part of the content of the first wallpaper, if the device state of the foldable screen mobile phone has not changed, that is, the device state of the foldable screen mobile phone has not switched from the folded state to the unfolded state, the foldable screen mobile phone does not need to execute the above S309 and S310.
- the foldable screen mobile phone displays the first wallpaper in the wallpaper window through the display screen of the foldable screen mobile phone, and the user can see the first wallpaper displayed in the wallpaper window.
- the order of drawing the first wallpaper on the drawing area and displaying the first wallpaper on the wallpaper window described above is only an example.
- the foldable screen mobile phone can also draw the first wallpaper directly on the drawing area and the wallpaper window, and after receiving the first operation, call the wallpaper window to display the first wallpaper on the drawing area.
- the folding screen mobile phone when the folding screen mobile phone is in the folded state, when the folding screen mobile phone needs to display the above-mentioned first wallpaper, the folding screen mobile phone needs to read the offset of the first wallpaper from the preset database.
- the folding screen mobile phone in the folded state displays the first wallpaper multiple times, the folding screen mobile phone can read the offset of the first wallpaper from the preset database each time it needs to display the first wallpaper.
- the folding screen mobile phone in the folded state receives a return to desktop operation
- the offset of the first wallpaper is read from the preset database for displaying the desktop wallpaper using the offset of the first wallpaper.
- the folding screen mobile phone starts application 1.
- the folding screen mobile phone in the folded state receives the return to desktop operation again, and in response to the return to desktop operation, the folding screen mobile phone reads the offset of the first wallpaper from the preset database again, so as to display the desktop wallpaper using the offset of the first wallpaper.
- the folding screen mobile phone only needs to read the offset of the first wallpaper once, and when the device state is switched to the unfolded state and then switched to the folded state, the offset of the first wallpaper is read again.
- the folding screen mobile phone displays the complete first wallpaper on the suface in the wallpaper window.
- the foldable screen mobile phone can display the complete content on the drawing area, that is, display the complete first wallpaper (or describe as displaying the first wallpaper in full screen on the first interface), without using the offset of the first wallpaper to determine the content displayed in the wallpaper window, and without reading the offset of the first wallpaper from the above-mentioned preset database.
- the foldable screen mobile phone switches from the unfolded state to the folded state, the foldable screen mobile phone adjusts the size of the wallpaper window to the size of the bright screen area of the screen in the folded state, and the foldable screen mobile phone reads the offset of the first wallpaper from the preset database.
- the foldable screen mobile phone displays part of the content of the first wallpaper in an adjusted window based on the offset of the first wallpaper.
- the foldable screen mobile phone needs to adjust the size of the wallpaper window to the size of the bright screen area of the screen in the folded state, that is, to adapt the size of the wallpaper window to the bright screen area of the screen of the foldable screen mobile phone in the folded state.
- the foldable screen mobile phone does not need to reallocate or set the size of the surface corresponding to the wallpaper window.
- the adjusted wallpaper window Only part of the drawn content on the surface is displayed, that is, part of the content of the first wallpaper is displayed (the part of the content of the first wallpaper can also be called the second wallpaper, that is, the second wallpaper is displayed on the second interface).
- the wallpaper window sizes are different before and after adjustment, they correspond to the same surface. Therefore, when the foldable screen mobile phone switches from the folded state to the unfolded state, that is, in the process of displaying the first wallpaper adapted to the bright screen area of the screen in the folded state, there is no need to switch to display the first wallpaper. Instead, on the basis of the original display of the first wallpaper, the display content of the first wallpaper is reduced, and the problem of sudden screen changes will not occur.
- the user folds the foldable screen mobile phone, and the device state of the foldable screen mobile phone switches from the unfolded state to the folded state. Since the foldable screen mobile phone is displaying the first wallpaper, the wallpaper window used to display the first wallpaper has not been destroyed, and the foldable screen mobile phone does not need to recreate the wallpaper window.
- the mobile phone can directly adjust the size of the wallpaper window to the size of the bright screen area of the screen in the folded state. And because the size of the adjusted wallpaper window is smaller than the size of the drawing area, it cannot fully display the first wallpaper.
- the foldable screen mobile phone while displaying part of the content of the first wallpaper, if the device state of the foldable screen mobile phone has not changed, that is, the device state of the foldable screen mobile phone has not switched from the folded state to the unfolded state, the foldable screen mobile phone does not need to execute the above S312 and S313.
- the theme package corresponding to the target theme may include a configuration file of the first wallpaper corresponding to the target theme.
- the configuration file may include configuration data such as the offset of the first wallpaper (or the offset of the theme), elastic animation stiffness configuration information, depth mode configuration information, blur configuration information, etc.
- the wallpaper framework may first delete the offset of the existing wallpaper (i.e., theme) in the preset database. Afterwards, the wallpaper framework may write the offset of the first wallpaper into the preset database, so that the preset database can only save the offset of the theme currently set for the folding screen mobile phone, reducing resource usage. In some embodiments, the wallpaper framework may call the write interface as described above to write the offset of the first wallpaper into the preset database.
- the wallpaper framework may create an instance of a wallpaper application, or describe as creating a wallpaper application process, to launch the wallpaper application.
- the wallpaper application creates a wallpaper window of a size equal to the size of the bright screen area of the current screen, and sets the size of the surface to the size of the bright screen area of the screen in the expanded state.
- the process of the wallpaper application filling data for the wallpaper service corresponding to the first wallpaper can be called creating a wallpaper window.
- the wallpaper application assigns the height and width of the bright screen area of the current screen to the corresponding variables in the wallpaper service to obtain a wallpaper window with the same size as the bright screen area of the current screen.
- the above describes the process of setting the first wallpaper corresponding to the target theme.
- the following describes the process of displaying the first wallpaper.
- the wallpaper application sends the current device state to the wallpaper service corresponding to the first wallpaper.
- the current device state can be represented by a state identifier.
- the state identifier corresponding to the folded state is 0, and the state identifier corresponding to the expanded state is 1.
- the wallpaper application may also directly fill the current device status into the wallpaper service when creating the wallpaper window so that the wallpaper service can obtain the current device status, or the wallpaper service may directly determine the current device status based on the size of the bright screen area of the current screen.
- the wallpaper window reads the offset of the first wallpaper from the preset database.
- the wallpaper window sends the image content in the target display area to the display screen based on the position of the target display area.
- the folding angle detection sensor detects that the folding angle is greater than a first preset angle threshold, and sends a second message to the wallpaper application and the wallpaper window.
- the second message may include the current folding angle or device status of the foldable screen mobile phone.
- the wallpaper application loads an animation frame corresponding to the first wallpaper on the surface.
- the wallpaper application can load the animation frame sequence corresponding to the first wallpaper on the surface to achieve a dynamic display effect.
- the wallpaper window adjusts the size of the wallpaper window to the size of the bright screen area of the screen in the expanded state, and obtains an animation frame corresponding to the first wallpaper in the surface.
- the wallpaper window sends the animation frame corresponding to the first wallpaper to the display screen.
- the display screen displays the animation frame corresponding to the first wallpaper.
- the wallpaper window sends all image contents corresponding to the animation frame corresponding to the first wallpaper to the display screen for display on the display screen.
- the wallpaper window can adjust the size of the wallpaper window, and the adjusted wallpaper window size is consistent with the size of the surface. Therefore, the screen can be used to display the complete content on the surface, and the wallpaper can be smoothly switched between large and small screens when switching between large and small screens. This solves the problem of the connection display of two sizes of wallpaper when the external folding screen mobile phone switches between large and small screens. And when switching between large and small screens of wallpaper, there is no need to change the size of the surface, only adjust the size of the wallpaper window to avoid sudden changes in the picture.
- S9-S18 above introduces the process of displaying the first wallpaper in the folded state and after switching from the folded state to the unfolded state.
- Another display situation will be introduced below, in which the mobile phone displays the first wallpaper in the unfolded state and after switching from the unfolded state to the folded state, the first wallpaper is displayed.
- S19-S20 represents the process of displaying the first wallpaper in the unfolded state of the foldable screen mobile phone.
- S21-S27 represents the process of displaying the first wallpaper after the foldable screen mobile phone switches from the unfolded state to the folded state.
- the wallpaper window sends all the contents of the first wallpaper to the display screen.
- the display screen displays all contents of the first wallpaper.
- the folding angle detection sensor detects that the folding angle is less than a first preset angle threshold, and sends a third message to the wallpaper application and the wallpaper window.
- the third message may include the current folding angle or device status of the foldable screen mobile phone.
- the wallpaper application loads an animation frame corresponding to the first wallpaper on the surface in response to the third message.
- the wallpaper window reads the offset of the first wallpaper from the preset database.
- the wallpaper window adjusts the size of the wallpaper window to the size of the bright screen area of the screen in the folded state.
- the wallpaper window determines the position of the target display area of the animation frame in the surface based on the offset of the first wallpaper and the size of the wallpaper window.
- the target display area of the animation frame represents the display area of the animation frame in the folded state.
- the wallpaper window sends the image content in the target display area to the display screen based on the position of the target display area of the animation frame.
- the display screen displays the image content in the target display area.
- the image content in the target display area of the above-mentioned animation frame represents the wallpaper content displayed by the folding screen mobile phone after switching from the unfolded state to the folded state during the display of the first wallpaper corresponding to the theme.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Environmental & Geological Engineering (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请提供一种壁纸显示方法及电子设备,涉及终端技术领域。电子设备为折叠屏设备,处于展开态的折叠屏设备显示第一界面,该第一界面显示展开态下的第一壁纸的显示区域内的内容,如第一壁纸的全部内容。第一壁纸存在对应的偏移量,该偏移量用于确定折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域的偏移值,换言之,第一壁纸用于确定折叠态下的第一壁纸的显示内容。之后,在显示第一壁纸期间,用户折叠折叠屏设备,折叠屏设备切换至折叠态,折叠屏设备可以读取第一壁纸对应的偏移量,以供利用偏移量确定第一壁纸的显示内容,显示第一壁纸的部分内容,实现不同设备状态下的壁纸的适配显示,保证用户视觉体验。
Description
本申请要求于2023年06月30日提交国家知识产权局、申请号为202310804802.7、发明名称为“一种壁纸显示方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端技术领域,尤其涉及一种壁纸显示方法及电子设备。
随着折叠屏技术的逐渐成熟,使用折叠屏设备(如折叠屏手机)的用户越来越多。在用户使用折叠屏手机的过程中,折叠屏手机经常会显示壁纸,例如,折叠屏手机显示桌面壁纸,锁屏壁纸等。由于折叠屏手机存在不同的设备状态(如折叠态、展开态),因此,折叠屏手机如何显示壁纸成为一种亟需解决的问题。
发明内容
有鉴于此,本申请提供了一种壁纸显示方法及电子设备,用于实现折叠屏设备在不同设备状态下的壁纸的显示。
第一方面,本申请提供一种壁纸显示方法,应用于折叠屏设备,处于展开态的折叠屏设备显示第一界面,第一界面全屏显示第一壁纸;第一壁纸存在对应的偏移量;第一壁纸的偏移量表示折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域的偏移值;折叠态下的第一壁纸的显示区域的大小与折叠态下的屏幕的亮屏区域的大小相同,展开态下的第一壁纸的显示区域的大小与展开态下的屏幕的亮屏区域的大小相同;
之后,用户折叠折叠屏设备,响应于对折叠屏设备的折叠操作,折叠屏设备的设备状态可以由展开态切换至折叠态,处于折叠态的折叠屏设备获取第一壁纸的偏移量,基于该第一壁纸的偏移量显示第二界面,第二界面显示第一壁纸的部分内容(或描述为第二界面显示第二壁纸,所述第二壁纸是第一壁纸的部分内容);其中,第二界面显示的第一壁纸的部分内容(也就是第二壁纸)相对于第一界面显示的第一壁纸在目标方向上存在与偏移量对应的偏移,也就是说第一壁纸的部分内容是基于第一壁纸的偏移量确定的。
本申请中,在折叠屏设备处于展开状态的情况下,折叠屏设备显示展开态下的第一壁纸的显示区域的内容,该展开态下的第一壁纸的显示区域与展开态下的屏幕的亮屏区域的大小相同,也就是说,如果展开态下的第一壁纸的显示区域内的内容是第一壁纸的全部内容,那么折叠屏设备显示壁纸时显示的是第一壁纸的全部内容。在显示壁纸期间,当折叠屏设备由展开态切换至折叠态时,折叠屏设备的屏幕的亮屏区域大小变小,因此,折叠屏设备可以基于第一壁纸的偏移量确定展开态下的第一壁纸的显示区域内的部分内容确定为折叠态下的第一壁纸的显示区域中的内容,且折叠态下的第一壁纸的显示区域的大小和折叠态下的屏幕的亮屏区域的大小相同,然后显示该折
叠态下的第一壁纸的显示区域中的内容,也就是折叠屏设备减少显示的第一壁纸的内容,实现不同设备状态下的显示的壁纸尺寸的适配,并且在由展开态切换至折叠态时,直接是减少显示的第一壁纸的内容,无需切换显示壁纸,实现壁纸的流畅显示,避免出现画面突变的问题,提高用户的视觉体验,从而提高用户使用满意度。
在一种可能的设计方式中,在显示上述第一壁纸的部分内容之后,如在显示第一壁纸的部分内容期间,用户又展开折叠屏设备,折叠屏设备的设备状态由折叠态切换至展开态,折叠屏设备再次全屏显示第一壁纸,也就是说折叠屏设备在第三界面上全屏显示第一壁纸。基于此,实现壁纸的适配显示,并且无需切换显示壁纸,实现壁纸的流畅显示。
在一种可能的设计方式中,上述再次全屏显示第一壁纸的过程可以是,折叠屏设备显示第一壁纸的剩余内容,直至显示第一壁纸的完整内容,实现壁纸的动态展示效果。或者折叠屏设备直接显示第一壁纸的完整内容,实现第一壁纸的快速完整显示。
在一种可能的设计方式中,上述第一壁纸是目标主题对应的壁纸,上述展开态下的第一壁纸的显示区域内的内容是第一壁纸的全部内容。在显示上述第一界面之前,用户可以先将折叠屏设备的壁纸主题设置为目标主题。具体的,目标主题的设置过程可以包括:在接收到用户输入的第二操作,响应于第二操作,折叠屏设备可以创建大小为所述折叠态下的屏幕的亮屏区域的大小的壁纸窗口;第二操作用于触发将所述折叠屏设备的主题设置为目标主题,如第二操作是目标主题的设置操作。
上述折叠屏设备设置壁纸窗口对应的surface的大小,该surface的大小为展开态下的屏幕的亮屏区域的大小,也就是全屏显示第一壁纸的大小。折叠屏设备可以在surface绘制第一壁纸的完整内容。
相应的,上述第一界面/第三界面显示surface内的第一壁纸的完整内容,上述第二界面显示第二壁纸是该surface内的所述第一壁纸的部分内容。
本申请中,折叠屏设备在设置主题后,可以创建大小和当前屏幕的亮屏区域的大小相同的壁纸窗口,将壁纸窗口对应的surface大小设置为展开态下的屏幕的亮屏区域的大小,也就是说surface的大小和当前屏幕的亮屏区域的大小无关,该surface上绘制有完整的第一壁纸。当折叠屏需要显示壁纸时,基于壁纸窗口,显示surface上的第一壁纸,当当前屏幕的亮屏区域的大小是展开态的大小时,壁纸窗口的大小和surface的大小一致,显示surface上的全部内容,也就是显示完整的第一壁纸。当当前屏幕的亮屏区域的大小是折叠态的大小时,壁纸窗口的大小小于surface的大小,显示surface上的部分内容,也就是显示部分的第一壁纸,从而显示与当前屏幕的亮屏区域大小适配的壁纸,保证壁纸显示的美观性。并且,由于surface的大小是展开态下的屏幕的亮屏区域的大小,使得折叠屏设备的设备状态切换时,该折叠屏设备无需重新设置surface以得到与当前屏幕的亮屏区域的大小相同的surface,从而可以避免在折叠屏设备的设备状态切换时由于需要重新设置surface导致壁纸画面出现闪烁的问题。
在一种可能的设计方式中,在上述折叠屏设备的壁纸应用具备设置权限的情况下,折叠屏设备通过壁纸应用,设置上述surface的大小。基于此,通过权限的限制能够避免任意应用对surface的大小的设置,从而避免surface大小被一些应用篡改,保证壁纸设置的安全性,并且能够提高壁纸显示的稳定性,避免折叠屏设备显示的壁纸大小
不断被改变,例如,在折叠屏设备处于展开态时,由于surface被改小,导致折叠屏设备显示壁纸的大小和当前屏幕的亮屏区域的大小不适配,保证用户的使用体验。
在一种可能的设计方式中,上述壁纸应用是否具备设置权限可以通过以下两种实现方式实现。
一种实现方式中,利用预设白名单判断壁纸应用是否具备设置。折叠屏设备判断预设白名单是否存在壁纸应用的标识。在预设白名单存在壁纸应用的标识的情况下,该壁纸应用具备设置权限,也就是具备调用预设设置接口以设置surface大小的权限。
在预设白名单不存在壁纸应用的标识的情况下,该壁纸应用具备不设置权限,也就是不具备调用预设设置接口的权限。
另一种实现方式中,利用应用的全部权限判断壁纸应用是否具备设置。折叠屏设备获取壁纸应用所具备的全部权限。在该全部权限存在设置权限的情况下,壁纸应用具备设置权限,也就是具备调用预设设置接口以设置surface大小的权限。
在该全部权限不存在设置权限的情况下,壁纸应用不具备设置权限,也就是不具备调用预设设置接口的权限。
在一种可能的设计方式中,折叠屏设备可以通过调用预设添加接口,将上述壁纸应用的标识添加至预设白名单,以使壁纸应用具备设置权限,实现设备权限的添加。
在一种可能的设计方式中,上述目标主题对应的主题包存在第一壁纸的偏移量(或描述为第一壁纸对应的偏移量)。
折叠屏设备可以将目标主题对应的主题包中的第一壁纸的偏移量写入至预设数据库。相应的,折叠屏设备从预设数据库中读取第一壁纸的偏移量,实现第一壁纸的偏移量的获得。
在一种可能的设计方式中,上述第一壁纸的偏移量的写入过程可以包括:
在上述预设数据库中不存在壁纸的偏移量的情况下,折叠屏设备可以直接将第一壁纸的偏移量写入至预设数据库;在上述预设数据库中存在壁纸的偏移量的情况下,折叠屏设备可以删除预设数据库已存在的壁纸的偏移量,然后折叠屏设备将第一壁纸的偏移量写入至预设数据库。基于此,可以减少由于保存壁纸导致的资源的占用,并且可以实现第一壁纸的偏移量的快速读取。
在一种可能的设计方式中,在上述折叠屏设备是左右折叠的情况下,第一壁纸的偏移量是x方向上的偏移量,相应的,上述目标方向是x方向。在折叠屏设备是上下折叠的情况下,偏移量是y方向上的偏移量,相应的,上述目标方向是y方向。
在一种可能的设计方式中,上述折叠态下的第一壁纸的显示区域的确定过程可以包括:
上述折叠屏设备基于偏移量和折叠态下的屏幕的亮屏区域的大小,确定折叠态下的第一壁纸的显示区域的位置,实现折叠态下的第一壁纸的显示区域的确定。
在一种可能的设计方式中,第一壁纸存在对应的偏移模式。偏移模式表示折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域的偏移位置。在折叠屏设备是左右折叠的情况下,偏移模式包括居中模式、居左模式和居右模式中的一个或多个;在折叠屏设备是上下折叠的情况下,偏移模式包括居中模式、居上模式和居下模式中的一个或多个。其中,偏移模式与上述偏移量的存储、读取、应用过程(如
在折叠态利用偏移模式显示壁纸)类似。
第二方面,本申请提供一种电子设备,所述电子设备包括显示屏、存储器和一个或多个处理器;所述显示屏、所述存储器和所述处理器耦合;所述显示屏用于显示所述处理器生成的图像,所述显示屏包括折叠屏,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述处理器执行所述计算机指令时,使得所述电子设备执行如上述第一方面中任一项所述的壁纸显示方法。
第三方面,本申请提供一种计算机可读存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如上述第一方面中任一项所述的壁纸显示方法。
第四方面,本申请提供一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如上述第一方面中任一项所述的壁纸显示方法。
可以理解地,上述提供的第二方面所述的电子设备,第三方面所述的计算机可读存储介质,第四方面所述的计算机程序产品所能达到的有益效果,可参考第一方面及其任一种可能的设计方式中的有益效果,此处不再赘述。
图1A为本申请实施例提供的一种折叠屏设备的展开态的界面示意图;
图1B为本申请实施例提供的一种折叠屏设备的折叠态的界面示意图;
图1C为本申请实施例提供的一种折叠屏设备的外折过程的示意图一;
图1D为本申请实施例提供的一种折叠屏设备的示意图一;
图1E为本申请实施例提供的一种折叠屏设备的示意图二;
图2A为本申请实施例提供的一种壁纸显示的示意图一;
图2B为本申请实施例提供的一种壁纸显示的示意图二;
图2C为本申请实施例提供的一种壁纸显示的示意图三;
图3为本申请实施例提供的一种电子设备的硬件结构示意图;
图4为本申请实施例提供的一种电子设备的结构示意图;
图5为本申请实施例提供的一种壁纸显示方法的流程示意图一;
图6A为本申请实施例提供的一种壁纸设置的界面示意图一;
图6B为本申请实施例提供的一种壁纸设置的界面示意图二;
图6C为本申请实施例提供的一种壁纸设置的界面示意图三;
图6D为本申请实施例提供的一种壁纸设置的界面示意图四;
图6E为本申请实施例提供的一种壁纸设置的界面示意图五;
图7A为本申请实施例提供的一种壁纸的显示区域的示意图一;
图7B为本申请实施例提供的一种壁纸的显示区域的示意图二;
图7C为本申请实施例提供的一种壁纸的示意图一;
图7D为本申请实施例提供的一种壁纸的示意图二;
图8A为本申请实施例提供的一种壁纸的显示内容的示意图一;
图8B为本申请实施例提供的一种壁纸的显示内容的示意图二;
图8C为本申请实施例提供的一种壁纸的显示内容的示意图三;
图9为本申请实施例提供的一种壁纸显示方法的流程示意图二;
图10A为本申请实施例提供的一种壁纸显示的示意图四;
图10B为本申请实施例提供的一种壁纸显示的示意图五;
图11A为本申请实施例提供的一种壁纸显示的示意图六;
图11B为本申请实施例提供的一种壁纸显示的示意图七;
图11C为本申请实施例提供的一种壁纸显示的示意图八;
图12为本申请实施例提供的一种壁纸显示的示意图九;
图13为本申请实施例提供的一种壁纸显示方法的流程示意图三。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
折叠屏设备(折叠屏手机)的屏幕是一整块屏幕,其可以进行折叠或展开。相应的,折叠屏设备存在两种设备状态,分别为折叠态和展开态。在屏幕处于展开态(如图1A所示)时,该屏幕的全部区域均可以用来显示数据,如显示壁纸。在屏幕处于折叠态(如图1B所示)时,该屏幕的部分区域用来显示数据,另一部分区域一直是处于黑屏状态,不会用来显示数据。也就是说,不同设备状态下的折叠屏手机的屏幕的亮屏区域的尺寸(或描述为大小)不同。在折叠屏手机处于展开态的情况下,屏幕的亮屏区域的大小可以是屏幕的大小。之后,折叠该折叠屏手机(如图1C所示,沿折叠边向外折叠折叠屏手机,也就是朝可显示用户界面的相对面翻折折叠屏手机),形成处于折叠态的折叠屏手机。在折叠屏手机处于折叠态(如图1B所示)的情况下,屏幕的亮屏区域的大小是部分屏幕大小。
需要说明的是,上述折叠屏手机的折叠方式可以是诸如上述图1C所示的左右折叠,也可以是按照如图1D所示的上下折叠,本申请实施例不对折叠屏手机的折叠方式进行限制。另外,上述折叠屏手机对应的折叠边的数量可以是如上述图1A、图1C及图1D所示的一个,也可以是大于1的数值,如图1E所示的两个,本申请实施例不对折叠边的数量进行限制。
在一些实施例中,在折叠屏手机应用主题后,折叠屏手机在显示桌面时,会显示该主题对应壁纸。由于不同设备状态下的折叠屏手机的屏幕的亮屏区域的尺寸不同,因此,不同设备状态下的折叠屏手机显示的壁纸尺寸不同。在折叠屏手机处于折叠态的情况下,折叠屏手机可以显示尺寸与折叠态下的屏幕的亮屏区域的尺寸适配的壁纸。在折叠屏手机处于展开态的情况下,折叠屏手机显示的壁纸尺寸与展开态下的屏幕的亮屏区域的尺寸适配的壁纸。在折叠屏手机显示壁纸期间,折叠屏手机的设备状态可能会发生变化。在设备状态发生变化的情况下,折叠屏手机需要切换显示壁纸,以显示尺寸与变化后的设备状态下的屏幕的亮屏区域的尺寸适配的壁纸。在切换期间,折叠屏手机可能会先闪烁一下,然后才能切换成功,造成显示画面突变,影响用户的视觉体验。示例性的,在折叠屏手机显示如图2A所示的壁纸期间,如果折叠屏手机的设备状态由折叠态切换为展开态,该折叠屏手机的屏幕会闪烁一下(如图2B所示)。之后,该折叠屏手机可以显示如图2C所示的与展开态下的屏幕的亮屏区域的尺寸适
配的壁纸。
因此,针对上述问题,本申请提出一种壁纸显示方法。该壁纸显示方法主要针对折叠方式为外折方式(如上述图1C所示)的折叠屏设备。折叠屏设备接收返回桌面操作,表明折叠屏设备需要显示桌面壁纸,该折叠屏设备可以响应于该返回桌面操作,在当前设备状态为展开态的情况下,该折叠屏设备可以直接显示完整的第一壁纸,也就是在屏幕上显示第一界面,该第一界面包括该完整的第一壁纸。之后,用户折叠折叠屏设备,折叠屏设备的设备状态切换至折叠态。由于折叠态下的屏幕的亮屏区域的大小小于展开下的屏幕的亮屏区域的大小,因此,折叠屏设备需要调整显示的第一壁纸的尺寸,该折叠屏设备可以获取第一壁纸的偏移信息,该偏移信息表示在折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域(即完整区域)的偏移位置,其可以用于确定折叠态下的第一壁纸的显示区域的位置,也就是用于确定折叠态下的第一壁纸的显示内容。之后,该折叠屏设备基于该偏移信息,显示第一壁纸的部分内容,也就是减少第一壁纸的显示区域,使得第一壁纸的显示区域与折叠态下的屏幕区域的大小适配,实现壁纸适配的显示,无需切换显示,实现壁纸的流畅显示,避免出现画面突变的问题,提高用户的视觉体验,从而提高用户使用满意度。
需要说明的是,对于折叠屏设备来说,在折叠屏设备的折叠方式为内折方式的情况下,当折叠屏设备处于展开态时,其通过内屏显示壁纸。在折叠屏设备处于折叠态时,其通过外屏显示壁纸,内屏和外屏相对,并不是在同一面。在显示壁纸期间,如果由折叠态切换至展开态,显示壁纸的屏幕由外屏切换至内屏,屏幕发生切换,必然会造成画面突变的问题,因此,无需应用本申请提出的壁纸显示方法。应理解,在折叠屏设备的折叠方式为内折方式的情况下,可以沿折叠边向内折叠折叠屏,也就是朝可显示用户界面的一面翻折折叠屏,形成处于折叠态的折叠屏手机。
示例性的,本申请实施例中的折叠屏设备可以是手机、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等具备折叠屏的电子设备,本申请实施例对该电子设备的具体形态不作特殊限制。
示例性的,图3示出了电子设备200的结构示意图。如图3所示,电子设备200可以包括处理器210,外部存储器接口220,内部存储器221,通用串行总线(universal serial bus,USB)接口230,充电管理模块211,电源管理模块212,电池213,天线1,天线2,移动通信模块240,无线通信模块250,音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头293,显示屏294,以及用户标识模块(subscriber identification module,SIM)卡接口295等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备200的具体限定。在本申请另一些实施例中,电子设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理
器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备200的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。
在一些实施例中,处理器210可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备200的结构限定。在本申请另一些实施例中,电子设备200也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块211用于从充电器接收充电输入。充电管理模块211为电池213充电的同时,还可以通过电源管理模块212为电子设备供电。
电子设备200的无线通信功能可以通过天线1,天线2,移动通信模块240,无线通信模块250,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备200中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块240可以提供应用在电子设备200上的包括2G/3G/4G/5G等无线通信的解决方案。调制解调处理器可以包括调制器和解调器。
无线通信模块250可以提供应用在电子设备200上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。
电子设备200通过GPU,显示屏294,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏294和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器210可包括一个或多个GPU,其执行程序指令以生成或改变显
示信息。
显示屏(或称为屏幕)294用于显示图像,视频等。显示屏294包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备200可以包括1个或N个显示屏294,N为大于1的正整数。
在一些实施例中,上述显示屏294可以为折叠屏。其中,该折叠屏的折叠方式可以是如上述图1C所示的外折方式。
示例性的,当折叠屏的折叠角(即沿折叠边折叠的两部分屏幕之间的夹角)θ(如上述图1C所示的θ)的取值范围可以为[0°,180°]。当θ在[0°,X]范围内,可以确定折叠屏手机处于折叠态。当θ在(X,180°]范围内,可以确定折叠屏手机处于展开态。其中,X为第一预设角度阈值。X可以是该折叠屏手机在出厂前设置的,也可以是由用户在折叠屏手机中设定,还可以是折叠屏手机基于用户的使用习惯确定的,本申请对X的取值不做限定。例如,X可以设置为85°、90°或95°等。假设X设置为90°,当折叠屏的折叠角θ小于或等于90°,则确定折叠屏手机处于折叠态;当折叠屏的折叠角θ大于90°,则确定折叠屏手机处于展开态。
电子设备200可以通过ISP,摄像头293,视频编解码器,GPU,显示屏294以及应用处理器等实现拍摄功能。
外部存储器接口220可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备200的存储能力。
内部存储器221可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器210通过运行存储在内部存储器221的指令,从而执行电子设备200的各种功能应用以及数据处理。内部存储器221可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备200使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备200可以通过音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
按键290包括开机键,音量键等。指示器292可以是指示灯。
传感器模块280可以包括折叠角检测传感器,压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。
其中,上述折叠角检测传感器用于检测该电子设备200,也即屏幕的折叠角,如上述图1C所示的折叠角θ。示例性的,该折叠角检测传感器可以为霍尔传感器。
上述电子设备200的软件系统可以采用分层架构,事件驱动架构,微核架构,微
服务架构,或云架构。本申请实施例以分层架构的AndroidTM系统为例,示例性说明电子设备200的软件结构。
图4是本发明实施例的电子设备200的结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将软件系统分为四层,从上至下分别为应用程序层,应用程序框架层,运行时(runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图4所示,应用程序包可以包括相机,图库,日历,通话,地图,主题应用,WLAN,音乐,壁纸应用,短信息等应用程序。
其中,上述主题应用可以用于设置上述电子设备的壁纸。壁纸应用,又可以称为壁纸APK(AndroidPackage)可以用于加载所需显示的壁纸。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图4所示,应用程序框架层可以包括窗口管理器,预设数据库,视图系统,壁纸框架,资源管理器,壁纸窗口等。
预设数据库可以用于存储数据,如壁纸的偏移信息。
壁纸窗口可以用于显示壁纸。
壁纸框架可以用于读取、解析壁纸的主题包、拉起壁纸应用等。
runtime包括核心库和虚拟机。runtime负责软件系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是核心库。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
在一些实施例中,软件层可以与硬件层进行通信。例如,软件层可以接收折叠角检测传感器发送的折叠角或设备状态,以确定电子设备的当前屏幕的亮屏区域的大小、当前设备状态等。又例如,软件层可以将待显示的壁纸内容发送给显示屏,以利用显示屏显示壁纸。
可以理解的是,图4示出的结构中的层以及各层中包含的部件,并不构成对电子设备200,即折叠屏设备的具体限定。在本申请另一些实施例中,结构可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请不做限定。
本申请提供一种壁纸显示方法。在用户使用折叠屏设备的过程中,用户可以设置折叠屏设备的主题。在主题设置完成后,折叠屏设备可以应用该主题,显示相应壁纸。下面将以上述电子设备(或折叠屏设备)是折叠屏手机,且折叠方式为外折方式为例,结合附图对本申请实施例提供的一种壁纸显示方法进行详细介绍。如图5所示,该方法可以包括步骤S301-S313。
S301、折叠屏手机接收用户输入的第二操作。其中,第二操作用于触发折叠屏手机将折叠屏手机的主题为目标主题。
示例性的,上述第二操作可以是目标主题的设置操作。举例来说。用户点击如图
6A所示的设置应用的图标。响应于该设置应用的图标的点击操作,折叠屏手机可以显示相应的设置界面,该设置界面显示有桌面和壁纸控件。之后,用户可以点击桌面和壁纸控件,响应作用于桌面和壁纸控件的点击操作,折叠屏手机可以显示如图6B所示的界面,该界面包括主题控件,该主题控件可以用于触发显示主题资源。之后,当用户点击该主题控件时,折叠屏手机响应于主题控件的点击操作,显示如图6C所示的界面,该界面包括至少一个主题选项(如图6C所示的“绽放”、“行走”、“泡沫”等主题选项)。用户可以根据需求选择主题。当用户选择绽放主题选项后,响应于该绽放主题选项的选择操作,折叠屏手机可以显示如图6D所示的绽放主题对应的预览图像,该预览图像表示折叠屏手机应用该绽放主题后的显示效果。在接收到用户点击如图6D所示的应用控件的操作后,表明用户想要折叠屏手机应用该绽放主题,该折叠屏手机应用该绽放主题。这里用户点击该应用控件的操作便可以为上述第二操作,用户选择的绽放主题便可以为上述目标主题。之后,当折叠屏手机需要显示该绽放主题对应的壁纸时,如折叠屏手机接收到返回桌面操作,该折叠屏手机可以显示如图6E所示的壁纸。
可以理解的是,上述设置主题的操作过程仅是一种示例,用户还可以通过其它方式设置主题,本申请不对其限制。
S302、响应于第二操作,折叠屏手机获取目标主题对应的第一壁纸的配置数据。其中,第一壁纸的配置数据包括第一壁纸的偏移量。
其中,上述第一壁纸的偏移量表示第一壁纸在折叠态下的显示内容(或描述为显示区域)相对于第一壁纸在展开态下的显示内容的位置偏移量。第一壁纸的偏移量可以用于确定折叠态下的第一壁纸的显示部分。展开态下的第一壁纸的显示内容是完整的第一壁纸。展开态下的第一壁纸的显示区域的大小与展开态下的屏幕的亮屏区域的大小适配(如相同)。折叠态下的第一壁纸的显示内容是第一壁纸的部分内容,也就是折叠态下的第一壁纸的显示区域是第一壁纸的部分区域。折叠态下的第一壁纸的显示区域的大小与折叠态下的屏幕的亮屏区域的大小适配。
在一个实施例中,每个主题(如上述目标主题)对应一个主题包,主题对应的主题包可以包括该主题对应的壁纸(如上述第一壁纸)所对应的配置文件,该配置文件可以包括壁纸的配置数据,如壁纸的偏移量。另外,主题包还可以包括其它信息,如在应用主题后的预览图像(如上述绽放主题对应的预览图像)。本申请不对其主题包所包括的信息进行限制。
在一些实施例中,上述壁纸对应的配置文件不仅可以包括壁纸的偏移量,还可以包括壁纸的模糊配置信息,深度模式配置信息,弹性动画刚度配置信息中的至少一个配置信息。应理解,在壁纸为静态壁纸的情况下,其并不存在动态播放的过程,因此,该壁纸对应的配置文件可以不包括弹性动画刚度配置信息。
其中,上述模糊设置信息表示该壁纸是否支持模糊效果,例如,折叠屏手机在锁屏状态下显示壁纸时,当用户在屏幕上向上滑动时,如果模糊设置信息指示支持模糊效果,那么折叠屏手机将壁纸模糊化,显示模糊化后的壁纸。示例性的,模糊设置信息可以通过support_background_blur表示。在support_background_blur的值为true的情况下,表明该壁纸支持模糊效果。在support_background_blur的值为false的情况下,
表明该壁纸不支持模糊效果。
上述深度模式配置信息表示壁纸是否支持深色模式。示例性的,深度模式配置信息可以通过support_dark_mode表示。在support_dark_mod的值为true的情况下,表明该壁纸支持深色模式。在support_dark_mod的值为false的情况下,表明该壁纸不支持深色模式。
上述弹性动画刚度配置信息表示壁纸的动态播放效果。在壁纸为动态壁纸的情况下,该壁纸相当于一个动画。刚度值影响该动画的播放速度,弹窗动画刚度配置信息便为壁纸的刚度值。示例性的,弹性动画刚度配置信息可以通过fold-spring-stiffness表示。在fold-spring-stiffness的值为60的情况下,表明该壁纸的刚度值为60。
在一些实施例中,上述壁纸的配置文件的格式可以是可扩展标记语言(extensible markup language,XML)格式,相应的,该配置文件的配置如下:
<support_background_blur>true</support_background_blur>//壁纸支持模糊效果;
<support_dark_mode>true</support_dark_moder>//壁纸支持深色模式;
<fold_spring_stiffness>15</fold_spring_stiffness>//壁纸的刚度值为15;
<outfold_x_coordinate>100</outfold_x_coordinate>//壁纸的偏移量为在x方向上偏移100个像素。
可以理解的是,如果折叠屏手机是左右折叠的,在折叠屏手机的设备状态发生变化时,折叠屏手机的宽度会发生变化,而高度并不会发生变化,因此,壁纸的偏移量是x方向上的偏移量。例如,壁纸的偏移量为x方向上偏移100个像素,假设第一壁纸的左顶点为原点,如图7A所示,折叠态下的第一壁纸的显示区域相较于展开态下的第一壁纸的显示区域的横向(即x方向)上的偏移量是100个像素。
如果折叠屏手机是上下折叠的(如上述图1D),在折叠屏手机的设备状态发生变化时,折叠屏手机的高度会发生变化,而宽度并不会发生变化,因此,壁纸的偏移量是y方向上的偏移量。例如,壁纸的偏移量为y方向上偏移100个像素,假设第一壁纸的左顶点为原点,如图7B所示,折叠态下的第一壁纸的显示区域相较于展开态下的第一壁纸的显示区域的纵向(即y方向)上的偏移量是100个像素。
其中,上述偏移量通过像素表示仅为一种示例,也可以通过其它单位表示,如毫米等,本申请不对其限制。
在一些实施例中,上述第一壁纸的配置数据可以不包括第一壁纸的偏移量,而包括第一壁纸的偏移模式。在折叠屏手机的折叠方式为左右折叠的情况下,该偏移模式包括居中模式、居左模式和居右模式中的至少一个。在折叠屏手机的折叠方式为上下折叠的情况下,该偏移模式包括居上模式、居下模式和居中模式中的至少一个。换言之,第一壁纸的配置数据可以包括第一壁纸的偏移信息,该偏移信息包括偏移量或者偏移模式。
下面以折叠屏手机的折叠方式是左右折叠为例,介绍壁纸(如第一壁纸)的偏移模式。
其中,上述居中模式表示折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域是居中的,换言之,居中模式表示折叠态下的第一壁纸的显示内容是展开态下的第一壁纸的中间部分。
上述居左模式表示折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域是居左的,换言之,居中模式表示折叠态下的第一壁纸的显示内容是展开态下的第一壁纸的左侧部分。
上述居右模式表示折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域是居右的,换言之,居中模式表示折叠态下的第一壁纸的显示内容是展开态下的第一壁纸的右侧部分。
在一些实施例中,一种情况下,可以根据美观需求设置的壁纸的偏移量或偏移模式。比如,假设折叠屏手机是左右折叠的,在壁纸上的关键对象(如上述图7A所示的花朵)位于壁纸中间时,该壁纸的偏移模式可以是居中模式或者x方向上的偏移量较为居中,以尽可能显示该关键对象。在壁纸上的关键对象位于壁纸左侧时,该壁纸的偏移模式可以是居左显示模式,或者x方向上的偏移量与壁纸的左上角顶点之间的距离相差较小,例如,如图7C所述的壁纸,其上面的人物位于壁纸左侧,因此,该壁纸的偏移模式可以是居左模式或者偏移量与壁纸的左上角顶点之间的距离相差较小。
同理,在壁纸上的关键对象位于壁纸右侧时,该壁纸的偏移模式可以是居右模式,或者x方向上的偏移量与壁纸的左上角顶点之间的距离相差较大。如图7D所示的壁纸,其上面的人物位于壁纸右侧,该壁纸的偏移模式可以是居右模式,或者x方向上的偏移量与壁纸的左上角顶点之间的距离相差较大。另一种情况下,用户可以根据使用需求设置壁纸的偏移量或偏移模式。折叠屏手机可以在用户选择壁纸的情况下,提供相应的选择控件,以供用户选择偏移量或偏移模式,或者,提供相应的输入控件(如文本框),以供用户输入偏移量或偏移模式,满足用户的个性化需求。
S303、折叠屏手机将第一壁纸的偏移量写入至预设数据库中。
示例性的,折叠屏手机在得到第一壁纸的偏移量后,可以调用相关写入接口,将第一壁纸的偏移量作为输入参数,通过key-value方式,将第一壁纸的偏移量写入至预设数据库中,以供折叠屏手机在处于折叠态下,需要显示第一壁纸时,利用该第一壁纸的偏移量显示第一壁纸。其中,key可以表示第一壁纸的偏移量对应的字段,value可以表示具体的偏移量数值。
在一些实施例中,上述预设数据库可以是折叠屏手机本地的settings数据库。上述写入接口的实现代码可以为如下代码:
private void setOutFoldOffsetToSettings(float offset){
Settings.Secure.putFloatForUser(mContext.getContentResolver().OUTFOLD_X_COO RDINATE,offset,mContext.getUserId());
Log.i(TAG,”setOutFoldOffsetToSettings,offset=”+offset);
}
其中,上述OUTFOLD_X_COORDINATE可以定义为public static final String OUTFOLD_X_COORDINATE=”outfold_x_coordinate”。mContext.getUserId()表示当前用户的标识。
上述OUTFOLD_X_COORDINATE表示value,offset表示key。
需要说明的是,当折叠屏手机存在多个用户的标识(如用户的名称)时,表明多个用户共享该折叠屏手机。每个用户都存在对应空间,可以用来存储应用、主题等内
容。因此,上述预设数据库可以包括该多个用户的标识中的每个用户标识对应的壁纸的偏移量。折叠屏手机可以将第一壁纸的偏移量和当前用户的标识一起写入至该预设数据库中。另外,预设数据库也可以仅包括当前用户的标识对应的壁纸的偏移量,因此,折叠屏手机可以直接将第一壁纸的偏移量写入至预设数据库,而无需涉及当前用户的标识。
应理解,上述用户的标识可以是通过折叠屏手机中的“添加用户”添加的。
在一些实施例中,上述预设数据库是动态更新的,其可以仅保存折叠屏手机当前应用的壁纸的偏移量,如上述第一壁纸的偏移量,从而可以减少由于保存壁纸导致的资源的占用,并且可以实现第一壁纸的偏移量的快速读取。也就是说,折叠屏手机在将一个新的壁纸的偏移量写入至预设数据库之前,如果该预设数据库已经存储有一个壁纸的偏移量,折叠屏手机可以先删除该一个壁纸的偏移量。然后,该折叠屏手机可以将该新的壁纸(即第一壁纸)的偏移量写入至预设数据库。
其中,可选的,上述预设数据库包括多个用户的标识所对应的壁纸的偏移量。在预设数据库已经存储有当前用户的标识对应的壁纸的偏移量的情况下,折叠屏手机可以先删除该当前用户的标识所对应的壁纸的偏移量。然后,折叠屏手机可以将上述第一壁纸的偏移量写入至该预设数据库。
在一些实施例中,折叠屏手机也可以不将第一壁纸的偏移量写入预设数据库,而是写入折叠屏手机的本地的其它位置中,如某个文件中、缓存中等。
S304、折叠屏手机创建大小是当前屏幕的亮屏区域的大小的壁纸窗口,将绘制区域surface的大小设置为展开态下的屏幕的亮屏区域的大小。
其中,绘制区域用于折叠屏手机绘制对象(如第一壁纸),绘制区域决定着折叠屏手机能够绘制的最大范围。壁纸窗口相当一个容器,用于确定折叠屏手机所能够显示的区域,其决定着用户所能够看到的折叠屏手机所展示的内容的范围,如折叠态下的壁纸窗口可以显示上述折叠态下第一壁纸的显示区域内的内容,展开态下的壁纸窗口可以显示上述展开态下第一壁纸的显示区域内的内容。壁纸窗口的大小与折叠屏手机当前屏幕的亮屏区域的大小相同。
本申请实施例中,在确定用户选择的第一壁纸后,该折叠屏手机可以先获取当前屏幕的亮屏区域的大小。之后,该折叠屏手机可以基于当前屏幕的亮屏区域的大小,创建壁纸窗口。以及折叠屏手机为该壁纸窗口分配一个绘制区域(或描述成创建绘制区域),将该绘制区域的大小设置为展开态下的屏幕的亮屏区域的大小,也就是设置为屏幕的大小,以使折叠屏手机可以在需要显示第一壁纸时,可以直接利用壁纸窗口和surface进行显示。
其中,上述绘制区域的大小不受限于折叠屏手机的当前屏幕的亮屏区域的大小,绘制区域的大小可能与折叠屏手机的当前屏幕的亮屏区域的大小相同,也即与壁纸窗口的大小相同,也可能不同。例如,在折叠屏手机当前处于折叠态的情况下,绘制区域的大小大于当前屏幕的亮屏区域的大小,即大于壁纸窗口的大小。在折叠屏手机当前处于展开态的情况下,绘制区域的大小等于当前屏幕的亮屏区域的大小,即等于壁纸窗口的大小。
需要说明的是,每个壁纸窗口对应一个surface,surface对应了一块屏幕缓冲区,
对象(如view组件、壁纸)需要绘制在surface上。简单可以理解为,surface相当于一个画布,可以用于绘制内容。壁纸窗口相当于一个框放置在画布上。当画布大小和框大小相同时,用户能够看到画布的完整内容(如图8A所示)。当折叠屏手机处于折叠态时,框大小小于画布大小(如图8B所示),用户能够看到窗口内的内容,也就是画布的部分内容(如图8C所示),而无法看到完整的绘制区域的内容。
在一些实施例中,为了避免壁纸窗口的重复创建,折叠屏手机可以先判断折叠屏手机是否存在壁纸窗口,也即判断该壁纸窗口是否还未被销毁。在折叠屏手机存在当前设备状态对应的壁纸窗口的情况下,折叠屏手机无需再重复创建对应的壁纸窗口,折叠屏手机可以直接利用该壁纸窗口显示第一壁纸,避免由于壁纸窗口的重复创建导致的资源的浪费。
同理,折叠屏手机也可以先判断折叠屏手机是否存在上述壁纸窗口所对应的surface,也即判断上述壁纸窗口所对应的surface是否还未被销毁。在存在该surface的情况下,折叠屏手机无需再分配surface,也无需设置该surface的大小。在不存在该surface的情况下,折叠屏手机可以分配surface,设置该surface的大小。
在一些实施例中,上述折叠屏手机可以基于BaseSurfaceHolder类,调用预设设置接口(如public void setFixedSize(int width,int height)接口),实现surface的大小的设置。其中,width表示展开态下的屏幕的亮屏区域的宽度(如上述图1C所示的展开态下的屏幕的亮屏区域的宽度),height表示展开态下的屏幕的亮屏区域的高度(如上述图1C所示的展开态下的屏幕的亮屏区域的高度)。其中,该预设设置接口对应的代码文件可以保存在/frameworks/base/core/java/android/service/wallpaper/WallpaperService.java文件中,当然,也可以保存在其它文件中,本申请不对其限制。
在一些实施例中,折叠屏手机可以利用壁纸应用设置surface的大小。具体的,利用壁纸应用设置surface的大小可以参考图9所示的S70-S72。
S70、折叠屏手机判断壁纸应用是否具备设置权限。
为了提高安全性,该折叠屏手机可以先判断该壁纸应用是否具备设置权限。在该壁纸应用具备设置权限的情况下,表明该壁纸应用的安全性较高,具备设置surface大小的权限,也就是具备调用上述预设设置接口的权限,该折叠屏手机可以执行S71。
在该壁纸应用不具备设置权限的情况下,表明该壁纸应用的安全性较低,不具备设置surface大小的权限,也即不能调用预设设置接口以设置surface的大小,该折叠屏手机可以执行S72。
S71、折叠屏手机基于壁纸应用,将绘制区域surface的大小设置为展开态下的屏幕的亮屏区域的大小。
示例性的,壁纸应用可以调用上述预设设置接口,设置surface的大小。
S72、折叠屏手机不设置surface的大小。
在一些实施例中,折叠屏手机可以通过预设白名单判断壁纸应用是否具备设置权限。其中,预设白名单包括至少一个应用的标识。在预设白名单存在壁纸应用的标识的情况下,表明该壁纸应用具备设置权限,也就是具备调用上述预设设置接口以设置surface大小的权限,在预设白名单不存在壁纸应用的标识的情况下,表明该壁纸应用
不具备设置权限,也就是不具备调用上述预设设置接口以设置surface大小的权限。其中,壁纸应用的标识可以是壁纸应用的包名、进程标识、名称等能够表示该壁纸应用的信息。
在一些实施例中,折叠屏手机可以调用预设添加接口,将应用添加至白名单中。示例性的,该预设添加接口如下:
@UnsupportedAppUsage
public void setFixedSizeAllowed(boolean allowed)。
另外,折叠屏手机也可以其它方式判断壁纸应用是否具备设置权限,例如,从预设位置中查询该壁纸应用所具备的权限,在该权限存在设置权限的情况下,表明该壁纸应用具备设置权限,否则,该壁纸应用不具备设置权限。
本申请实施例中,通过权限的限制能够避免任意应用对surface的大小的设置,从而避免surface大小被一些应用篡改,保证壁纸设置的安全性,并且能够提高壁纸显示的稳定性,避免折叠屏手机显示的壁纸大小不断被改变,例如,在折叠屏手机处于展开态时,由于surface被改小,导致折叠屏手机显示壁纸的大小和屏幕的亮屏区域的大小不适配,保证用户的使用体验。
S305、折叠屏手机在上述surface上绘制第一壁纸。
本申请实施例中,折叠屏手机将第一壁纸绘制在surface上,该surface上绘制的是完整的第一壁纸,该第一壁纸的尺寸与展开态下的屏幕的亮屏区域的大小适配。
在一些实施例中,折叠屏手机也可以在需要显示第一壁纸的情况下,绘制第一壁纸。如接收到用于触发第一壁纸的第一操作的情况下,在上述surface上绘制第一壁纸,本申请不对绘制第一壁纸的时机限制。
上面介绍了折叠屏手机的主题设置过程,下面将继续介绍主题对应的壁纸显示过程。
S306、折叠屏手机响应于第一操作,判断折叠屏手机的设备状态是否为折叠态。
其中,第一操作可以包括返回桌面操作,返回桌面操作用于触发折叠屏手机显示桌面,也就是用于触发折叠屏显示桌面壁纸,当然,上述第一操作是还可以包括其它能够触发折叠屏手机显示壁纸的操作,本申请不对其限制。
在本申请实施例中,折叠屏手机在接收到第一操作的情况下,表明需要基于上述surface和壁纸窗口显示第一壁纸。由于壁纸窗口的大小限制了surface的显示内容,而壁纸窗口的大小又与折叠屏手机的当前屏幕的亮屏区域大小有关,即与折叠屏手机的设备状态有关。因此,折叠屏手机可以判断当前设备状态是否为折叠态。在当前设备状态为折叠态的情况下,表明上述第一壁纸的设置是在折叠屏手机处于折叠态时进行的,由于折叠态下的壁纸窗口的大小和surafce的大小不同,因此,折叠屏手机需要利用第一壁纸的偏移量,确定第一壁纸的显示内容,也就是确定窗口所需显示的第一壁纸的部分内容,折叠屏手机可以执行S306。
在当前设备状态不为折叠态的情况下,也即当前设备状态为展开态的情况下,表明上述第一壁纸的设置是在折叠屏手机处于展开态时进行的,由于展开态下的窗口的大小和surafce的大小相同,因此,折叠屏手机可以显示绘制区域上的完整内容,也就是显示完整的第一壁纸,无需利用第一壁纸的偏移量,确定第一壁纸的显示内容,折
叠屏手机可以执行S310。
S307、折叠屏手机从预设数据库中读取上述第一壁纸的偏移量。
S308、折叠屏手机基于第一壁纸的偏移量,在上述窗口显示surface上的第一壁纸的部分内容。
本申请实施例中,手机可以利用第一壁纸的偏移量和当前屏幕的亮屏区域的大小,也就是折叠态下的屏幕的亮屏区域的大小,确定折叠态下的第一壁纸的显示区域的位置(或称为(或称为第一壁纸的目标显示区域的位置)。第一壁纸的显示区域内的内容是折叠屏手机在折叠态下显示的第一壁纸的内容,也就是折叠态下的第一壁纸的显示内容(或称为第一壁纸的目标显示内容)。换句话来说,第一壁纸的偏移量和当前屏幕的亮屏区域的大小用来确定壁纸窗口相当于surface的位置。之后,折叠屏手机可以在壁纸窗口内显示该目标显示内容。由于壁纸窗口的大小小于surface的大小,因此,壁纸窗口不显示第一壁纸上除目标显示内容以外的内容。
举例来说,折叠屏手机的屏幕是左右折叠的,无论是折叠还是展开,折叠屏手机的显示区域的高度是否不会发生变化的,宽度会发生变化。相应的,第一壁纸的偏移量是宽度方向,即x方向上的偏移量。假设第一壁纸的x方向上的偏移量为200像素(px),表示从x方向上的第200个像素的位置为壁纸窗口的左顶点的起始位置。如图10A中(a)所示,绘制区域的宽度是1000px,左顶点的坐标是(0,0),右顶点的坐标是(1000,0)。折叠态下的壁纸窗口的宽度为500px,相应的,第一壁纸的目标显示区域的位置的x坐标可以为200和700,也就是说,第一壁纸上的x坐标为200到700的像素所组成的区域表示折叠态下的第一壁纸的显示区域,折叠屏手机显示该显示区域内的内容(如图10A中(b)所示)。其中,200可以表示目标显示区域的左顶点的坐标,700可以表示目标显示区域的右顶点的坐标。
在一些实施例中,在上述第一壁纸的大小和surface大小相同的情况下,surface上绘制是第一壁纸的全部内容(如上述图10A中(a)所示的surface上绘制的便是第一壁纸的全部内容),那么第一壁纸的x方向上的偏移量表示以该第一壁纸的顶点(如第一壁纸的左顶点)为原点,x方向上的偏移量。例如,当第一壁纸的x方向上的偏移量为200时,表示以第一壁纸的左顶点为原点,x方向上的第200个像素的位置为壁纸窗口的左顶点的起始位置。
在上述第一壁纸的大小大于surface大小的情况下,如当用户自定义壁纸的显示内容时,surface上绘制是第一壁纸的部分内容,那么第一壁纸的x方向上的偏移量表示以surface的顶点(如左顶点)在第一壁纸上的位置为原点,x方向上的偏移量。例如,第一壁纸的宽度是1200,而surface的宽度是1000,因此,surface上只能绘制第一部分的部分内容(如图10B所示)。surface的左顶点在第一壁纸上的位置是(100,0)。当第一壁纸的x方向上的偏移量为200时,表示以(100,0)为原点,x方向上的第200个像素的位置为壁纸窗口的左顶点的起始位置,也就是说壁纸窗口的左顶点的起始位置实际是第一壁纸的第300个像素的位置。
在一些实施例中,折叠屏手机可以直接利用偏移模式,在上述窗口内显示第一壁纸的部分内容。一种示例中,第一壁纸的偏移模式为居中模式,那么将第一壁纸居中显示窗口上。例如,如图11A所示,绘制区域的大小为1000*2000,也就是第一壁纸
的大小为1000*2000。壁纸窗口大小为500*2000。在居中显示第一壁纸时,第一壁纸的目标显示区域(即折叠态下的第一壁纸的显示区域)的位置的x坐标可以为250和750,也就是说,第一壁纸的目标显示区域为第一壁纸上的x坐标为250到750的像素所组成的区域表示折叠态下的第一壁纸的显示区域,目标显示内容为第一壁纸上的x坐标为250至750的像素所组成的内容。
另一种示例中,第一壁纸的偏移模式为居左模式,那么将第一壁纸居左显示窗口上。例如,如图11B所示,绘制区域的大小为1000*2000。壁纸窗口大小为500*2000。在居左显示第一壁纸时,第一壁纸的目标显示区域的位置的x坐标可以为0和500,也就是说,第一壁纸的目标显示内容为第一壁纸上的x坐标为0至500的像素所组成的内容。
另一种示例中,第一壁纸的偏移模式为居右模式,那么将第一壁纸居左显示窗口上。例如,如图11C所示,绘制区域的大小为1000*2000。壁纸窗口大小为500*2000。在居右显示第一壁纸时,第一壁纸的目标显示区域的位置的x坐标可以为500和1000,也就是说,第一壁纸的目标显示内容为第一壁纸上的x坐标为500至1000的像素所组成的内容。
S309、若折叠屏手机由折叠态切换至展开态,折叠屏手机将壁纸窗口的大小调整为展开态下的屏幕的亮屏区域的大小。
本申请实施例中,在用户使用折叠屏手机的过程中,用户可能会展开或折叠折叠屏手机。在显示第一壁纸的部分内容期间,即在显示第一壁纸期间,在折叠屏手机的设备状态由折叠态切换为展开态的情况下,折叠屏手机需要将壁纸窗口的大小调整为展开态下的屏幕的亮屏区域的大小,也即将壁纸窗口的大小与展开态下的折叠屏手机的屏幕的亮屏区域适配。并且,折叠屏手机无需重新分配或设置与该壁纸窗口对应的surface的大小。
举例来说,首先,折叠屏手机处于折叠态下,其显示第一壁纸的部分内容。之后,在显示第一壁纸期间,用户展开折叠屏手机,折叠屏手机的设备状态由折叠态切换为展开态,由于折叠屏手机还在显示第一壁纸,因此,显示第一壁纸所利用的壁纸窗口还未被销毁,该折叠屏手机无需重新创建壁纸窗口,该手机可以直接将壁纸窗口的大小调整为展开态下的屏幕的亮屏区域的大小。
S310、折叠屏手机在调整后的壁纸窗口内显示完整的第一壁纸。
本申请实施例中,由于surface的大小和调整后的壁纸窗口(即展开态下的壁纸窗口)的大小相同,因此,调整后的壁纸窗口可以显示surface上的全部绘制内容,也就是完整显示第一壁纸,并且虽然调整前后的壁纸窗口大小不同,但对应同一个绘制区域,无需再重新分配绘制区域,也无需重新设置绘制区域的大小,因此,折叠屏手机在由折叠态切换为展开态时,也就是显示与展开态的屏幕的亮屏区域适配的第一壁纸时,无需切换显示第一壁纸,而是在原有显示的第一壁纸内容的基础上,将绘制区域上的除目标显示内容以外的其它内容显示出来,不会出现画面突变的问题,即不会出现切换闪烁的问题。
在一些实施例,折叠屏手机由折叠态切换至展开态,可以按照逐渐增加显示第一壁纸的内容的方式动态展示第一壁纸。折叠屏手机可以基于上述偏移量和第一预设时
间,确定显示速度,以供利用该显示速度,逐渐显示第一壁纸的剩余内容,直至显示完整的第一壁纸。该第一预设时间可以表示折叠屏手机由折叠态切换完全展开的状态所需的时间。其中,完全展开的状态表示折叠屏手机的折叠角是180度。
示例性的,该偏移量包括x方向上的偏移量。显示速度可以包括左侧显示速度和右侧显示速度。折叠屏手机可以计算目标显示区域的左顶点的坐标与绘制区域的左顶点的坐标之间的第一差值(即x方向上的偏移量),计算目标显示区域的右顶点的坐标与绘制区域的右顶点的坐标之间的第二差值。之后,手机可以计算第一差值与第一预设时间之间的比值,得到左侧显示速度,计算第二差值与第一预设时间之间的比值,得到右侧显示速度。之后,折叠屏手机可以基于左侧显示速度慢慢拉大第一壁纸的显示区域的左侧部分,即增加显示左侧内容,基于右侧显示速度慢慢拉大第一壁纸的显示区域的右侧部分,即增加显示右侧内容。例如,折叠态下的第一壁纸的显示区域是如上述图11A所示的x坐标为250到750的像素所组成的区域,左侧显示速度是50像素/秒,右侧显示速度也是50像素/秒,则在折叠屏手机由折叠态切换至展开态一秒后,第一壁纸的显示区域变成x坐标为300到800的像素所组成的区域,实现壁纸的动态展示,增强视觉效果,提高趣味性。
举例来说,首先,折叠屏手机处于折叠态,其显示如图12中(a)所示的壁纸。之后,折叠屏手机的设备状态发生变化,由折叠态切换为展开态,其直接显示如图12中(b)所示的壁纸。相较于图12中(a)所示的壁纸,图12中(b)所示的壁纸包含的内容较多。之后,随着折叠屏手机的展开程度变大,折叠屏手机显示的锁屏壁纸的内容逐渐增多,如图12中(c)所示的壁纸内容相较于如图12中(b)所示的壁纸的内容增多,直至显示如图12中(d)所示的完整的壁纸。简单来说,图12中的(a)-(d)所示的过程可以理解为,将壁纸窗口慢慢拉大,以将绘制区域上的其它内容显示出来的过程,也就是折叠屏手机显示的壁纸内容慢慢变多的过程。
需要说明的是,上述图12中(a)-(d)所示的壁纸可以是桌面壁纸,为了方便展示壁纸的显示效果,并未在该壁纸上显示应用的图标。在实际应用中,该桌面壁纸会包括应用的图标。另外,上述图12中(a)-(d)所呈现的壁纸动态效果仅是一种示例,在折叠屏手机在展开过程中的壁纸呈现的效果也可以是其它效果,本申请不对其限制。
在另一些实施例中,折叠屏手机由折叠态切换至展开态,可以直接显示完整的第一壁纸,实现第一壁纸的快速完整显示。
在一些实施例中,在上述第一壁纸为动态壁纸的情况下,在显示第一壁纸期间,如果折叠屏手机的设备状态发生变化,在改变第一壁纸的显示内容的情况下,会播放第一壁纸对应的动画,实现第一壁纸的动态显示效果。例如,如上述图12中(a)至图12中(d),在显示花朵壁纸期间,折叠屏手机展开,在改变折叠屏手机显示的花朵壁纸的内容的过程中,也在动态展示花朵壁纸对应的动画,即花朵开放的过程。
需要说明的是,折叠屏手机在显示上述第一壁纸时,如果折叠屏手机的设备状态并未发生变化,折叠屏手机可以不播放该第一壁纸对应的动画,此时该第一壁纸相当于静态壁纸,以减少功耗。例如,折叠屏手机在展开态下显示第一壁纸时,不播放该动态壁纸对应的动画,而折叠屏手机在由展开态切换至折叠态的过程中,播放该第一
壁纸对应的动画。在折叠屏手机的折叠角达到预设角度值(如0)的情况下,该折叠屏手机停止播放该动画。当然,折叠屏手机在显示第一壁纸时,无论该折叠屏手机的设备状态是否发生变化,该折叠屏手机均可以播放该第一壁纸对应的动画。
在一些实施例中,在显示第一壁纸的部分内容期间,如果折叠屏手机的设备状态并未发生变化,也就是折叠屏手机的设备状态并未由折叠态切换为展开态,折叠屏手机无需执行上述S309及S310。
需要说明的是,上述折叠屏手机在壁纸窗口内显示第一壁纸实际是通过折叠屏手机的显示屏显示,用户能够看到壁纸窗口内显示的第一壁纸。上述所描述的在绘制区域上绘制第一壁纸以及在壁纸窗口上显示第一壁纸的顺序仅为一种示例,折叠屏手机也可以直接在绘制区域和壁纸窗口上绘制完成第一壁纸后,在接收到第一操作后,调用该壁纸窗口,以显示绘制区域上的第一壁纸。
在一些实施例中,在折叠屏手机处于折叠态时,当折叠屏手机需要显示上述第一壁纸时,折叠屏手机需要从预设数据库中读取第一壁纸的偏移量。当处于折叠态的折叠屏手机多次显示第一壁纸时,折叠屏手机每次需要显示第一壁纸时,可以从预设数据库读取第一壁纸的偏移量。例如,处于折叠态的折叠屏手机接收到返回桌面操作时,从预设数据库中读取第一壁纸的偏移量,以供利用第一壁纸的偏移量显示桌面壁纸。当用户点击该桌面壁纸上的应用1的图标时,折叠屏手机启动应用1。然后,当用户由应用1返回至桌面时,也就是用户输入返回桌面操作时,处于折叠态的折叠屏手机再次接收到返回桌面操作,响应于该返回桌面操作,折叠屏手机再次从预设数据库中读取第一壁纸的偏移量,以供利用第一壁纸的偏移量显示桌面壁纸。或者,折叠屏手机仅需读取一次第一壁纸的偏移量,当设备状态切换至展开态后又切换至折叠态时,继续读取一次第一壁纸的偏移量。
S311、折叠屏手机在壁纸窗口上显示suface上的完整的第一壁纸。
本申请实施例中,在当前设备状态不为折叠态的情况下,也即当前设备状态为展开态的情况下,由于展开态下的壁纸窗口的大小和surafce的大小相同,因此,折叠屏手机可以显示绘制区域上的完整内容,也就是显示完整的第一壁纸(或描述为在第一界面全屏显示第一壁纸),无需利用第一壁纸的偏移量确定壁纸窗口显示的内容,也就无需从上述预设数据库中读取第一壁纸的偏移量。
S312、若折叠屏手机由展开态切换至折叠态,折叠屏手机将壁纸窗口的大小调整为折叠态下的屏幕的亮屏区域的大小,折叠屏手机从预设数据库中读取第一壁纸的偏移量。
S313、折叠屏手机基于第一壁纸的偏移量,在调整后的窗口内显示第一壁纸的部分内容。
在本申请实施例中,在显示第一壁纸期间,如果折叠屏手机的设备状态变化,也就是在折叠屏手机的设备状态由折叠态切换为展开态的情况下,折叠屏手机需要将壁纸窗口的大小调整为折叠态下的屏幕的亮屏区域的大小,也即将壁纸窗口的大小和折叠态下的折叠屏手机的屏幕的亮屏区域适配。并且,折叠屏手机无需重新分配或设置与该壁纸窗口对应的surface的大小。
之后,由于surface的大小小于调整后的壁纸窗口的大小,因此,调整后的壁纸窗
口仅显示surface上的部分绘制内容,也就是显示第一壁纸的部分内容(该第一壁纸的部分内容也可以称为第二壁纸,即在第二界面上显示第二壁纸)。并且虽然调整前后的壁纸窗口大小不同,但由于是对应同一个surface,因此,折叠屏手机在由折叠态切换为展开态时,也就是显示与折叠态下的屏幕的亮屏区域适配的第一壁纸的过程中,无需切换显示第一壁纸,而是在原有显示第一壁纸的基础上,减少第一壁纸的显示内容,不会出现画面突变的问题。
举例来说,在显示第一壁纸期间,用户折叠折叠屏手机,折叠屏手机的设备状态由展开态切换为折叠态。由于折叠屏手机在显示第一壁纸,因此,显示第一壁纸所利用的壁纸窗口还未被销毁,该折叠屏手机无需重新创建壁纸窗口,该手机可以直接将壁纸窗口的大小调整为折叠态下的屏幕的亮屏区域大小。以及由于调整后的壁纸窗口的尺寸小于绘制区域的大小,其无法完整显示第一壁纸,因此,该折叠屏手机可以从预设数据库中的读取第一壁纸的偏移量,以供利用第一壁纸的偏移量确定得到大小屏切换时,壁纸窗口移动的坐标点,即确定调整后的壁纸窗口所显示的内容,以在调整后的壁纸窗口内显示第一壁纸的部分内容。
在一些实施例,与上述介绍的折叠屏手机由折叠态切换至展开态时的壁纸展示过程类似,折叠屏手机由展开态切换至折叠态,可以按照逐渐减少显示第一壁纸的内容的方式动态展示第一壁纸。折叠屏手机可以基于上述偏移量和第二预设时间,确定壁纸窗口的缩小速度,以供利用该缩小速度,逐渐减少显示的第一壁纸的内容,直至显示上述折叠态下的第一壁纸的显示区域内的内容,也就是第一壁纸的目标显示区域内的内容。该第二预设时间可以表示折叠屏手机由展开态切换完全折叠的状态所需的时间。这个过程简单可以理解为,将壁纸窗口慢慢缩小,以减少显示的绘制区域上的内容。其中,完全展开的状态表示折叠屏手机的折叠角是0度。其中,缩小速度的计算过程与上述显示速度的计算过程类似,此处不再赘述。
或者,折叠屏手机由展开态切换至折叠态,可以直接显示第一壁纸的目标显示区域内的内容。
在一些实施例中,在显示第一壁纸的部分内容期间,如果折叠屏手机的设备状态并未发生变化,也就是折叠屏手机的设备状态并未由折叠态切换为展开态,折叠屏手机无需执行上述S312及S313。
本申请实施例中,折叠屏手机在获取到用户选择的目标主题的情况下,基于折叠屏手机当前所处的设备状态,创建与当前屏幕的亮屏区域的大小适配的壁纸窗口以及将壁纸窗口对应的surface的大小设置为展开态下的屏幕的亮屏区域的大小,也就是说,surface的大小于折叠屏手机当前所处的设备状态无关。折叠屏手机可以在该surface上绘制第一壁纸。在需要显示第一壁纸的情况下,利用壁纸窗口显示surface上的部分或全部内容,实现第一壁纸的显示。之后,在显示第一壁纸期间,如果设备状态发生变化,可以直接调整壁纸窗口的大小,以供利用调整后的壁纸窗口显示原有的surface上的内容,使得显示内容的大小于变化后的设备状态的屏幕的亮屏区域的大小适配,而无需设置一个与变化后的设备状态下的屏幕的亮屏区域的大小适配的surface以供利用新的surface绘制第一壁纸,从而避免由于设备状态发生改变后需要重新设置一个surface,并在新的surface上绘制第一壁纸导致在一定时间内,壁纸窗口是没有内容可
以显示的,直至在新的surface上绘制第一壁纸完成后,壁纸窗口才能继续显示,进而能够避免画面突变的问题。
在一些实施例中,在用户设置了主题后,折叠屏手机可以创建壁纸窗口,设置绘制区域的大小,在绘制区域上绘制第一壁纸,从而实现第一壁纸显示的准备工作,以使在需要显示第一壁纸时能够快速显示。之后,折叠屏手机在接收到用户输入的第一操作后,表明折叠屏手机需要显示主题对应的第一壁纸,折叠屏手机可以响应于该第一操作,在折叠屏手机的设备状态为折叠态的情况下,获取第一壁纸的配置数据,该配置数据可以包括第一壁纸的偏移信息(如第一壁纸的偏移量或者第一壁纸的偏移模式)。之后,该折叠屏手机可以基于第一壁纸的偏移信息,显示第一壁纸的部分内容,也就是利用壁纸窗口显示绘制区域上的第一壁纸的部分内容。在折叠屏手机的设备状态为展开态的情况下,折叠屏手机可以直接显示第一壁纸的全部内容。
在一些实施例中,下面将以上述第一壁纸为动态壁纸为例,结合上述图4所示的结构,介绍动态壁纸的设置过程、动态壁纸的应用过程。其中,动态壁纸的设置过程可以包括如图13所示的S1-S8,动态壁纸的应用过程可以包括如图13所示的S9-S27。
S1、主题应用接收目标主题的设置操作。其中,设置操作用于触发将折叠屏手机的主题设置为目标主题。
S2、主题应用响应于上述设置操作,向壁纸框架发送第一消息。其中,第一消息用于指示折叠屏手机的主题发生变化。
示例性的,第一消息可以包括特定标识,该特定标识表示折叠屏手机应用的主题发生变化。
S3、壁纸框架响应于该第一消息,读取目标主题对应的主题包。
示例性的,目标主题对应的主题包可以包括与该目标主题对应的第一壁纸的配置文件。该配置文件可以包括第一壁纸的偏移量(或可以认为该主题的偏移量)、弹性动画刚度配置信息、深度模式配置信息、模糊配置信息等配置数据。
S4、壁纸框架解析目标主题对应的主题包,获得第一壁纸的偏移量。
本申请实施例中,壁纸框架能够直接获知用户所设置的主题(即目标主题)。壁纸框架在接收到第一消息后,可以直接读取第一壁纸的主题包,解析该主题包,以得到第一壁纸的配置文件,从而从该配置文件中获取第一壁纸的偏移量。
另外,壁纸框架在解析主题包过程中,也会得到展示第一壁纸所需要使用的壁纸服务。主题包包括壁纸服务对应的路径,壁纸框架可以基于该路径,拉起第一壁纸对应的壁纸服务。这里第一壁纸对应的壁纸服务相当于壁纸窗口,此时壁纸服务仅是被拉起,需要为壁纸服务填充数据,以使壁纸服务与当前屏幕的亮屏区域适配,显示壁纸内容等。
S5、壁纸框架将第一壁纸的偏移量写入至预设数据库。
示例性的,壁纸框架可以先删除预设数据库中的已有的壁纸(也就是主题)的偏移量。之后,该壁纸框架可以将第一壁纸的偏移量写入至预设数据库中,使得预设数据库可以仅保存折叠屏手机当前设置的主题的偏移量,减少资源的占用。在一些实施例中,壁纸框架可以调用如上所述的写入接口,将第一壁纸的偏移量写入至预设数据库。
另外,第一壁纸的配置文件中的除偏移量以外的其它配置信息可以不写入至预设数据库。当其它模块需要利用该其它配置信息对第一壁纸进行处理时,壁纸框架可以直接进行读取,并向其它模块进行传递。
S6、壁纸框架启动壁纸应用。
示例性的,壁纸框架可以创建一个壁纸应用的实例,或描述为创建壁纸应用进程,以实现壁纸应用的拉起。
S7、在壁纸应用启动后,壁纸应用创建大小为当前屏幕的亮屏区域的大小的壁纸窗口,将surface的大小设置为展开态下的屏幕的亮屏区域的大小。
在一些实施例中,壁纸应用为第一壁纸对应的壁纸服务填充数据的过程可以称为创建壁纸窗口,例如,壁纸应用将当前屏幕的亮屏区域的高度和宽度赋值给壁纸服务中的对应变量,以得到与当前屏幕的亮屏区域的尺寸相同的壁纸窗口。
S8、壁纸应用在surface上绘制第一壁纸。
上面介绍了目标主题对应的第一壁纸的设置过程,下面继续介绍显示第一壁纸的过程。
S9、壁纸应用响应于返回桌面操作,向壁纸窗口发送当前设备状态。
示例性的,壁纸应用向第一壁纸对应的壁纸服务发送当前设备状态。当前设备状态可以通过状态标识表示。例如,折叠态对应的状态标识为0,展开态对应的状态标识为1。
在一些实施例中,壁纸应用也可以在创建壁纸窗口时,直接将当前设备状态填充至壁纸服务中,以使壁纸服务能够获得当前设备状态,或者壁纸服务能够直接基于当前屏幕的亮屏区域的大小确定当前设备状态。
S10、在当前设备状态为折叠态的情况下,壁纸窗口从预设数据库读取第一壁纸的偏移量。
S11、壁纸窗口基于第一壁纸的偏移量和壁纸窗口的大小,确定surface内的第一壁纸上的目标显示区域的位置。
S12、壁纸窗口基于目标显示区域的位置,向显示屏发送目标显示区域内的图像内容。
示例性的,上述第一壁纸上的目标显示区域表示折叠态下的第一壁纸的显示区域;目标显示区域内的图像内容表示上述实施例所述的目标显示内容,也就是在折叠态下,折叠屏手机所显示的壁纸内容。
S13、显示屏显示目标显示区域内的图像内容。
S14、折叠角检测传感器检测到折叠角大于第一预设角度阈值,向壁纸应用和壁纸窗口发送第二消息。
示例性的,第二消息可以包括折叠屏手机的当前折叠角或者设备状态。
S15、壁纸应用响应于第二消息,在surface上加载第一壁纸对应的动画帧。
本申请实施例中,在显示目标显示内容期间,在折叠角大于第一预设角度阈值的情况下,表明折叠屏手机的设备状态由折叠态切换为展开态,可以动态播放第一壁纸,因此,壁纸应用在接收到第二消息后,可以在surface上加载第一壁纸对应的动画帧序列,实现动态展示的效果。
S16、响应于上述第二消息,壁纸窗口将壁纸窗口的大小调整至展开态下的屏幕的亮屏区域的大小,获得surface内的第一壁纸对应的动画帧。
S17、壁纸窗口向显示屏发送上述第一壁纸对应的动画帧。
S18、显示屏显示第一壁纸对应的动画帧。
示例性的,壁纸窗口向显示屏发送上述第一壁纸对应的动画帧所对应的全部图像内容,以供显示屏显示。
本申请实施例中,在折叠角大于第一预设角度阈值的情况下,表明折叠屏手机的设备状态由折叠态切换为展开态,壁纸窗口的尺寸需要与展开态下的屏幕的亮屏区域的尺寸适配,因此,该壁纸窗口可以调整壁纸窗口的大小,调整后的壁纸窗口大小和surface的大小一致,因此,可以利用屏幕显示surface上的完整内容,实现在大小屏切换时,壁纸的大小屏的顺滑切换显示,解决了外折屏手机在进行大小屏切换时,两种尺寸的壁纸衔接显示的问题。并且在进行壁纸的大小屏切换显示时,无需改变surface的尺寸,只调整壁纸窗口的大小,避免造成画面突变。
上面S9-S18介绍了折叠屏手机在折叠态显示第一壁纸以及由折叠态切换至展开态后,显示第一壁纸的过程。下面将继续介绍另一种显示情况,手机在展开态显示第一壁纸以及由展开态切换至折叠态后,显示第一壁纸的过程。其中,S19-S20表示折叠屏手机在展开态下显示第一壁纸的过程。S21-S27表示折叠屏手机由展开态切换至折叠态后,显示第一壁纸的过程。
S19、在当前设备状态为展开态的情况下,壁纸窗口向显示屏发送第一壁纸的全部内容。
S20、显示屏显示第一壁纸的全部内容。
S21、折叠角检测传感器检测到折叠角小于第一预设角度阈值,向壁纸应用和壁纸窗口发送第三消息。
示例性的,第三消息可以包括折叠屏手机的当前折叠角或者设备状态。
S22、壁纸应用响应于第三消息,在surface上加载第一壁纸对应的动画帧。
S23、响应于上述第三消息,壁纸窗口从预设数据库读取第一壁纸的偏移量。
S24、壁纸窗口将壁纸窗口的大小调整至折叠态下的屏幕的亮屏区域的大小。
S25、壁纸窗口基于第一壁纸的偏移量和壁纸窗口的大小,确定surface内动画帧的目标显示区域的位置。
其中,动画帧的目标显示区域的表示折叠态下的动画帧的显示区域。
S26、壁纸窗口基于动画帧的目标显示区域的位置,向显示屏发送目标显示区域内的图像内容。
S27、显示屏显示上述目标显示区域内的图像内容。
其中,上述动画帧的目标显示区域内的图像内容表示在显示主题对应的第一壁纸期间,由展开态切换至折叠态后的折叠屏手机所显示的壁纸内容。
在一些实施例中,为了实现壁纸的及时适配显示,在显示完整的第一壁纸期间,在折叠角小于第二角度阈值的情况下,该第二角度阈值大于第一预设角度阈值,表明折叠屏手机处于预折叠态,即将要切换为折叠态,也即表明将要显示与折叠态下的屏幕的亮屏区域的尺寸匹配的壁纸,折叠角检测传感器可以向壁纸窗口发送第四消息,
响应于该第四消息,壁纸窗口可以从预设数据库读取第一壁纸的偏移量。之后,用户继续折叠折叠屏手机,在折叠角小于第一预设阈值的情况下,折叠角检测传感器向壁纸应用和壁纸窗口发送第三消息。该壁纸窗口响应于该第三消息可以无需再重复读取第一壁纸的偏移量,实现第一壁纸偏移量的预先读取。
应理解,上述图13介绍的由折叠态切换至展开态时,或者由展开态切换至折叠态时,折叠屏手机显示动态壁纸(即动画)的过程仅是一种壁纸显示的示例,本申请不限制壁纸显示的方式。
在一些实施例中,本申请提供一种计算机可读存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如上所述的壁纸显示方法。
在一些实施例中,本申请提供一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如上所述的壁纸显示方法。
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (12)
- 一种壁纸显示方法,其特征在于,应用于折叠屏设备,所述壁纸显示方法包括:处于展开态的所述折叠屏设备显示第一界面,所述第一界面全屏显示第一壁纸;所述第一壁纸存在对应的偏移量;所述第一壁纸的偏移量表示折叠态下的第一壁纸的显示区域相对于展开态下的第一壁纸的显示区域的偏移值;所述折叠态下的第一壁纸的显示区域的大小与所述折叠态下的屏幕的亮屏区域的大小相同,所述展开态下的第一壁纸的显示区域的大小与所述展开态下的屏幕的亮屏区域的大小相同;响应于对所述折叠屏设备的折叠操作,所述折叠屏设备由展开态切换至折叠态,处于折叠态的所述折叠屏设备显示第二界面,所述第二界面显示第二壁纸,所述第二壁纸是第一壁纸的部分内容;所述第二界面显示的第二壁纸相对于所述第一界面显示的第一壁纸在目标方向上存在与所述偏移量对应的偏移。
- 根据权利要求1所述的方法,其特征在于,在所述折叠屏设备由展开态切换至折叠态之后,所述方法还包括:响应于对所述折叠屏设备的展开操作,所述折叠屏设备由折叠态切换至展开态,所述折叠屏设备显示第三界面,所述第三界面全屏显示所述第一壁纸。
- 根据权利要求1或2所述的方法,其特征在于,在所述显示第一界面之前,所述方法还包括:响应于第二操作,所述折叠屏设备创建大小为所述折叠态下的屏幕的亮屏区域的大小的壁纸窗口;所述第二操作用于触发将所述折叠屏设备的主题设置为目标主题,所述第一壁纸是所述目标主题对应的壁纸;所述折叠屏设备设置所述壁纸窗口对应的绘制区域surface的大小,所述surface的大小为所述展开态下的屏幕的亮屏区域的大小;所述surface用于绘制所述第一壁纸的完整内容;其中,所述第二壁纸是所述surface内的所述第一壁纸的部分内容。
- 根据权利要求3所述的方法,其特征在于,所述折叠屏设备设置所述壁纸窗口对应的绘制区域surface的大小,包括:在壁纸应用具备设置权限的情况下,所述折叠屏设备通过所述壁纸应用,设置所述surface的大小。
- 根据权利要求4所述的方法,其特征在于,在预设白名单包括所述壁纸应用的标识的情况下,所述壁纸应用具备所述设置权限。
- 根据权利要求3至5中任一项所述的方法,其特征在于,所述方法还包括:所述折叠屏设备将所述目标主题对应的主题包中的所述第一壁纸的偏移量写入至预设数据库;所述在所述处于折叠态的所述折叠屏设备显示第二界面之前,所述方法还包括:所述折叠屏设备从所述预设数据库中读取所述第一壁纸的偏移量。
- 根据权利要求6所述的方法,其特征在于,所述折叠屏设备将所述目标主题对应的主题包中的所述第一壁纸的偏移量写入至预设数据库,包括:在所述预设数据库中不存在壁纸的偏移量的情况下,所述折叠屏设备将所述第一壁纸的偏移量写入至所述预设数据库;在所述预设数据库中存在壁纸的偏移量的情况下,所述折叠屏设备删除所述预设数据库已存在的壁纸的偏移量;所述折叠屏设备将所述第一壁纸的偏移量写入至所述预设数据库。
- 根据权利要求1至7中任一项所述的方法,其特征在于,在所述折叠屏设备是左右折叠的情况下,所述偏移量是x方向上的偏移量,所述目标方向是x方向;在所述折叠屏设备是上下折叠的情况下,所述偏移量是y方向上的偏移量,所述目标方向是y方向。
- 根据权利要求1至8中任一项所述的方法,其特征在于,所述方法还包括:所述折叠屏设备基于所述偏移量和所述折叠态下的屏幕的亮屏区域的大小,确定所述折叠态下的第一壁纸的显示区域的位置。
- 根据权利要求1至7中任一项所述的方法,其特征在于,所述第一壁纸存在对应的偏移模式;在所述折叠屏设备是左右折叠的情况下,所述偏移模式包括居中模式、居左模式和居右模式中的一个或多个;在所述折叠屏设备是上下折叠的情况下,所述偏移模式包括居中模式、居上模式和居下模式中的一个或多个。
- 一种电子设备,其特征在于,所述电子设备包括显示屏、存储器和一个或多个处理器;所述显示屏、所述存储器和所述处理器耦合;所述显示屏用于显示所述处理器生成的图像,所述显示屏包括折叠屏,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述处理器执行所述计算机指令时,使得所述电子设备执行如权利要求1至10中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至10中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP24829913.3A EP4654567A4 (en) | 2023-06-30 | 2024-02-29 | WALLPAPER DISPLAY METHOD AND ELECTRONIC DEVICE |
| US19/314,290 US20250383895A1 (en) | 2023-06-30 | 2025-08-29 | Wallpaper Display Method and Electronic Device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310804802.7 | 2023-06-30 | ||
| CN202310804802.7A CN119232840A (zh) | 2023-06-30 | 2023-06-30 | 一种壁纸显示方法及电子设备 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/314,290 Continuation US20250383895A1 (en) | 2023-06-30 | 2025-08-29 | Wallpaper Display Method and Electronic Device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025001257A1 true WO2025001257A1 (zh) | 2025-01-02 |
Family
ID=93937066
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/079455 Ceased WO2025001257A1 (zh) | 2023-06-30 | 2024-02-29 | 一种壁纸显示方法及电子设备 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20250383895A1 (zh) |
| EP (1) | EP4654567A4 (zh) |
| CN (1) | CN119232840A (zh) |
| WO (1) | WO2025001257A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119668480B (zh) * | 2025-02-11 | 2025-07-01 | 武汉星纪魅族科技有限公司 | 壁纸处理方法、电子设备和存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112445276A (zh) * | 2019-08-30 | 2021-03-05 | 华为技术有限公司 | 一种折叠屏显示应用方法及电子设备 |
| US20220057919A1 (en) * | 2020-08-19 | 2022-02-24 | Lg Electronics Inc. | Mobile terminal and control method therefor |
| CN114911551A (zh) * | 2021-02-08 | 2022-08-16 | 花瓣云科技有限公司 | 显示方法及电子设备 |
| CN115543159A (zh) * | 2022-01-05 | 2022-12-30 | 荣耀终端有限公司 | 壁纸显示方法、装置、设备、存储介质及程序产品 |
| CN115756219A (zh) * | 2021-09-03 | 2023-03-07 | Oppo广东移动通信有限公司 | 内容显示方法、装置、终端及存储介质 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120209923A1 (en) * | 2011-02-12 | 2012-08-16 | Three Laws Mobility, Inc. | Systems and methods for regulating access to resources at application run time |
| KR102471174B1 (ko) * | 2015-10-06 | 2022-11-28 | 삼성전자주식회사 | 테마 적용 방법 및 이를 수행하는 전자 장치 |
| KR102672510B1 (ko) * | 2019-10-04 | 2024-06-07 | 삼성전자 주식회사 | 스크린들 간 수정 사항을 동기화하는 전자 장치 및 전자 장치의 동작 방법 |
-
2023
- 2023-06-30 CN CN202310804802.7A patent/CN119232840A/zh active Pending
-
2024
- 2024-02-29 WO PCT/CN2024/079455 patent/WO2025001257A1/zh not_active Ceased
- 2024-02-29 EP EP24829913.3A patent/EP4654567A4/en active Pending
-
2025
- 2025-08-29 US US19/314,290 patent/US20250383895A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112445276A (zh) * | 2019-08-30 | 2021-03-05 | 华为技术有限公司 | 一种折叠屏显示应用方法及电子设备 |
| US20220057919A1 (en) * | 2020-08-19 | 2022-02-24 | Lg Electronics Inc. | Mobile terminal and control method therefor |
| CN114911551A (zh) * | 2021-02-08 | 2022-08-16 | 花瓣云科技有限公司 | 显示方法及电子设备 |
| CN115756219A (zh) * | 2021-09-03 | 2023-03-07 | Oppo广东移动通信有限公司 | 内容显示方法、装置、终端及存储介质 |
| CN115543159A (zh) * | 2022-01-05 | 2022-12-30 | 荣耀终端有限公司 | 壁纸显示方法、装置、设备、存储介质及程序产品 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4654567A1 * |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4654567A1 (en) | 2025-11-26 |
| US20250383895A1 (en) | 2025-12-18 |
| EP4654567A4 (en) | 2025-12-31 |
| CN119232840A (zh) | 2024-12-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113553014A (zh) | 多窗口投屏场景下的应用界面显示方法及电子设备 | |
| US12608072B2 (en) | Power consumption control method and electronic device | |
| WO2023005751A1 (zh) | 渲染方法及电子设备 | |
| CN116700655B (zh) | 一种界面显示方法及电子设备 | |
| WO2023109764A1 (zh) | 一种壁纸显示方法及电子设备 | |
| CN117724574B (zh) | 一种显示方法、电子设备和计算机可读存储介质 | |
| EP4481556A1 (en) | Display method and electronic device | |
| WO2025209372A1 (zh) | 壁纸显示方法和电子设备 | |
| WO2023030276A1 (zh) | 一种显示方法、装置、设备及存储介质 | |
| US20250383895A1 (en) | Wallpaper Display Method and Electronic Device | |
| CN116672707B (zh) | 生成游戏预测帧的方法和电子设备 | |
| WO2024082989A1 (zh) | 全屏显示方法、电子设备及计算机可读存储介质 | |
| CN117130516B (zh) | 一种显示方法及电子设备 | |
| WO2024193666A1 (zh) | 一种电子设备的显示方法、电子设备及存储介质 | |
| WO2024193215A1 (zh) | 一种自适应应用页面显示方法及设备 | |
| WO2023207694A1 (zh) | 一种显示方法、装置及存储介质 | |
| CN116719587A (zh) | 屏幕显示方法、电子设备及计算机可读存储介质 | |
| CN119232839A (zh) | 一种壁纸显示方法及电子设备 | |
| US20250264976A1 (en) | Display method, display apparatus, and electronic device | |
| CN119248387B (zh) | 界面显示方法、电子设备和存储介质 | |
| CN116688494B (zh) | 生成游戏预测帧的方法和电子设备 | |
| EP4697152A1 (en) | Window display method and electronic device | |
| WO2025107914A1 (zh) | 一种显示方法及电子设备 | |
| WO2025245817A1 (zh) | 界面显示方法、电子设备及存储介质 | |
| CN118276716A (zh) | 窗口管理的方法和电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24829913 Country of ref document: EP Kind code of ref document: A1 |
|
| WWP | Wipo information: published in national office |
Ref document number: 2024829913 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |