A desktop layout switching method and an electronic device
By providing a desktop layout switching method in an electronic device, displaying a preview interface and generating backup data, the problem that desktop layout switching in the prior art cannot meet user personalized needs is solved, and a better user experience and layout consistency are achieved.
Patent Information
- Application Number
- CN202310843502.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2043-07-10
AI Technical Summary
In the prior art, the desktop layout switching method of the electronic device can only realize basic functions and cannot meet the personalized needs of users. Moreover, the user cannot intuitively see the layout effect after switching, resulting in a poor user experience.
A desktop layout switching method is provided. By displaying a preview interface before switching, the user is allowed to select and switch to a previously used desktop layout. During the switching process, desktop data is generated or adjusted to maintain user habits and layout consistency, including generating backup data when data acquisition fails to ensure a neat desktop after switching.
The user experience is improved by displaying a preview interface before switching, allowing users to intuitively select the layout, and maintaining the consistency and neatness of the layout after switching, meeting the user's personalized needs.
Smart Images

Figure CN117724782B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of terminals, and in particular to a desktop layout switching method and an electronic device. BACKGROUND
[0002] The desktop layout of an electronic device refers to the number of rows and columns of standard icons that can be arranged in a desktop, and is usually expressed in the form of columns x rows. For example, a desktop layout of 4x6 means that the number of columns of standard icons that can be arranged in a desktop is 4 and the number of rows is 6.
[0003] In actual applications, an electronic device often needs to switch between different desktop layouts. For example, the electronic device may switch the desktop layout from 4x6 to 5x6 in response to a user operation. Each time the switching is performed, the electronic device will arrange the icons in the 4x6 desktop to the 5x6 desktop according to the native logic of the Android system.
[0004] However, the desktop layout switching method can only achieve the basic desktop layout switching function and cannot meet the personalized needs of users. SUMMARY
[0005] Embodiments of the present application provide a desktop layout switching method and an electronic device, which provide a desktop restoration function for a user under certain conditions when the user switches to a previously used desktop layout, so that the desktop is more in line with the user's usage habits. In addition, the desktop layout switching method can enable the user to intuitively see the display effect of each desktop layout when the user performs desktop layout switching, thereby improving the user's experience.
[0006] To achieve the above object, embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a desktop layout switching method is provided, applied to an electronic device, and the method includes: displaying a preview interface of a current desktop and a plurality of layout controls. Each layout control is used to indicate a different desktop layout. The plurality of layout controls includes a first control corresponding to a first desktop layout. The first desktop layout is different from the desktop layout of the current desktop. In response to an operation on the first control, the desktop data of the current desktop and the desktop data of an initial desktop of the current desktop are obtained. The initial desktop is the desktop of the electronic device when the electronic device switches to the desktop layout of the current desktop. The desktop data is used to indicate the page distribution and the icon distribution in the desktop. When the desktop data of the current desktop is the same as the desktop data of the initial desktop, the desktop data of a first desktop is obtained. The first desktop is the desktop of the electronic device when the electronic device is in the first desktop layout before switching to the current desktop. The preview interface of the first desktop is displayed according to the desktop data of the first desktop.
[0008] Based on the scheme, when the user switches to the first desktop layout used before without changing the current desktop, as long as the first desktop corresponding to the first desktop layout is stored in the electronic device, the preview interface of the first desktop can be displayed in the display screen. In this way, the switched desktop can be more in line with the user's use habit. In addition, the desktop layout switching method can also enable the user to intuitively see the display effect of each desktop layout when switching the desktop layout, thereby improving the user experience
[0009] In a possible design, the display screen of the electronic device further includes a confirmation control. After displaying the preview interface of the first desktop according to the desktop data of the first desktop, the method further includes: in response to an operation on the confirmation control, displaying the first desktop in the display screen of the electronic device. Based on this scheme, the desktop can be switched to the desired desktop layout through the confirmation control.
[0010] In a possible design, the method further includes: when the desktop data of the initial desktop fails to be acquired, or when the desktop data of the current desktop is different from the desktop data of the initial desktop, or when the desktop data of the first desktop fails to be acquired, generating the desktop data of the second desktop according to a preset rule. The desktop layout of the second desktop is the first desktop layout. The preview interface of the second desktop is displayed according to the desktop data of the second desktop. Based on this scheme, the switched desktop can avoid missing the icon or page added by the user, which is beneficial to improve the user experience.
[0011] In a possible design, displaying the preview interface of the second desktop according to the desktop data of the second desktop includes: performing first processing on the desktop data of the second desktop. The first processing is used to make there be no gap between the icons in each page of the second desktop. The preview interface of the second desktop is displayed according to the processed desktop data of the second desktop. Based on this scheme, the switched desktop can be more tidy, which is beneficial to improve the user experience.
[0012] In a possible design, after the desktop data of the second desktop is generated according to the preset rule when the desktop data of the initial desktop fails to be acquired, the method further includes: storing the desktop data of the second desktop. Based on this scheme, when the desktop in the display screen is switched to the second desktop, the desktop data of the second desktop can be used as the desktop data of the initial desktop when the desktop layout is switched next time, which is convenient for subsequent desktop layout switching.
[0013] In a possible design, when the desktop data of the current desktop is different from the desktop data of the initial desktop, or the desktop data of the first desktop fails to be acquired, the method further includes: storing the desktop data of the current desktop and the desktop data of the second desktop, and deleting the desktop data of the initial desktop. Based on this scheme, the desktop data of the current desktop can be used as backup data when switching to the desktop layout corresponding to the current desktop next time, so that the user habit can be retained when switching to the desktop layout corresponding to the current desktop next time.
[0014] In a possible design, the display screen of the electronic device further displays a cancel control. The method further includes:
[0015] In response to an operation on the cancel control, the current desktop is displayed on the display screen of the electronic device. Based on this scheme, the user can end the desktop layout switching process.
[0016] In a second aspect, a desktop layout switching method is provided, applied to an electronic device. The method includes: displaying a first desktop, and the desktop layout of the first desktop is a first desktop layout. In response to a user operation of switching a desktop layout, a preview interface of the first desktop and a plurality of layout controls are displayed, and each layout control is used to indicate a different desktop layout. The plurality of layout controls include a first control corresponding to a second desktop layout. In response to an operation on the first control, a second desktop is displayed based on a stored layout mode of the second desktop. The desktop layout of the second desktop is a second desktop layout. The layout mode is used to indicate a page distribution and an icon distribution in the desktop. In response to a user editing operation on the second desktop, a third desktop is displayed, the third desktop is different from the second desktop in layout mode, and the desktop layout of the third interface is the same as the second desktop layout. In response to a user operation of switching a desktop layout, a preview interface of the third desktop and a plurality of layout controls are displayed, and the plurality of layout controls include a second control corresponding to a fourth desktop layout. In response to a user operation on the second control, a fourth desktop is displayed based on the third desktop and the fourth desktop layout.
[0017] In a possible design, the second desktop is displayed based on the stored layout mode of the second desktop, including: acquiring a layout mode of the first desktop and a layout mode of an initial desktop of the first desktop. The initial desktop is a desktop of the electronic device when switching to the first desktop layout. When the layout mode of the first desktop is the same as the layout mode of the initial desktop, the layout mode of the second desktop is acquired. The second desktop is displayed according to the layout mode of the second desktop.
[0018] In a possible design, the second desktop is displayed according to the layout mode of the second desktop, including: a preview interface of the second desktop is displayed according to the layout mode of the second desktop. The preview interface of the second desktop includes a confirmation control. In response to an operation on the confirmation control, the second desktop is displayed.
[0019] In a possible design, the displaying the fourth desktop based on the third desktop layout and the fourth desktop layout comprises: generating a layout mode of the fourth desktop according to a preset rule based on the third desktop layout and the fourth desktop layout; and displaying the fourth desktop according to the layout mode of the fourth desktop.
[0020] In a possible design, the displaying the fourth desktop according to the layout mode of the fourth desktop comprises: displaying a preview interface of the fourth desktop according to the layout mode of the fourth desktop; and the preview interface of the fourth desktop comprises a confirmation control; and the fourth desktop is displayed in response to an operation on the confirmation control.
[0021] In a possible design, after the displaying the fourth desktop based on the third desktop layout and the fourth desktop layout, the method further comprises: storing the layout mode of the third desktop and the layout mode of the fourth desktop; and deleting the layout mode of the second desktop.
[0022] In a third aspect, an electronic device is provided, which includes a display screen, one or more processors and one or more memories. The display screen is connected to the one or more processors. The one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the desktop layout switching method according to any one of the first aspect or the second aspect, and the display screen displays the preview interface according to any one of the first aspect or the second aspect.
[0023] In a fourth aspect, a chip system is provided, which includes a processing circuit and an interface. The processing circuit is configured to invoke and run a computer program stored in a storage medium to perform the desktop layout switching method according to any one of the first aspect or the second aspect and possible designs thereof.
[0024] In a fifth aspect, a computer readable storage medium is provided, which includes computer instructions. When the computer instructions are run, the desktop layout switching method according to any one of the first aspect or the second aspect and possible designs thereof is performed.
[0025] In a sixth aspect, a computer program product is provided, which includes instructions. When the computer program product is run on a computer, the computer can perform the desktop layout switching method according to any one of the first aspect or the second aspect and possible designs thereof according to the instructions.
[0026] It should be understood that the technical solutions provided by the second aspect, the third aspect, the fourth aspect, the fifth aspect and the sixth aspect above all have technical features corresponding to the desktop layout switching method provided by the first aspect and possible designs thereof, and thus can achieve similar beneficial effects, which will not be described herein again. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 A desktop schematic diagram of a mobile phone;
[0028] Figure 2 A schematic diagram of a desktop extension interface;
[0029] Figure 3 A schematic diagram of a desktop parameter setting interface;
[0030] Figure 4 A pop-up window schematic diagram of a desktop layout setting;
[0031] Figure 5 A schematic diagram of a switched desktop;
[0032] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present application;
[0033] Figure 7 A schematic diagram of a display screen provided by an embodiment of the present application;
[0034] Figure 8 A flowchart of a desktop layout switching method provided by an embodiment of the present application;
[0035] Figure 9 A preview interface schematic diagram of a first desktop provided by an embodiment of the present application;
[0036] Figure 10 A preview interface schematic diagram of a second desktop provided by an embodiment of the present application;
[0037] Figure 11 A schematic diagram of a first desktop provided by an embodiment of the present application;
[0038] Figure 12 A preview interface schematic diagram of a second desktop provided by an embodiment of the present application;
[0039] Figure 13 An interaction schematic diagram of a desktop layout switching method provided by an embodiment of the present application;
[0040] Figure 14 A schematic diagram of an electronic device provided by an embodiment of the present application;
[0041] Figure 15 A schematic diagram of a chip system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0042] The terms "first", "second", and "third" and the like in the embodiments of the present application are used to distinguish different objects, rather than to limit a particular order. In addition, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design presented as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the words "exemplary" or "for example" is intended to present concepts in a particular manner.
[0043] In order to facilitate understanding of the embodiments of the present application, the application background of the embodiments of the present application is first introduced as follows.
[0044] In electronic devices such as mobile phones and tablets, switching the desktop layout can change the number of standard icons that each row and each column in each page of the desktop can accommodate, thereby changing the number of standard icons that each page of the desktop can accommodate. Therefore, in order to meet the use requirements of users, electronic devices often need to switch between different desktop layouts.
[0045] Among them, the standard icon refers to the icon of an application, and the icon can refer to the icon of an application, the icon of a desktop component corresponding to the application, the icon of a file, the icon of a folder, the icon of a webpage, and the like, which are not specifically limited here. In addition, in the embodiments of the present application, the desktop can include multiple pages, and the multiple pages can be switched with each other to display different or partially different icons.
[0046] Please refer to Figure 1 for a schematic diagram of a desktop of a mobile phone. Among them, Figure 1 The hand in the figure is used to indicate the operation of the user. As Figure 1 shown, the desktop includes a page 101, a page identifier 102, and a bottom display bar 103.
[0047] The page 101 is used to accommodate icons. The layout of the page 101 corresponds to the desktop layout of the current desktop. For example, if the desktop layout of the current desktop is 4x5, as Figure 1 shown, the page 101 can accommodate 4 standard icons per row and 5 standard icons per column.
[0048] The page identifier 102 is used to identify the position of the current page among the pages of the current desktop. Exemplarily, the page identifier can be a black circle and a plurality of circles arranged horizontally. The number of circles is used to identify the number of pages of the current desktop, the order of the circles is used to identify the order of the pages of the current desktop, and the position of the black circle is used to identify the position of the current page among the pages of the current desktop. For example, Figure 1For example, the page identifier in the desktop includes three circles, representing that the current desktop includes three pages. The black circle is located in the second circle from left to right, representing that the current page is the second page from left to right in the current desktop, that is, there is one page on the left and one page on the right of the current page.
[0049] The electronic device displays Figure 1 the desktop as shown. In response to a right swipe operation of the user on the current page, the electronic device can enter the page on the left of the current page. Correspondingly, the position of the black circle in the page identifier 101 is changed to the first circle from left to right. In response to a left swipe operation of the user on the current page, the electronic device can enter the page on the right of the current page. Correspondingly, the position of the black circle in the page identifier 101 is changed to the third circle from left to right.
[0050] It should be understood that the above description of the page identifier is only exemplary. The page identifier can also be displayed in other forms in the embodiments of the present application. For example, the page identifier includes a highlighted area, a plurality of circles arranged horizontally, and a house-shaped pentagon. The total number of the circles and the house-shaped pentagon represents the number of pages in the current desktop. The house-shaped pentagon corresponds to the main page of each page in the current desktop. The position of the highlighted area represents the position of the current page in each page in the current desktop. The present application does not make specific limitations thereto.
[0051] The bottom display bar 103 is used to display application icons. The bottom display bar 103 is not included in the page 101 and has a relatively fixed display form. In other words, unless the user changes the bottom display bar, the number of standard icons that can be accommodated by the bottom display bar 103 can not change, and the icons displayed by the bottom display bar 103 can not change when the desktop layout is switched.
[0052] In the page as shown in Figure 1 , the electronic device can enter the desktop expansion interface as shown in Figure 2 in response to a long press operation on the blank of the page.
[0053] The desktop expansion interface can include a preview interface of the current desktop, a wallpaper control, a card control, a switching effect control, a desktop setting control, and the like. Among them, the preview interface of the current desktop can display a preview of the current page and a part of the preview of the adjacent page. The wallpaper control is used to enter the setting interface of the wallpaper. The card control is used to enter the setting interface of the desktop component. The switching effect control is used to enter the interface for setting the page switching effect. The desktop setting control is used to enter the interface for setting the desktop parameters.
[0054] The electronic device can enter the interface for setting the desktop parameters as shown in Figure 3 in response to a click operation of the user on the desktop control setting control.
[0055] The interface for setting the desktop parameter can include a desktop layout control, a lock layout control, and the like. The lock layout control is used to lock or cancel locking the current desktop layout. When the lock layout control is turned on, it indicates that the current desktop layout is locked, and the user cannot change the desktop layout or move the icons of the pages in the current desktop. When the lock layout control is turned off, it indicates that the user can normally change the desktop layout or move the icons of the pages in the current desktop. The desktop layout control is used to select the desktop layout.
[0056] The electronic device can enter the pop-up window for setting the desktop layout in response to a click operation of the user on the desktop layout control. Figure 4
[0057] As shown in Figure 4 , the pop-up window for setting the desktop layout can include a cancel control and a plurality of desktop layout controls. The desktop layout controls are, for example, a 4x4 control, a 4x5 control, a 5x5 control, a 5x6 control, and the like. The electronic device can switch the current desktop layout to the desktop layout corresponding to the desktop layout control in response to a click operation of the user on the desktop layout control.
[0058] For example, the electronic device can switch the current desktop layout to 5x6 according to the rules for switching the desktop layout preset by the Android system in response to a click operation of the user on the 5x6 control.
[0059] Exemplarily, the switched desktop can be as shown in Figure 5 . As shown in Figure 5 , the electronic device can add a blank column to the right of the current page and add a blank row below the current page, thereby switching the 4x5 desktop layout to the 5x6 desktop layout.
[0060] After the switching is completed, if the user is not satisfied with the switched desktop layout, the electronic device can be controlled to switch the desktop layout from 5x6 to 4x5 according to the rules for switching the desktop layout preset by the Android system through Figures 1-4 similar steps. That is, the desktop of the 4x5 desktop layout is newly generated according to the desktop of the 5x6 desktop layout, and thus can be different from the desktop shown in Figure 1 .
[0061] Based on the above description, it can be seen that the conventional desktop layout switching method can only realize the basic desktop layout switching function, the user can only view the desktop layout after the desktop layout switching is completed, and the method cannot meet more personalized needs of the user.
[0062] To solve this problem, the embodiment of the present application provides a desktop layout switching method, which can provide the user with a desktop restoration function under certain conditions when the user changes the current desktop and switches to a previously used desktop layout, so that the desktop is more in line with the user's use habits. In addition, the desktop layout switching method can enable the user to intuitively see the display effect of each desktop layout when switching the desktop layout, thereby improving the user's use experience.
[0063] The embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the desktop layout switching method and the electronic device provided by the embodiments of the present application can be applied to the electronic device of the user. The electronic device can be a device with a desktop display function. For example, the electronic device can be a mobile phone, a tablet computer, a personal digital assistant (PDA), an augmented reality (AR) \ virtual reality (VR) device, a media player, and the like. The electronic device can also be a smart watch or other wearable electronic device. The embodiments of the present application do not make special restrictions on the specific form of the device.
[0064] As an example, please refer to Figure 6 , which is a schematic diagram of an electronic device 600 provided by the embodiments of the present application. The desktop layout switching method provided by the embodiments of the present application can be applied to the electronic device 600 as shown in Figure 6 .
[0065] As shown in Figure 6 , the electronic device 600 can include a processor 601, a display screen 603, a communication module 602, and the like.
[0066] The processor 601 can include one or more processing units, for example: the processor 601 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video stream codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated into one or more processors 601.
[0067] The controller can be the nerve center and command center of the electronic device 600. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of instruction fetching and instruction execution.
[0068] The processor 601 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 601 is a cache memory. The memory can store instructions or data that the processor 601 has just used or repeatedly used. If the processor 601 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 601, thereby improving the efficiency of the system.
[0069] In some embodiments, the processor 601 can include one or more interfaces. The interface can 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 611, etc.
[0070] The electronic device 600 implements display functions through a GPU, a display screen 603, and an application processor 601, etc. The GPU is a microprocessor for image processing, connected to the display screen 603 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 601 can include one or more GPUs that execute program instructions to generate or change display information.
[0071] The display screen 603 is used to display images, video streams, etc. For example, the electronic device 600 can display various interfaces required to be displayed when performing desktop switching in the desktop layout switching method provided by the embodiments of the present application through the display screen 603.
[0072] The communication module 602 may include antenna 1, antenna 2, mobile communication module 602A, and / or wireless communication module 602B. For example, the communication module 602 includes antenna 1, antenna 2, mobile communication module 602A, and wireless communication module 602B.
[0073] The wireless communication function of the electronic device 600 can be implemented through antenna 1, antenna 2, mobile communication module 602A, wireless communication module 602B, a modem processor, and a baseband processor.
[0074] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 600 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0075] The mobile communication module 602A can provide wireless communication solutions including 2G / 3G / 4G / 5G applied on the electronic device 600.
[0076] The wireless communication module 602B can provide wireless communication solutions for application in the electronic device 600, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
[0077] like Figure 6 As shown, in some implementations, the electronic device 600 may also include an external memory interface 610, an internal memory 604, a universal serial bus (USB) interface 611, a charging management module 612, a power management module 613, a battery 614, an audio module 606, a speaker 606A, a receiver 606B, a microphone 606C, an earphone interface 606D, a sensor module 605, a button 609, a motor, an indicator 608, a camera 607, and a subscriber identification module (SIM) card interface, etc.
[0078] The charging management module 612 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger.
[0079] The power management module 613 is configured to connect the battery 614 and the charging management module 612. The power management module 613 receives input from the battery 614 and / or the charging management module 612 to supply power to the processor 601, the internal memory 604, the external memory, the display screen 603, the camera 607, the wireless communication module 602B, and the like. The power management module 613 can also be configured to monitor parameters such as the capacity of the battery 614, the cycle count of the battery 614, the health status (leakage, impedance) of the battery 614, and the like.
[0080] The external memory interface 610 can be configured to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 600. The external memory card communicates with the processor 601 through the external memory interface 610 to perform data storage functions. For example, files such as music, video streams, and the like can be saved in the external memory card.
[0081] The internal memory 604 can be configured to store computer executable program code, which includes instructions. The processor 601 executes various functional applications and data processing of the electronic device 600 by running the instructions stored in the internal memory 604.
[0082] The electronic device 600 can implement audio functions through the audio module 606, the speaker 606A, the receiver 606B, the microphone 606C, the earphone interface 606D, and the application processor 601, and the like. For example, music playback, recording, and the like.
[0083] The keys 609 include a power key, a volume key, and the like. The keys 609 can be mechanical keys 609. Alternatively, the keys 609 can be touch keys. The electronic device 600 can receive key 609 input to generate key signal input related to user settings and function control of the electronic device 600.
[0084] The indicator 608 can be an indicator light that can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
[0085] The SIM card interface is configured to connect a SIM card. The electronic device 600 interacts with a network through the SIM card to implement functions such as calling and data communication.
[0086] The sensor module 605 in the electronic device 600 can include components such as a touch sensor, a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, an ambient light sensor, a fingerprint sensor, a temperature sensor, a bone conduction sensor, and the like, to implement sensing and / or acquisition functions for different signals.
[0087] It can be understood that the structure illustrated in the embodiments does not constitute a specific limitation on the electronic device 600. In other embodiments, the electronic device 600 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0088] The desktop layout switching method provided by the embodiments of the present application can be applied to the electronic device shown in the above Figure 6 The display screen of the electronic device can display a preview interface of a current desktop and a plurality of layout controls.
[0089] Here, the current desktop of the electronic device is taken as an example, and the method of entering the preview interface of the current desktop is described. Figure 1
[0090] In a possible design, the user can long press a blank area of a page in the current desktop to enter the interface shown in Figure 2 Then, the user clicks the desktop setting control in Figure 2 to enter the interface shown in Figure 3 Finally, the user clicks the desktop layout control in Figure 3 to enter the preview interface of the current desktop.
[0091] In another possible design, the user can also click the setting control in Figure 1 to enter the setting interface, and then click the desktop setting control in the setting interface to enter the interface shown in Figure 3 Finally, the user clicks the desktop layout control in Figure 3 to enter the preview interface of the current desktop.
[0092] Please refer to Figure 7 for a schematic diagram of a display screen provided by the embodiments of the present application. As shown in Figure 7 The display screen can display a preview interface 701 of a current desktop, a plurality of layout controls 702, a cancel control 703, a confirmation control 704, and a page identifier 705. Different layout controls are used to indicate different desktop layouts. For ease of description, Figure 7 Taking a plurality of layout controls including a 4x5 control, a 5x5 control, and a 5x6 control as an example. In addition, the description of the layout control 702 can refer to the description of the desktop layout control in the foregoing embodiments, and the description of the page identifier 705 can also refer to the foregoing embodiments, and details are not described herein.
[0093] By Figure 7 It can be seen that the desktop layout of the current desktop is 4x5. In a possible design, Figure 7 The 4x5 control in the current desktop can be identified by highlighting, shading, or the like to identify the desktop layout of the current desktop.
[0094] Based on the preview interface of the current desktop described above, an embodiment of the present application provides a desktop layout switching method. Please refer to Figure 8 , which is a flowchart of the method. As shown in Figure 8 , the method can include the following steps.
[0095] S801, in response to an operation on a first control, determining whether the desktop data of the initial desktop exists. If it exists, S802a is executed. If it does not exist, S802b is executed.
[0096] The first control corresponds to a first desktop layout. The first desktop layout is different from the desktop layout of the current desktop. That is, the first control is not the layout control corresponding to the desktop layout of the current desktop.
[0097] For example, the preview interface of the current desktop is as shown in Figure 7 , that is, the layout control corresponding to the current desktop is a 4x5 control. Then the first control can be a 5x5 control or a 5x6 control. Correspondingly, the first desktop layout is 4x5, that is, the number of standard icons accommodated by each row is 4, and the number of standard icons accommodated by each column is 5.
[0098] The operation on the first control can be clicking, long pressing, double clicking, or the like, which is not limited herein.
[0099] The current desktop refers to the currently displayed desktop. The initial desktop refers to the desktop when the electronic device switches to the desktop layout of the current desktop. For example, the desktop layout corresponding to the desktop when the electronic device is powered on is 5x6, and the desktop when switching to 4x5 is the initial desktop. The difference between the current desktop and the initial desktop is that the page distribution and the icon distribution in the current desktop can be different from those in the initial desktop. In other words, the user can have performed operations such as adding a page, deleting a page, adding an icon, deleting an icon, and moving an icon in the initial desktop to obtain the current desktop.
[0100] The desktop data is used to indicate the page distribution and the icon distribution in the desktop. The page distribution refers to the arrangement of each page in the desktop, and the icon distribution refers to the arrangement of each icon in each page.
[0101] For example, desktop data may include page data and icon data. The page data is used to indicate the distribution of pages on the desktop, and the icon data is used to indicate the distribution of icons on the desktop. In some possible designs, both the page data and the icon data may be recorded and stored in a table. The table recording the page data may be referred to as a desktop layout screen table, and the table recording the icon data may be referred to as a desktop layout arrangement table.
[0102] The desktop data for the initial desktop can be generated when the electronic device switches to the desktop layout of the current desktop and stored at a preset address. Thus, the electronic device can determine whether the desktop data for the initial desktop exists based on whether data is stored at the preset address. If data is stored at the preset address, it is determined that the desktop data for the initial desktop exists; otherwise, it is determined that the desktop data for the initial desktop does not exist.
[0103] The following describes the existence of desktop data on the initial desktop.
[0104] S802a: Determine whether the desktop data of the current desktop is the same as the desktop data of the initial desktop. If they are the same, execute S803a. If they are not the same, execute S802b.
[0105] If the desktop data of the current desktop is the same as that of the initial desktop, it means that the user has not performed any operations such as adding pages, deleting pages, adding icons, deleting icons, or moving icons on the initial desktop. Otherwise, it means that the user may have performed the above operations.
[0106] The following describes a case where the desktop data of the current desktop is the same as the desktop data of the initial desktop.
[0107] S803a: Determine whether the desktop data of the first desktop exists. If so, execute S804a. If not, execute S802b.
[0108] The first desktop is the desktop of the electronic device in the first desktop layout before switching to the current desktop. Figure 1 The desktop shown is the current desktop, and the first desktop layout is 5×6 as an example. Figure 1 Before the desktop shown, the desktop when the desktop layout is in 5×6 is the first desktop. In an embodiment of the present application, the electronic device can pre-store desktop data corresponding to the desktop when the user controls the electronic device to be in different desktop layouts. Alternatively, when the desktop layout is switched, the electronic device can determine whether the desktop data of the current desktop is the same as the desktop data of the initial desktop. If not, the desktop data of the current desktop is backed up and the desktop data of the initial desktop is deleted. In this way, the desktop data under different desktop layouts can be stored in the electronic device so that it can be obtained when needed.
[0109] As an example, the electronic device can employ a method similar to judging whether the desktop data of the initial desktop exists to judge whether the desktop data of the first desktop exists, which is not described herein.
[0110] The case that the desktop data of the first desktop exists is described below.
[0111] The desktop data of the first desktop existing indicates that the user previously controls the electronic device to be in the first desktop layout, and the first desktop can retain the use preferences or use habits of the user. Therefore, loading the first desktop layout according to the desktop data of the first desktop can make the desktop more consistent with the use habits of the user, and is beneficial to improving the use experience of the user.
[0112] S804a, displaying a preview interface of the first desktop according to the desktop data of the first desktop.
[0113] In the embodiments of the present application, the electronic device can load the preview interface of the first desktop in the display screen through the built-in LoaderTask function. The LoaderTask function is a function in the electronic device for loading a corresponding desktop or interface in the display screen according to desktop data.
[0114] Please refer to Figure 9 , which is a schematic diagram of a preview interface of the first desktop provided by the embodiments of the present application. The user can display the preview interface of the first desktop as shown in Figure 7 by clicking the 5x6 control in Figure 9 through S801a-S804a.
[0115] It should be understood that Figure 9 is only an example, and the distribution of icons and pages of the first desktop can also not employ the distribution shown in Figure 9 , which is not specifically limited herein.
[0116] The case that the desktop data of the initial desktop does not exist, or the desktop data of the current desktop is not the same as the desktop data of the initial desktop, or the desktop data of the first desktop does not exist is described below. As known from the above description, the three cases all perform S802b.
[0117] S802b, generating the desktop data of the second desktop according to a preset rule.
[0118] If the desktop data of the initial desktop does not exist, it is impossible to determine whether the desktop data of the current desktop has been changed compared with the desktop data of the initial desktop. If changed, such as adding icons or pages, the first desktop backed up previously cannot display the changes, such as added icons or pages. Therefore, in this case, an embodiment of the present application generates the desktop data of the second desktop based on the desktop data of the current desktop according to preset rules such as the original desktop layout switching logic of the Android system, so as to ensure that the electronic device can correctly display all icons and pages, thereby improving the user experience.
[0119] The case that the desktop data of the current desktop is not the same as the desktop data of the initial desktop is the same as above, and will not be repeated.
[0120] If the desktop data of the first desktop does not exist, the preview interface of the first desktop cannot be displayed. Therefore, an embodiment of the present application generates the desktop data of the second desktop based on the desktop data of the current desktop according to preset rules such as the original desktop layout switching logic of the Android system, so as to ensure that the electronic device can correctly switch to the first desktop layout.
[0121] As described above, the desktop layout of the second desktop is the first desktop layout. The preset rules can be the original desktop layout switching logic of the Android system.
[0122] Taking the space occupied by one standard icon as 1 as an example. In some possible designs, when the number of rows and columns of the desktop layout is increased, the preset rules can be that the icon distribution and the page distribution remain unchanged, and a space corresponding to the number of columns is added at the end of each row, and a space corresponding to the number of rows is added at the end of each column. Taking the desktop shown in FIG. 8 as an example, the 4x5 desktop layout is switched to a 5x6 desktop layout by adding a space at the end of each row and a space at the end of each column. Figure 1 Figure 1 Figure 5
[0123] In another possible design, the preset rules can be that the icons in the desktop before switching are arranged in the desktop layout after switching in sequence. In this way, the desktop after switching the desktop layout can be relatively neat, which is conducive to improving the user experience.
[0124] In the embodiments of the present application, when the desktop data of the initial desktop is failed to be acquired, the electronic device can store the desktop data of the second desktop as backup after generating the desktop data of the second desktop according to the preset rule. It should be understood that the desktop data of the second desktop can be used as the desktop data of the initial desktop when the next desktop layout switching is performed. Specifically, after the current desktop layout switching is completed, the current desktop becomes the second desktop, and thus the desktop data of the second desktop is the desktop data of the initial desktop when the next desktop layout switching is performed.
[0125] When the desktop data of the current desktop is different from the desktop data of the initial desktop, or the desktop data of the first desktop is failed to be acquired, the electronic device can store the desktop data of the current desktop and the desktop data of the second desktop, and delete the desktop data of the initial desktop after generating the desktop data of the second desktop according to the preset rule. As described above, the desktop data of the current desktop can be used as the desktop data of the initial desktop when the next desktop layout switching is performed, and the desktop data of the current desktop can be used as the backup desktop data when the current desktop is switched to the next time, for restoring the icon distribution and the page distribution of the current desktop.
[0126] Here, the process of generating the desktop data of the second desktop is briefly described. In the embodiments of the present application, the layout network CellX and CellY can be generated according to the desktop layout index (which can be referred to as index, and is pre-built in the electronic device) of the second desktop, where CellX and CellY represent each grid in the layout network. Then, the electronic device can generate the desktop layout arrangement table and the desktop layout screen table according to CellX and CellY, and record the identification, position and other information of each icon. In this way, the desktop data of the second desktop can be obtained.
[0127] S803b, displaying a preview interface of the second desktop according to the desktop data of the second desktop.
[0128] In the embodiments of the present application, the electronic device can load the preview interface of the second desktop in the display screen through the built-in LoaderTask function.
[0129] For example, when the preview interface of the current desktop is as shown in Figure 7 , the preview interface of the second desktop can be as shown in Figure 10 , that is, the icon distribution and the page distribution in Figure 7 are unchanged, and the space corresponding to the number of columns is added at the end of each row, and the space corresponding to the number of rows is added at the end of each column.
[0130] In addition, as shown in Figure 7 , the display screen of the electronic device can further include a confirmation control 704 and a cancel control 703.
[0131] The preview interface of the second desktop displayed in the display screen can be as shown inFigure 7 As shown in the preview interface of the current desktop, the electronic device can display, in response to an operation on the confirmation control or the cancel control, as shown in the current desktop. Figure 1 As shown in the preview interface of the current desktop.
[0132] As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 9 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 11 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop.
[0133] As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 9 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 1 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop.
[0134] As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 10 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 1 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop.
[0135] As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 10 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 5 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop.
[0136] The operation on the confirmation control or the cancel control can be a click, a double-click, a long press, etc., which is not limited in the present application.
[0137] In addition, in some possible embodiments, a return, a cancel, an entering multi-task, etc. operation can also have the same effect as the operation on the cancel control. The return operation or the cancel operation can be a leftward swipe on the right edge of the display screen, and the entering multi-task operation can be an upward swipe on the bottom of the display screen, etc. For example, as shown in the preview interface of the second desktop, the electronic device can display, in response to a return operation, a cancel operation, an entering multi-task operation, etc., as shown in the current desktop. Figure 10 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop. Figure 1 As shown in the preview interface of the first desktop, the electronic device can display, in response to an operation on the confirmation control, as shown in the first desktop.
[0138] It should be noted that the desktop data of the second desktop generated above can contain a blank space. That is, there can be a blank space between the icons in the second desktop, resulting in an unclean distribution of icons and affecting user experience.
[0139] To solve this problem, the embodiment of the present application can first traverse the data indicating the icon distribution in the desktop data after generating the desktop data of the second desktop according to the preset rule at S802b, and eliminate the spaces between the icons in the page. For example, when the desktop data includes the desktop layout arrangement table and the desktop layout screen table, the electronic device can traverse the desktop layout arrangement table to determine the spaces in the desktop arrangement table. Then the icons in the page are sequentially filled into the spaces, and the spaces are marked as placeholders to avoid overlapping with other icons. Finally, the electronic device can release the position before the icon movement as a space, and release the position.
[0140] In the embodiment of the present application, the above processing process can be called first processing. It should be understood that after the desktop data of the second desktop is subjected to the first processing, there is no space between the icons in the new desktop data obtained. Therefore, the preview interface of the second desktop loaded based on the new desktop data can be as shown in FIG. 8C, that is, there is also no space between the icons. In this way, the icon distribution in the second desktop can be more neat, which is beneficial to improve the user experience. Figure 12
[0141] In addition, after the electronic device performs the first processing on the desktop data of the second desktop, the electronic device can store the processed desktop data of the second desktop, so as to serve as the desktop data of the initial desktop in the subsequent desktop layout switching.
[0142] The above is the description of the desktop layout switching method and the electronic device provided by the embodiment of the present application. Based on the above description, it can be seen that when the user switches to the previously used desktop layout, the method can provide the user with the desktop restoration function, so that the desktop is more in line with the user's use habits. In addition, the desktop layout switching method can also enable the user to intuitively see the display effect of each desktop layout when the user performs the desktop layout switching, thereby improving the user experience.
[0143] Next, the desktop layout switching method provided by the embodiment of the present application is described from the internal implementation point of view. Please refer to FIG. 9, which is an interaction schematic diagram of a desktop layout switching method provided by the embodiment of the present application. Figure 13 As shown in FIG. 9, the method can include the following steps. Figure 13
[0144] S1301, the first control responds to being clicked, and sends a first parameter to the switching management class.
[0145] The first parameter can be used to indicate the number of grids corresponding to the first control, the number of pages, etc., which can also be called the desktop data of the first desktop. The number of grids is the desktop layout, such as 4x5 grid, 5x5 grid, etc. The number of pages can indicate whether the display screen is a single screen or a screen, the number of pages in the desktop, etc.
[0146] S1302, the switching management class sends the first parameter to the desktop cache class.
[0147] The desktop cache class updates the desktop cache by the first parameter, to prepare for displaying the desktop layout corresponding to the first parameter in the display screen.
[0148] S1303, the desktop cache class returns the second parameter to the switching management class.
[0149] The second parameter can be used to indicate the grid number, page number, etc. of the current desktop, which can also be called the desktop data of the current desktop.
[0150] S1304, the switching management class sends the second parameter to the database.
[0151] S1305, the database performs a first judgment.
[0152] The first judgment is used to judge whether the desktop data of the initial desktop exists. It is also used to judge whether the desktop data of the current desktop is the same as the desktop data of the initial desktop when the desktop data of the initial desktop exists. It is also used to judge whether the desktop data of the first desktop exists when the desktop data of the current desktop is the same as the desktop data of the initial desktop.
[0153] S1306, the database sends the judgment result to the switching management class.
[0154] When the judgment result is that the desktop data of the initial desktop does not exist, or the desktop data of the initial desktop is not the same as the desktop data of the current desktop, or the desktop data of the first desktop does not exist, S1307a-S1310a are performed.
[0155] S1307a, the switching management class generates the desktop data of the second desktop according to a preset rule.
[0156] S1308a, the switching management class performs a first processing on the desktop data of the second desktop.
[0157] The description of the first processing can refer to the foregoing embodiments, which will not be repeated here.
[0158] S1309a, the switching management class sends the processed desktop data of the second desktop to the database.
[0159] S1310a, the database backs up the processed desktop data of the second desktop.
[0160] S1311a, the processed desktop data of the second desktop is sent to the view layer.
[0161] S1312a, the view layer loads a preview interface of the second desktop in the display screen according to the desktop data of the second desktop.
[0162] When the judgment result is that the desktop data of the initial desktop exists, the desktop data of the initial desktop is the same as the desktop data of the current desktop, and the desktop data of the first desktop exists, the desktop data of the first desktop is included in the judgment result. The electronic device can perform S1307b-S1308b described below.
[0163] S1307b, the desktop data of the first desktop is sent to the view layer.
[0164] S1308b, the view layer loads a preview interface of the first desktop in the display screen according to the desktop data of the first desktop.
[0165] In this way, the desktop layout switching method provided by the embodiment of the application is completed.
[0166] Next, the desktop layout switching method provided by the embodiment of the application is introduced from the perspective of interface display.
[0167] First, the electronic device can display a first desktop. The desktop layout of the first desktop is a first desktop layout. Exemplarily, the first desktop layout can be 4x5.
[0168] Then, the electronic device can display a preview interface of the first desktop and a plurality of layout controls in response to a user operation of switching the desktop layout, and the plurality of layout controls include a first control corresponding to a second desktop layout. The user operation of switching the desktop layout can be Figures 1-3 the operation shown in the figure.
[0169] Then, the electronic device can display a second desktop in response to an operation on the first control, based on a stored layout mode of the second desktop. The desktop layout of the second desktop is a second desktop layout. The layout mode is the desktop data described in the foregoing embodiments, which will not be described here. It should be understood that the reason why the second desktop is directly displayed here is that the first desktop does not change after the electronic device switches to the desktop layout of the first desktop, and there is no case of adding icons or pages, so the layout mode of the backup second desktop can be directly used to load the second desktop.
[0170] Then, in response to a user editing operation on the second desktop, a third desktop is displayed, the layout mode of the third desktop is different from that of the second desktop, and the desktop layout of the third interface is the same as that of the second desktop. The editing operation can be adding icons, deleting icons, adding pages, deleting pages, moving icons, etc. That is, the third desktop is the desktop of the second desktop after the editing operation.
[0171] In response to the user operation of switching the desktop layout, a preview interface of the third desktop and a plurality of layout controls are displayed, and the plurality of layout controls include a second control corresponding to a fourth desktop layout. The operation of switching the desktop layout can refer to the foregoing embodiments, which will not be described here.
[0172] In response to the user operation on the second control, the fourth desktop is displayed based on the third desktop and the fourth desktop layout. It should be understood that when the electronic device switches to the second desktop layout, the initial desktop is the second desktop. Then the second desktop is changed to the third desktop through the user editing operation. That is, the layout mode of the third desktop is different from that of the second desktop, and therefore the layout mode of the fourth desktop can be generated according to the preset rule based on the third desktop and the fourth desktop layout, and the fourth desktop is displayed according to the layout mode of the fourth desktop.
[0173] The above is the desktop layout switching method provided by the embodiment of the present application. In the execution process, the interface display process in the electronic device.
[0174] By now, the person skilled in the art should have a clear and explicit understanding of the desktop control scheme provided by the embodiment of the present application. The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the electronic device. In order to realize the above functions, it contains the corresponding hardware structure and / or software module for executing each function. The person skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or combination of hardware and computer software. Whether a certain function is executed in hardware or computer software driven hardware depends on the specific application and design constraints of the technical scheme. The professional technician can use different methods to realize the described function for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0175] Please refer to Figure 14 , a schematic diagram of the composition of an electronic device 1400 provided by the embodiment of the present application. The electronic device 1400 can be any of the electronic devices in the above examples, for example, the electronic device 1400 can be a mobile phone, a computer, etc. For example, as shown in the figure, Figure 14 The electronic device 1400 can include a processor 1401, a memory 1402, and a display screen 1403. The display screen 1403 is connected to the processor 1401. The memory 1402 is used to store computer execution instructions. For example, in some embodiments, when the processor 1401 executes the instructions stored in the memory 1402, the electronic device 1400 can perform any of the functions of the electronic device in the above embodiments to realize any of the desktop layout switching methods in the above examples. It can also make the electronic device display any of the display interfaces in the above embodiments.
[0176] It should be noted that all related contents of each step involved in the above method embodiments can be cited to the function description of the corresponding function module, which will not be repeated here.
[0177] Figure 15 A schematic diagram of a chip system 1500 is shown. The chip system 1500 can be disposed in an electronic device. For example, the chip system 1500 can be disposed in a mobile phone. For example, the chip system 1500 can include a processor 1501 and a communication interface 1502, which are configured to support the electronic device to implement the functions involved in the above embodiments. In a possible design, the chip system 1500 further includes a memory configured to store program instructions and data necessary for the electronic device. The chip system can be composed of a chip, or can include a chip and other discrete devices. It should be noted that the communication interface 1502 can also be referred to as an interface circuit in some implementations of the present application.
[0178] It should be noted that all related content of each step involved in the above method embodiments can be cited to the function description of the corresponding function module, which will not be described here.
[0179] The embodiments of the present application can divide the functions of the devices involved in the above method examples into function modules, for example, each function module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be realized in the form of hardware or in the form of software function module. It should be noted that the division of the modules in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there can be another division mode.
[0180] The functions or actions or operations or steps in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the computer program instructions can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the flow or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or include one or more data storage devices such as servers, data centers, etc. that can be integrated with the medium. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0181] Although the present application is described in conjunction with specific features and embodiments thereof, it is evident that many alternatives, modifications and variations will be apparent to those skilled in the art in light of the foregoing description. Accordingly, it is intended to embrace all alternatives, modifications and variations that fall within the scope of the present application. Obviously, various modifications and changes are possible in the present application without departing from the scope and spirit of the application. Accordingly, it is intended to embrace all such modifications and changes that fall within the scope of the appended claims and their equivalents.
Claims
1. A desktop layout switching method, characterized in that: Applied to electronic devices, the desktop layout switching method includes: Displaying a preview interface of the current desktop and multiple layout controls in the same interface; each of the layout controls is used to indicate a different desktop layout; the multiple layout controls include a first control corresponding to a first desktop layout; the first desktop layout is different from the desktop layout of the current desktop; In response to an operation on the first control, a first parameter is obtained, the first parameter indicating desktop data of a first desktop; a desktop cache is updated based on the first parameter; a second parameter is obtained, the second parameter indicating desktop data of the current desktop; and desktop data of an initial desktop of the stored current desktop is obtained; the initial desktop is the desktop of the electronic device when it switches to the desktop layout of the current desktop; the desktop data is used to indicate page distribution and icon distribution in the desktop; wherein page distribution refers to the arrangement of each page in the desktop, and icon distribution refers to the arrangement of each icon in the each page; the desktop data of the current desktop and the desktop data of the initial desktop correspond to the same desktop layout; Determining whether the desktop data of the current desktop is the same as the desktop data of the initial desktop; When the desktop data of the current desktop is the same as the desktop data of the initial desktop, obtaining the desktop data of the stored first desktop; the first desktop is the desktop of the electronic device when it is in the first desktop layout before switching to the current desktop; displaying a preview interface of the first desktop according to the desktop data of the first desktop; When the desktop data of the initial desktop fails to be obtained, or when the desktop data of the current desktop is different from the desktop data of the initial desktop, or when the desktop data of the first desktop fails to be obtained, the desktop data of the second desktop is generated according to preset rules; the preset rules include the system's native desktop layout switching logic or arranging the icons in the current desktop in sequence in the desktop layout of the second desktop; the system's native desktop layout switching logic includes maintaining the icon distribution and page distribution when switching the 4×5 desktop layout to the 5×6 desktop layout, adding a space corresponding to an icon at the end of each row, and adding a space corresponding to an icon at the end of each column; the desktop layout of the second desktop is the first desktop layout; the desktop data of the second desktop is subjected to a first processing; the first processing is used to ensure that there is no empty space between the icons in each page of the second desktop; and the preview interface of the second desktop is displayed based on the processed desktop data of the second desktop.
2. The desktop layout switching method according to claim 1, wherein: When the desktop data of the initial desktop fails to be obtained, after generating the desktop data of the second desktop according to a preset rule, the method further includes: The desktop data of the second desktop is stored.
3. The desktop layout switching method according to claim 1, wherein: When the desktop data of the current desktop is different from the desktop data of the initial desktop, or when obtaining the desktop data of the first desktop fails, after generating the desktop data of the second desktop according to a preset rule, the method further includes: The desktop data of the current desktop and the desktop data of the second desktop are stored, and the desktop data of the initial desktop is deleted.
4. A desktop layout switching method, characterized in that: Applied to electronic devices; the desktop layout switching method includes: Displaying a first desktop, wherein the desktop layout of the first desktop is a first desktop layout; In response to a user operation of switching desktop layouts, displaying a preview interface of the first desktop and a plurality of layout controls in the same interface, each of the layout controls being used to indicate a different desktop layout; the plurality of layout controls including a first control corresponding to the second desktop layout; after the electronic device switches to the desktop layout of the first desktop and before responding to the user operation of switching the desktop layout, the first desktop remains unchanged; In response to an operation on the first control, the layout mode of the first desktop and the layout mode of the initial desktop of the first desktop are obtained; the initial desktop is the desktop of the electronic device when it switches to the first desktop layout; when the layout mode of the first desktop is the same as the layout mode of the initial desktop, the layout mode of the second desktop is obtained; the second desktop is displayed according to the layout mode of the second desktop; the desktop layout of the second desktop is the second desktop layout; the layout mode refers to desktop data; the layout mode is used to indicate the page distribution and icon distribution in the desktop; wherein the page distribution refers to the arrangement of each page in the desktop, and the icon distribution refers to the arrangement of each icon in the each page; the layout mode of the second desktop is the desktop data of the initial desktop corresponding to the second desktop layout; In response to a user editing operation on the second desktop, displaying a third desktop, wherein the layout of the third desktop is different from that of the second desktop and the desktop layout of the third desktop is the same as that of the second desktop; In response to a user operation of switching desktop layouts, displaying a preview interface of the third desktop and the multiple layout controls, wherein the multiple layout controls include a second control corresponding to the fourth desktop layout; In response to a user operation on the second control, a fourth desktop is displayed based on the layout of the third desktop and the fourth desktop.
5. The desktop layout switching method according to claim 4, characterized in that: The displaying of the second desktop according to the layout of the second desktop includes: Displaying a preview interface of the second desktop according to the layout of the second desktop; the preview interface of the second desktop includes a confirmation control; In response to an operation on the confirmation control, the second desktop is displayed.
6. The desktop layout switching method according to claim 4 or 5, characterized in that: The displaying of the fourth desktop based on the layout of the third desktop and the fourth desktop includes: Based on the layouts of the third desktop and the fourth desktop, generating a layout of the fourth desktop according to a preset rule; The fourth desktop is displayed according to the layout of the fourth desktop.
7. The desktop layout switching method according to claim 6, characterized in that: The displaying of the fourth desktop according to the layout of the fourth desktop includes: Displaying a preview interface of the fourth desktop according to the layout of the fourth desktop; the preview interface of the fourth desktop includes a confirmation control; In response to an operation on the confirmation control, the fourth desktop is displayed.
8. An electronic device, characterized in that: The electronic device includes a display screen, one or more processors and one or more memories; the display screen is connected to the one or more processors; the one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions; When the one or more processors execute the computer instructions, the electronic device executes the desktop layout switching method according to any one of claims 1-3 or claims 4-7, and the display screen displays the preview interface in the desktop layout switching method according to any one of claims 1-3 or claims 4-7.
9. A chip system, characterized in that: The chip includes a processing circuit and an interface; the processing circuit is used to call and run a computer program stored in a storage medium from the storage medium to execute the desktop layout switching method according to any one of claims 1-3 or claims 4-7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes computer instructions, and when the computer instructions are executed, the desktop layout switching method according to any one of claims 1 to 3 or claims 4 to 7 is executed.
11. A computer program product, characterized in that The computer program product includes instructions, and when the computer program product is run on a computer, the computer can execute the desktop layout switching method according to any one of claims 1 to 3 or claims 4 to 7 according to the instructions.
Citation Information
Patent Citations
Application icon layout method and mobile terminal
CN106095250A
Information processing method and system and storage medium
CN112799563A