This application claims priority to Chinese Patent Application No. 202010058434.2, filed with the China National Intellectual Property Administration on Jan. 17, 2020 and entitled “WIDGET PROCESSING METHOD AND RELATED APPARATUS”, which is incorporated herein by reference in its entirety.
This application relates to the field of terminal technologies, and in particular, to a widget processing method and a related apparatus.
A widget (Widget) is a micro application view that can be embedded into a home screen of an electronic device, and can support a user in previewing information or performing a shortcut operation on the view. Various widgets such as “clock”, “weather”, and “music player” may be usually displayed on the home screen of the electronic device.
Currently, when a widget is to be added on the home screen of the electronic device, a home screen editing interface of the electronic device usually needs to be entered, and then a control of the widget is tapped in a specific area of the home screen editing interface, to add the widget on the home screen. Consequently, operations are relatively cumbersome.
Embodiments of this application provide a widget processing method and a related apparatus, to switch a target icon to a widget set including a plurality of widgets, so that a widget is quickly added on a home screen of an electronic device.
A first aspect of embodiments of this application provides a widget processing method. The method includes: An electronic device displays a target icon. A user may perform a first operation on the target icon. The electronic device receives the first operation performed on the target icon. The electronic device switches the target icon to a widget set in response to the first operation. The widget set includes a plurality of widgets of a plurality of applications. The electronic device displays the widget set. The target icon corresponds to the plurality of applications, and each of the plurality of applications corresponds to a widget. Therefore, the plurality of widgets of the plurality of applications corresponding to the target icon may be determined based on the target icon. In other words, when the target icon corresponds to the plurality of widgets, the electronic device may switch the target icon to the widget set including the plurality of widgets. By operating the target icon, the target icon is switched to the widget set including a plurality of widgets. Therefore, a plurality of different widgets can be displayed on the electronic device, and an operation is simple and quick.
In a possible manner of switching the target icon to the widget set, the electronic device receives a touch and hold operation performed on the target icon. The electronic device displays a frame at an edge of the target icon in response to the touch and hold operation, for example, displays, at the edge of the target icon, a frame that matches a size and a shape of the target icon. The electronic device receives a stretch operation performed on the frame. The electronic device switches the target icon to the widget set in response to the stretch operation.
The target icon may be an icon of an application or an icon of a folder.
When the target icon is an icon of a first application, the user may perform the first operation on the icon of the first application displayed on the electronic device, to switch the icon of the first application to the widget set. In this case, the plurality of applications include one or more applications associated with the first application. For example, the first application may be a wallet application, the wallet application may be associated with a plurality of payment-type applications, the electronic device may switch an icon of the wallet application to a widget set, and a plurality of widgets included in the widget set are widgets of the plurality of payment-type applications associated with the wallet application. In addition, the plurality of applications may further include the first application. For example, the plurality of applications may be the first application and another application of a same type as the first application. In other words, the plurality of widgets included in the widget set further include a widget of the first application. Categories of the first application include but are not limited to a payment category, an entertainment category, an education category, a reading category, and a health category. When the icon of the first application is switched to the widget set, the widget set includes widgets of the plurality of applications associated with the first application, so that the plurality of widgets related to the first application can be quickly added on the electronic device. This avoids a cumbersome process in which the user determines the plurality of applications associated with the first application and then adds the widgets corresponding to the plurality of applications one by one on the electronic device, and reduces user operations.
When the target icon is an icon of any folder, the user may perform the first operation on the icon of the folder displayed on the electronic device, to switch the icon of the folder to a widget set. In this case, the plurality of applications are a plurality of applications included in the folder, and the plurality of widgets included in the widget set are widgets of the applications in the folder. For example, the folder may include an application A and an application B. In this case, when the icon of the folder is switched to the widget set, the plurality of widgets included in the widget set are a widget of the application A and a widget of the application B. When the icon of the folder is switched to the widget set, the widget set includes the widgets of the plurality of applications in the folder, so that the widgets of the applications in the folder can be quickly added on the electronic device. This helps the user conveniently view or operate the widgets of the applications in the folder, avoids a cumbersome process in which the user adds the widgets of the applications in the folder one by one on the electronic device, and reduces user operations.
It may be understood that, when the widget set includes a relatively large quantity of widgets, it is possible that the widget set cannot display all the widgets in the widget set. In this case, the electronic device may determine, in the following several manners, widgets displayed in the widget set. For example, the electronic device may determine, in a sequence of using the widgets in the widget set, the widgets displayed in the widget set. To be specific, a display sequence of the last widget used by the user in the widget set is first, a display sequence of the last but one widget used by the user in the widget set is second, and so on. For another example, the electronic device may determine, based on a widget use frequency, the widgets displayed in the widget set. To be specific, within a specific time range (for example, one day or one week), a display sequence of a widget used by the user with the highest use frequency in the widget set is first, a display sequence of a widget used by the user with the second highest use frequency in the widget set is second, and so on. For another example, the electronic device may alternatively determine, through user-defined settings, the widgets displayed in the widget set.
In addition, the electronic device may change a widget displayed in the widget set. In a possible design, after the electronic device switches the target icon to the widget set, the method further includes: The electronic device receives a second operation performed on the widget set. In response to the second operation, the electronic device changes a widget displayed in the widget set. The second operation may specifically include a slide operation.
In a possible manner, the electronic device may sequentially change the widgets displayed in the widget set, and the electronic device may determine, based on use time, use frequencies, or application types, a sequence of the plurality of widgets included in the widget set.
In another possible manner, the electronic device may determine, based on a direction of the slide operation, a manner of changing a widget displayed in the widget set. Specifically, if the second operation is a slide operation in a first direction, the electronic device changes a first widget displayed in the widget set to a second widget of a same type as the first widget. It should be noted that, that a widget A and a widget B are of a same type means that an application A corresponding to the widget A and an application B corresponding to the widget B are of a same type. Specifically, if the second operation is a slide operation in a second direction, the electronic device changes a first widget displayed in the widget set to a third widget of a different type from the first widget. When a plurality of applications are of different types, the user may quickly change a to-be-displayed widget.
The foregoing two manners of changing a widget displayed in the widget set may be combined.
In a possible design, after the electronic device switches the target icon to the widget set, the method may further include: The electronic device receives a third operation performed on a target widget. The target widget is a widget displayed in the widget set. In response to the third operation, the electronic device displays an application interface corresponding to the target widget. The third operation may be specifically a tap operation. In other words, in response to the tap operation performed on the target widget displayed in the widget set, the electronic device may display the application interface corresponding to the target widget.
In a possible design, after the electronic device switches the target icon to the widget set, the method may further include: The electronic device receives a fourth operation performed on the widget set, and the electronic device switches the widget set to the target icon in response to the fourth operation. Specifically, the electronic device receives a touch and hold gesture operation performed on the widget set, the electronic device displays a frame at an edge of the widget set in response to the touch and hold gesture operation, the electronic device receives a scale down gesture operation performed on the frame, and the electronic device switches the widget set to the target icon in response to the scale down gesture operation. The widget set can be switched to the target icon by performing the fourth operation. Therefore, when the user does not need to use a widget, a widget set that occupies larger space can be switched to a target icon that occupies relatively small space. This saves space in a display region of the electronic device.
In a possible design, after the electronic device switches the target icon to the widget set, the method may further include: The electronic device receives a fifth operation performed on the widget set, and the electronic device changes a size of a display region of the widget set in response to the fifth operation, for example, changes a widget set with a relatively small display region to a widget set with a relatively large display region, or changes a widget set with a relatively large display region to a widget set with a relatively small display region.
A second aspect of embodiments of this application provides an electronic device, including a display, a processor, and a memory. The memory is configured to store a computer program, the computer program includes instructions, and when the instructions are executed by the processor, the electronic device is enabled to perform the following steps: The electronic device displays a target icon. A user may perform a first operation on the target icon. The electronic device receives the first operation performed on the target icon. The electronic device switches the target icon to a widget set in response to the first operation. The widget set includes a plurality of widgets of a plurality of applications. The electronic device displays the widget set. The target icon corresponds to the plurality of applications, and each of the plurality of applications corresponds to a widget. Therefore, the plurality of widgets of the plurality of applications corresponding to the target icon may be determined based on the target icon. In other words, when the target icon corresponds to the plurality of widgets, the electronic device may switch the target icon to the widget set including the plurality of widgets.
In a possible manner of switching the target icon to the widget set, the electronic device receives a touch and hold operation performed on the target icon. The electronic device displays a frame at an edge of the target icon in response to the touch and hold operation, for example, displays, at the edge of the target icon, a frame that matches a size and a shape of the target icon. The electronic device receives a stretch operation performed on the frame. The electronic device switches the target icon to the widget set in response to the stretch operation.
The target icon may be an icon of an application or an icon of a folder.
When the target icon is an icon of a first application, after the user performs the first operation on the icon of the first application displayed on the electronic device, the electronic device switches the icon of the first application to the widget set. In this case, the plurality of applications include one or more applications associated with the first application. For example, the first application may be a wallet application, the wallet application may be associated with a plurality of payment-type applications, the electronic device may switch an icon of the wallet application to a widget set, and a plurality of widgets included in the widget set are widgets of the plurality of payment-type applications associated with the wallet application. In addition, the plurality of applications may further include the first application. For example, the plurality of applications may be the first application and another application of a same type as the first application. In other words, the plurality of widgets included in the widget set further include a widget of the first application. Categories of the first application include but are not limited to a payment category, an entertainment category, an education category, a reading category, and a health category.
When the target icon is an icon of any folder, after the user performs the first operation on the icon of the folder displayed on the electronic device, the electronic device switches the icon of the folder to a widget set. In this case, the plurality of applications are a plurality of applications included in the folder, and the plurality of widgets included in the widget set are widgets of the applications in the folder. For example, the folder may include an application A and an application B. In this case, when the icon of the folder is switched to the widget set, the plurality of widgets included in the widget set are a widget of the application A and a widget of the application B.
It may be understood that, when the widget set includes a relatively large quantity of widgets, it is possible that the widget set cannot display all the widgets in the widget set. In this case, the electronic device may determine, in the following several manners, widgets displayed in the widget set. For example, the electronic device may determine, in a sequence of using the widgets in the widget set, the widgets displayed in the widget set. To be specific, a display sequence of the last widget used by the user in the widget set is first, a display sequence of the last but one widget used by the user in the widget set is second, and so on. For another example, the electronic device may determine, based on a widget use frequency, the widgets displayed in the widget set. To be specific, within a specific time range (for example, one day or one week), a display sequence of a widget used by the user with the highest use frequency in the widget set is first, a display sequence of a widget used by the user with the second highest use frequency in the widget set is second, and so on. For another example, the electronic device may alternatively determine, through user-defined settings, the widgets displayed in the widget set.
In addition, when the instructions are executed by the processor, the electronic device may be further enabled to perform the following step: The electronic device may change a widget displayed in the widget set. In a possible design, after the electronic device switches the target icon to the widget set, the method further includes: The electronic device receives a second operation performed on the widget set. In response to the second operation, the electronic device changes a widget displayed in the widget set. The second operation may specifically include a slide operation.
In a possible manner, the electronic device may sequentially change the widgets displayed in the widget set, and the electronic device may determine, based on use frequencies, types, or the like, a sequence of the plurality of widgets included in the widget set.
In another possible manner, when the instructions are executed by the processor, the electronic device may be further enabled to perform the following step: The electronic device may determine, based on a direction of the slide operation, a manner of changing a widget displayed in the widget set. Specifically, if the second operation is a slide operation in a first direction, the electronic device changes a first widget displayed in the widget set to a second widget of a same type as the first widget. It should be noted that, that a widget A and a widget B are of a same type means that an application A corresponding to the widget A and an application B corresponding to the widget B are of a same type. Specifically, if the second operation is a slide operation in a second direction, the electronic device changes a first widget displayed in the widget set to a third widget of a different type from the first widget. When a plurality of applications are of different types, the user may quickly change a to-be-displayed widget.
The foregoing two manners of changing a widget displayed in the widget set may be combined.
In a possible design, when the instructions are executed by the processor, the electronic device may be further enabled to perform the following steps: After the electronic device switches the target icon to the widget set, the electronic device receives a third operation performed on a target widget. The target widget is a widget displayed in the widget set. In response to the third operation, the electronic device displays an application interface corresponding to the target widget. The third operation may be specifically a tap operation. In other words, in response to the tap operation performed on the target widget displayed in the widget set, the electronic device may display the application interface corresponding to the target widget.
In a possible design, when the instructions are executed by the processor, the electronic device may be further enabled to perform the following steps: After the electronic device switches the target icon to the widget set, the electronic device receives a fourth operation performed on the widget set, and the electronic device switches the widget set to the target icon in response to the fourth operation. Specifically, the electronic device receives a touch and hold gesture operation performed on the widget set, the electronic device displays a frame at an edge of the widget set in response to the touch and hold gesture operation, the electronic device receives a scale down gesture operation performed on the frame, and the electronic device switches the widget set to the target icon in response to the scale down gesture operation.
In a possible design, when the instructions are executed by the processor, the electronic device may be further enabled to perform the following steps: After the electronic device switches the target icon to the widget set, the electronic device receives a fifth operation performed on the widget set, and the electronic device changes a size of a display region of the widget set in response to the fifth operation, for example, changes a widget set with a relatively small display region to a widget set with a relatively large display region, or changes a widget set with a relatively large display region to a widget set with a relatively small display region.
A third aspect of embodiments of this application provides a computer program product including instructions. When the instructions are run on a computer, the computer is enabled to perform the method according to any one of the implementations of the first aspect.
A fourth aspect of embodiments of this application provides a computer-readable storage medium, including computer program instructions. When the computer program instructions are run on a computer, the computer is enabled to perform the method according to any one of the implementations of the first aspect.
It may be understood that the electronic device according to the second aspect, the computer program product according to the third aspect, and the computer-readable storage medium according to the fourth aspect are all configured to perform the corresponding method provided above. Therefore, for beneficial effects that can be achieved by the electronic device, the computer program product, and the computer-readable storage medium, refer to the beneficial effects in the corresponding method provided above. Details are not described again herein.
The following describes technical solutions in embodiments of this application with reference to the accompanying drawings in embodiments of this application. In the descriptions of embodiments of this application, “I” means “or” unless otherwise specified. For example, A/B may represent A or B. In this specification, “and/or” describes only an association relationship between associated objects and represents that three relationships may exist. For example, A and/or B may represent the following three cases: Only A exists, both A and B exist, and only B exists. In addition, in the descriptions of embodiments of this application, “a plurality of” means two or more than two.
The following terms “first” and “second” are merely intended for a purpose of description, and shall not be understood as an indication or implication of relative importance or implicit indication of a quantity of indicated technical features. Therefore, a feature limited by “first” or “second” may explicitly or implicitly include one or more features. In the descriptions of embodiments, unless otherwise specified, “a plurality of” means two or more than two.
A method provided in embodiments of this application may be applied to an electronic device. The electronic device may include a device such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (augmented reality, AR) device/a virtual reality (virtual reality, VR) device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, or a personal digital assistant (personal digital assistant, PDA). A specific type of the electronic device is not limited in embodiments of this application.
For example, the electronic device is a mobile phone.
The following describes in detail each component of the mobile phone 100 with reference to
The RF circuit 110 may be configured to receive and send a signal in an information receiving or sending process or a call process. Particularly, after receiving downlink information from a base station, the RF circuit sends the downlink information to the processor 180 for processing. In addition, the RF circuit sends designed uplink data to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (low noise amplifier, LNA), a duplexer, and the like. In addition, the RF circuit 110 may further communicate with a network and another device through wireless communication. The wireless communication may use any communications standard or protocol, including but not limited to global system for mobile communications (global system for mobile communications, GSM), a general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), long term evolution (long term evolution, LTE), an email, a short message service (short message service, SMS), and the like.
The memory 120 may be configured to store a software program and a module. The processor 180 runs the software program and the module that are stored in the memory 120, to perform various function applications of the mobile phone 100 and process data. The memory 120 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application required by at least one function (such as a sound play function and an image play function), and the like. The data storage area may store data (such as audio data and a phone book) created when the mobile phone 100 is used, and the like. In addition, the memory 120 may include a high-speed random access memory, or may include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory, or another volatile solid-state storage device.
The another input device 130 may be configured to: receive input digital or character information, and generate a key signal input that is related to user settings and function control of the mobile phone 100. Specifically, the another input device 130 may include but is not limited to one or more of a physical keyboard, a function button (for example, a volume control button or an on/off button), a trackball, a mouse, a joystick, an optical mouse (the optical mouse is a touch-sensitive surface that does not display a visual output, or is an extension of a touch-sensitive surface that includes a touchscreen), and the like. The another input device 130 is connected to another input device controller 171 of the I/O subsystem 170, and performs signal interaction with the processor 180 under control of the another input device controller 171.
The display 140 may be configured to display information entered by a user or information provided for a user, and various menus of the mobile phone 100, and may further receive a user input. Specifically, the display 140 may include a display panel 141 and a touch panel 142. The display panel 141 may be configured in a form of a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (organic light-emitting diode, OLED), or the like. The touch panel 142, also referred to as a touchscreen, a touch-sensitive screen, or the like, may collect a contact or non-contact operation of the user on or near the touch panel 142 (such as an operation of the user on or near the touch panel 142 by using any suitable object or accessory such as a finger or a stylus, or a motion sensing operation. The operation includes a single-point control operation, a multi-point control operation, or another type of operation), and drive a corresponding connection apparatus based on a preset program. Optionally, the touch panel 142 may include two parts: a touch detection apparatus and a touch controller. The touch detection apparatus detects a touch orientation and posture of the user, detects a signal brought by a touch operation, and transfers the signal to the touch controller. The touch controller receives touch information from the touch detection apparatus, converts the touch information into information that can be processed by the processor, and then sends the information to the processor 180. The touch controller can also receive and execute a command sent by the processor 180. In addition, the touch panel 142 may be implemented by using a plurality of types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type, or the touch panel 142 may be implemented by using any technology developed in the future. Further, the touch panel 142 may cover the display panel 141. The user may perform, based on content displayed on the display panel 141 (the displayed content includes but is not limited to a soft keyboard, a virtual mouse, a virtual button, an icon, and the like), an operation on or near the touch panel 142 covered by the display panel 141. After detecting a touch operation performed on or near the touch panel 142, the touch panel 142 transfers the touch operation to the processor 180 by using the I/O subsystem 170, so as to determine a touch event type to determine a user input. Then, the processor 180 provides a corresponding visual output on the display panel 141 based on the touch event type and the user input by using the I/O subsystem 170. In
The mobile phone 100 may further include at least one type of sensor 150, for example, a light sensor, a motion sensor, and another sensor. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor may adjust luminance of the display panel 141 based on brightness of ambient light. The proximity sensor may turn off the display panel 141 and/or backlight when the mobile phone 100 moves to the ear. As a motion sensor, an accelerometer sensor may detect a value of an acceleration in various directions (usually on three axes), may detect a value and a direction of gravity when the mobile phone is still, and may be applied to an application for recognizing a posture of the mobile phone (for example, switching between a landscape mode and a portrait mode, a related game, or magnetometer posture calibration), a function related to vibration recognition (for example, a pedometer or a keystroke), and the like. For another sensor that may be further configured on the mobile phone 100, for example, a gyroscope, a barometer, a hygrometer, a thermometer, or an infrared sensor, details are not described herein.
The audio circuit 160, a speaker 161, and a microphone 162 may provide an audio interface between the user and the mobile phone 100. The audio circuit 160 may transmit, to the speaker 161, a signal that is converted from received audio data. The speaker 161 converts the signal into a sound signal for output. In addition, the microphone 162 converts a collected sound signal into a signal. The audio circuit 160 receives the signal, converts the signal into audio data, and then outputs the audio data to the RF circuit 108, so as to send the audio data to, for example, another mobile phone, or outputs the audio data to the memory 120 for further processing.
The I/O subsystem 170 is configured to control an external device for input and output, and may include the another input device controller 171, a sensor controller 172, and a display controller 173. Optionally, one or more another input control device controllers 171 receive a signal from the another input device 130 and/or send a signal to the another input device 130. The another input device 130 may include a physical button (a press button, a rocker button, or the like), a dial, a slider switch, a joystick, a click scroll wheel, and an optical mouse (the optical mouse is a touch-sensitive surface that does not display a visual output, or is an extension of a touch-sensitive surface that includes a touchscreen). It should be noted that the another input control device controller 171 may be connected to any one or more of the foregoing devices. The display controller 173 in the I/O subsystem 170 receives a signal from the display 140 or sends a signal to the display 140. After the display 140 detects the user input, the display controller 173 converts the detected user input into interaction with a user interface object displayed on the display 140, to implement human-machine interaction. The sensor controller 172 may receive a signal from one or more sensors 150 and/or send a signal to one or more sensors 150.
The processor 180 is a control center of the mobile phone 100, and is connected to each part of the mobile phone through various interfaces and lines. The processor performs various functions of the mobile phone 100 and processes data by running or executing the software program and/or module stored in the memory 120 and invoking data stored in the memory 120, so as to perform overall monitoring on the mobile phone. Optionally, the processor 180 may include one or more processing units. Preferably, the processor 180 may integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor mainly processes wireless communication. It may be understood that the foregoing modem processor may be not integrated into the processor 180.
The mobile phone 100 further includes the power supply 190 that supplies power to each component (for example, a battery). Optionally, the power supply may be logically connected to the processor 180 through a power management system, so as to implement functions such as charging management, discharging management, and power consumption management through the power management system.
The mobile phone 100 may further include a camera, a Bluetooth module, and the like although they are not shown in the figure. Details are not described herein.
Currently, when the user needs to add a widget to a home screen of the electronic device, the user usually needs to pinch and stretch or touch and hold the home screen of the electronic device to enter a home screen editing interface of the electronic device, and then taps a control of the widget on a toolbar at the bottom of the home screen editing interface to add the widget to the home screen. When the user needs to add a plurality of different widgets, the user usually further needs to perform slide selection on the toolbar, to select, from a plurality of widgets on the toolbar, the widgets that need to be added. An operation manner is cumbersome, and it is inconvenient for the user to add a widget.
In view of this, embodiments of this application provide a widget processing method.
By operating a target icon on a home screen of an electronic device, the target icon may be switched to a widget, so that a widget can be quickly added on the home screen of the electronic device, and an operation is simple and quick. In addition, when the target icon corresponds to a plurality of widgets, by operating the target icon, the target icon may be switched to a widget set including the plurality of widgets. Therefore, a plurality of different widgets are added on the home screen of the electronic device.
The following describes in detail the widget processing method provided in embodiments of this application with reference to the accompanying drawings. For ease of description, the following uses an example in which the electronic device is a mobile phone for description.
201: A mobile phone receives an operation 1 on a target icon.
When a user needs to add a widget on a home screen of the mobile phone, the user may perform the operation 1 on the target icon on the home screen of the mobile phone, so as to trigger the mobile phone to switch the target icon to a widget. In other words, the operation 1 is used to switch the target icon to a widget. The operation 1 may be a preset gesture operation or a voice instruction entered by the user. The operation 1 is not limited in this embodiment of this application.
The target icon includes an icon that may be set on the home screen of the mobile phone, such as an icon of an application or an icon of a folder, and is used as a shortcut for entering the application or the folder. Alternatively, the target icon may be an icon on another interface. For example, the target icon may further include a button icon on a control center interface, and is used as a shortcut for enabling a function. The target icon is not limited in this embodiment of this application.
In a possible implementation, the target icon may be an icon of an application on the home screen of the mobile phone, and the preset gesture entered by the user may be a touch and hold gesture operation and a stretch gesture operation. For example, as shown in
In a possible implementation, the voice instruction entered by the user may be a segment of voice for the target icon. For example, the user may enter voice “switch the wallet icon to a widget set”. When the mobile phone receives, by using a microphone, the voice entered by the user, the mobile phone receives the operation 1 performed on the wallet icon.
202: The mobile phone switches the target icon to a widget in response to the operation 1.
When the target icon corresponds to one widget, the target icon is switched to the one widget.
When the target icon corresponds to a plurality of widgets, the target icon is switched to a widget set. The widget set includes a plurality of widgets, and the plurality of widgets respectively correspond to a plurality of applications.
The widget may be a micro application view embedded on the home screen of the mobile phone, or the widget may be another micro window that is embedded on a display interface of the mobile phone and that includes application information, for example, a card. In other words, the widget is a display mode used to display the application information on the display interface of the mobile phone, or the widget may be another display mode. A specific display mode of the widget is not limited in this embodiment of this application.
Specifically, after the mobile phone receives the operation 1 performed by the user on the target icon on the home screen, the mobile phone switches the target icon on the home screen to a widget set in response to the operation 1. The widget set includes a plurality of different widgets. The mobile phone may display one or more widgets in the widget set in a display region occupied by the widget set.
For example, as shown in
It should be noted that an implementation in which the mobile phone switches the target icon to the widget set includes but is not limited to the following: After the mobile phone receives the operation 1, a home screen process on the mobile phone determines a plurality of widgets associated with applications corresponding to the target icon, and binds the plurality of widgets to an AppWidgetHost container, so as to display the widget set on the home screen. The AppWidgetHost container is configured to accommodate a widget and display a widget in the container on the home screen. In the AppWidgetHost container, the plurality of widgets in the widget set may be stacked from the top to the bottom.
It may be understood that the mobile phone may display one widget in the widget set in the display region occupied by the widget set. For example, as shown in
In some embodiments, after the mobile phone switches the target icon to the widget set, the mobile phone may receive an operation 2 performed on a target widget. The target widget may be a widget in the widget set. In response to the operation 2, the mobile phone enters an application interface corresponding to the target widget. In other words, the operation 2 is used to display the application interface corresponding to the target widget. The operation 2 may be a preset gesture operation or a voice instruction entered by the user. For example, the preset gesture entered by the user may be any one of a tap gesture, a pressure recognition gesture, a touch and hold gesture, an area change gesture, a double-press gesture, and a double-tap gesture.
In a possible implementation, the preset gesture entered by the user may be a tap gesture. For example, in response to the operation 2 that the user taps the “Alipay payment code” widget displayed in the widget set in
It may be understood that the user usually frequently uses functions of some applications in the mobile phone in daily life. For example, for payment functions of different payment applications in the mobile phone, when purchasing a commodity or consuming in a restaurant, the user may need to use a payment function of “Alipay” in the mobile phone, to be specific, need to present a payment interface of “Alipay” to a merchant. When performing a transaction with another user, the user may alternatively need to use a payment collection or payment function of “WeChat” in the mobile phone, to be specific, need to display a payment collection or payment interface of “WeChat” to the another user. In this embodiment, by receiving the operation 1, the mobile phone switches the wallet icon to the widget set including a plurality of widgets. Therefore, a plurality of widgets can be quickly and simply added on the home screen of the mobile phone. This can help the user operate a widget on the home screen and quickly enter a corresponding application interface.
When space used to display the widget set is relatively small, in other words, when an area of the display region occupied by the widget set is relatively small, the widget set may not be able to simultaneously display all widgets in the widget set on the home screen of the mobile phone. To help the user preview or operate another widget that is not displayed in the widget set, in response to an operation 3 performed by the user on the widget set, the mobile phone may change a widget displayed in the widget set. In other words, the operation 3 is used to change a widget displayed in the widget set.
For example, as shown in
It should be noted that, when the widget set is displayed by using the AppWidgetHost container, a manner in which the mobile phone changes a widget displayed in the widget set includes but is not limited to: in response to a slide right operation performed by the user on a top-layer widget, displaying a slide-out animation effect of the top-layer widget, and displaying a widget of a next application at a top layer.
In the foregoing embodiment, an example in which the operation 3 is a slide right operation is used for description. It may be understood that the operation 3 is not limited in this embodiment of this application. For example, as shown in
It may be understood that, for a size of the widget set displayed on the home screen of the mobile phone, different users may have different requirements. Some users may hope that the widget set displayed on the home screen of the mobile phone can be as large as possible, so that the widget set can simultaneously display a plurality of widgets frequently used by the users. Some users may hope that the widget set displayed on the home screen of the mobile phone can be as small as possible, so as to prevent normal distribution of other application icons from being affected because the widget set occupies excessively large space on the home screen of the mobile phone. Therefore, in this embodiment, the mobile phone may switch the target icon to widget sets of different sizes based on different operations performed by the user on the target icon.
In some embodiments, after the mobile phone receives the operation 1 performed on the target icon, the mobile phone may determine the area of the widget set based on the operation 1, in other words, determine the area size of the display region of the widget set. When the mobile phone switches the target icon to the widget set, the mobile phone may switch the target icon to a widget set of a preset size based on the determined area of the widget set.
For example, as shown in
For another example, as shown in
The first threshold and the second threshold may be preset values. For example, assuming that the area corresponding to the single application icon on the home screen of the mobile phone is 1, the first threshold may be 4, and the second threshold may be 8.
In some possible implementations, a plurality of thresholds may be preset on the mobile phone. When the area of the frame obtained after the stretching reaches a corresponding threshold, the mobile phone may switch the target icon to a widget set of a corresponding size under the threshold. For example, when the area of the frame obtained after the stretching reaches 6, the mobile phone may switch the target icon to a “2×3” or “3×2” widget set; or when the area of the frame obtained after the stretching reaches 12, the mobile phone may switch the target icon to a “4×3” or “3×4” widget set. A threshold value and quantity are not limited in this embodiment of this application.
In other words, in this embodiment, after the user stretches the frame, the mobile phone may determine the area corresponding to the frame obtained after the stretching, so as to determine the size of the widget set based on the area of the frame, so that the mobile phone can switch the target icon to the widget set of the preset size.
In some embodiments, after the mobile phone receives the operation 1 performed on the target icon, the mobile phone may determine the area and a length-width ratio (that is, a ratio of a length to a width of the widget set) of the widget set based on the operation 1. When the mobile phone switches the target icon to the widget set, the mobile phone may switch the target icon to the widget set of the preset size based on the determined area and length-width ratio of the widget set.
For example, after the user stretches the frame of the target icon, when the area of the frame reaches 6 and the length-width ratio reaches 3/2, the mobile phone determines that the area of the widget set is 6 and the length-width ratio is 3/2, in other words, the mobile phone may switch the target icon to a “3×2” widget set. For another example, when the area of the frame reaches 8 and the length-width ratio reaches 4/2, the mobile phone determines that the area of the widget set is 8 and the length-width ratio is 4/2, in other words, the mobile phone may switch the target icon to a “4×2” widget set.
In other words, in this embodiment, after the user stretches the frame, the mobile phone may determine the area and the length-width ratio corresponding to the frame obtained after the stretching. When both the area and the length-width ratio of the frame meet a specific condition, the mobile phone switches the target icon to the widget set of the preset size.
It may be understood that, in some cases, after the user switches the target icon to the widget set, the user may need to switch the widget set back to the icon. For example, after the user newly installs another application on the mobile phone, when space on the home screen of the mobile phone is insufficient because the widget set occupies relatively large space on the home screen of the mobile phone, the user may need to switch the widget set to the icon that occupies relatively small space. For another example, when the user uses a widget in the widget set less frequently, the user may also need to switch the widget set to the icon. This ensures aesthetic appearance of the home screen of the mobile phone.
Therefore, in some embodiments, the user may perform an operation 4 on the widget set, and the mobile phone switches the widget set to the target icon in response to the operation 4. In other words, the operation 4 is used to switch the widget set to the target icon.
In some possible implementations, the operation 4 used to switch the widget set to the icon may be a touch and hold gesture operation and a scale down gesture operation. For example, as shown in
In some other possible implementations, the operation 4 used to switch the widget set to the icon may be a touch and hold gesture operation and a pinch gesture operation. For example, as shown in
In some cases, the user may need to change the size of the display region of the widget set. For example, when the widget set occupies relatively large space on the home screen of the mobile phone, the user may need to change the widget set to a relatively small shape. For another example, when the widget set can display a relatively small quantity of widgets, the user may need to change the widget set to a relatively large shape.
In some embodiments, the user may perform an operation 5 on the widget set, the mobile phone receives the operation 5 performed by the user on the widget set, and the mobile phone changes the size of the display region of the widget set, for example, changes a relatively small widget set to a relatively large widget set, or changes a relatively large widget set to a relatively small widget set. In other words, the operation 5 is used to change the size of the display region of the widget set.
In some possible implementations, the operation 5 used to change the size of the widget set may be a touch and hold gesture operation and a scale down gesture operation. For example, as shown in
It may be understood that the foregoing example is described by using the wallet icon as an example. However, an icon that can be switched to a widget set is not limited thereto, and may be an icon of an application of any type, for example, an icon corresponding to an application used to play music or an application used for communication.
For example, as shown in
It may be understood that, in a process of switching the target icon to the widget set, the mobile phone usually needs to first determine a plurality of widgets in the widget set. In some possible implementations, the mobile phone may automatically determine, based on the target icon, the plurality of widgets corresponding to the widget set, or the mobile phone may determine, based on user settings, the plurality of widgets corresponding to the widget set.
A manner in which the mobile phone automatically determines the plurality of widgets corresponding to the target icon includes but is not limited to the following plurality of manners:
For example, the wallet icon is displayed on the home screen of the mobile phone, “Wallet” corresponding to the wallet icon is associated with “Alipay” and “WeChat”, “Alipay” has the “Alipay payment code” widget, and “WeChat” has the “WeChat payment code” widget. In this case, the “Alipay payment code” widget and the “WeChat payment code” widget that are associated with “Wallet” may be determined based on the wallet icon. In other words, when the target icon is an icon of an application, the mobile phone may determine, based on the application corresponding to the target icon, a plurality of other applications associated with the application, and then determine a plurality of widgets corresponding to the plurality of other applications. The plurality of widgets are widgets corresponding to the widget set.
For another example, an icon of a folder is displayed on the home screen of the mobile phone, the folder includes “Alipay” and “WeChat”, “Alipay” has the “Alipay payment code” widget, and “WeChat” has the “WeChat payment code” widget. In this case, the “Alipay payment code” widget and the “WeChat payment code” widget that correspond to the applications in the folder may be determined based on the icon of the folder. In other words, when the target icon is an icon of a folder, the mobile phone first determines applications included in the folder, and then determines widgets corresponding to the applications included in the folder, so as to determine a plurality of widgets corresponding to the widget set.
For another example, the wallet icon is displayed on the home screen of the mobile phone, and “WeChat” and “Alipay” are installed on the mobile phone. In this case, the mobile phone may determine, based on the wallet icon, “WeChat” and “Alipay” that are of a same type as “Wallet”, and then determine the “Alipay payment code” widget and the “WeChat payment code” widget corresponding to the wallet icon. Alternatively, the music icon is displayed on the home screen of the mobile phone, and “Music 1” and “Music 2” are installed on the mobile phone. In this case, the mobile phone may determine, based on the music icon, “Music 1” and “Music 2” that are of a same type as “Music”, and then determine the “Music 1” widget and the “Music 2” widget that correspond to the music icon. In other words, when the target icon is an icon of an application, the mobile phone first determines a type (for example, a payment type, a music type, or a game type) of the application corresponding to the target icon, then determines other applications of a same type as the target icon in the mobile phone, and finally determines a plurality of widgets corresponding to the other applications. The plurality of widgets are widgets corresponding to the widget set.
A manner in which the mobile phone may determine, based on the user settings, the plurality of widgets corresponding to the widget set includes but is not limited to the following manners:
For example, as shown in
It should be noted that a case of determining the plurality of widgets corresponding to the widget set in this embodiment of this application includes but is not limited to the foregoing plurality of cases. This is not limited in this embodiment of this application.
In some embodiments, a widget in the widget set may display one or more components. The user may perform an operation on a component on the widget. In response to the operation performed by the user on the component on the widget, the mobile phone enters a specific interface in an application corresponding to the widget, or implement a corresponding function.
For example, as shown in
For another example, as shown in
In some embodiments, a widget in the widget set may display one or more components. The user may perform the operation 2 on an area other than a component displayed on the widget. In response to the operation 2 performed by the user on the area other than the component on the widget, the mobile phone enters a main interface in an application corresponding to the widget.
For example, as shown in
It may be understood that the foregoing embodiment is described by using an example in which the target icon is an icon of an application. However, an icon that can be switched to the widget set is not limited thereto. For example, the target icon may alternatively be an icon of a folder including a plurality of applications.
For example, as shown in
In a possible implementation, the folder may include a plurality of applications of a same type. As shown in
In another possible implementation, the folder may alternatively include a plurality of applications of different types. As shown in
In some embodiments, when a folder includes a plurality of applications of different types, the user may perform the foregoing operation 3 on the widget set, and in response to the operation 3 performed by the user on the widget set, the mobile phone changes a widget displayed in the widget set. In other words, the operation 3 may be used to change a widget displayed in the widget set. Specifically, refer to the descriptions corresponding to
In some embodiments, when a folder includes a plurality of applications of different types, the user may alternatively perform a different operation 6 on the widget set, to change a type of a widget displayed in the widget set. In other words, the mobile phone may receive the different operation 6 performed by the user on the widget set, and in response to the different operation 6 performed by the user on the widget set, the mobile phone changes a widget displayed in the widget set. A type of a changed widget corresponds to a gesture operation. The operation 6 is used to change a category of a widget displayed in the widget set.
For example, as shown in
As shown in
In this embodiment, a gesture operation used to change the widget displayed in the widget set may alternatively be another gesture operation, for example, an oblique slide gesture operation. This embodiment imposes no limitation on the gesture operation. A correspondence between a gesture operation and a type of a changed widget is not limited in this embodiment either. A slide left or right gesture operation may correspond to a payment-type widget, or a slide up or down gesture operation may correspond to a payment-type widget, or an oblique slide gesture operation may correspond to a payment-type widget, or the like.
It should be noted that, when a widget set corresponding to an icon of a folder supports both the operation 3 and the operation 6, to avoid confusion, a gesture operation that triggers to change a widget displayed in the widget set and a gesture operation used to trigger to change a category of a widget displayed in the widget set may be set to different gesture operations. In other words, the operation 3 and the operation 6 may be different operations. For example, if the operation 3 may be a slide left or right operation, the operation 6 may be a slide up or down operation; or if the operation 3 is a slide up or down operation, the operation 6 is a slide left or right operation.
In some embodiments, when a folder includes a plurality of widgets of different types, the mobile phone may adjust, based on a quantity of widgets of each of the different types, a size of a widget displayed in the widget set.
For example, as shown in
Specifically, the mobile phone may adjust, based on the quantity of widgets of each of the different types, the size of the widget displayed in the widget set, so that the widget set can display widgets of a same type as many as possible. For example, when the home screen of the mobile phone displays a “4×2” widget set, the mobile phone may adjust a widget size, so that the widget set can simultaneously display two or three widgets of a same type. For example, when two or multiples of two widgets are of a same type, the mobile phone adjusts a widget size to “2×2”, that is, simultaneously displays two widgets of a same type in the widget set. For another example, when three or multiples of three widgets are of a same type, the mobile phone adjusts a widget size to “1.3×2”, that is, simultaneously displays three widgets of a same type in the widget set.
During actual application, a manner of adjusting a size of a widget in a widget set based on a quantity of widgets may alternatively be correspondingly set according to an actual requirement, and the manner of adjusting a widget size is not limited in this embodiment.
In some embodiments, after the mobile phone switches the target icon to the widget set, a sequence of widgets displayed in the widget set may be adjusted. The user may perform an operation 7 on the target icon. The mobile phone receives the operation 7 performed by the user on the target icon, and adjusts a widget display sequence in the widget set in response to the operation 7 performed by the user on the target icon. In other words, the operation 7 is used to adjust the display sequence of widgets in the widget set.
For example, as shown in
For example, the user may select to arrange, in a use sequence, the widgets displayed in the widget set. To be specific, a display sequence of the last widget used by the user in the widget set is first, a display sequence of the last but one widget used by the user in the widget set is second, and so on. For another example, the user may select to arrange, in a use frequency, the widgets displayed in the widget set. To be specific, within a specific time range (for example, one day or one week), a display sequence of a widget used by the user with the highest use frequency in the widget set is first, a display sequence of a widget used by the user with the second highest use frequency in the widget set is second, and so on. For another example, the user may customize a widget display sequence in the widget set according to an actual requirement of the user.
1901: An electronic device displays a target icon.
For example, the electronic device may display the target icon on a home screen, or display the target icon on an interface such as a control center.
1902: The electronic device receives a first operation performed on the target icon.
For example, the first operation may be the operation 1 in the foregoing embodiment. That the electronic device receives a first operation performed on the target icon may specifically include: The electronic device receives a touch and hold operation performed on the target icon, the electronic device displays a frame at an edge of the target icon in response to the touch and hold operation, and the electronic device performs a stretch operation on the frame.
1903: The electronic device switches the target icon to a widget set in response to the first operation, where the widget set includes a plurality of widgets of a plurality of applications.
The target icon corresponds to the plurality of applications, and each of the plurality of applications corresponds to a widget. Therefore, the plurality of widgets of the plurality of applications corresponding to the target icon may be determined based on the target icon.
1904: The electronic device displays the widget set.
In an optional embodiment, after the electronic device switches the target icon to the widget set, the method further includes: The electronic device receives a second operation performed on the widget set. In response to the second operation, the electronic device changes a widget displayed in the widget set. For example, the second operation may be specifically the foregoing operation 3.
In an optional embodiment, the target icon is an icon of a first application, and the plurality of applications include an application associated with the first application. In other words, the first application may be associated with a plurality of applications. In this case, when the electronic device switches the icon of the first application to a widget set, a plurality of widgets included in the widget set are widgets of the plurality of applications associated with the first application.
In an optional embodiment, the plurality of applications include the first application. In other words, the plurality of widgets included in the widget set further include a widget of the first application. The first application may be associated with an application of a same type as the first application in the electronic device. For example, if the first application is a payment-type application, the first application may be associated with another payment-type application in the electronic device.
In an optional embodiment, the target icon is an icon of a folder, and the plurality of applications are applications included in the folder. In other words, the folder includes a plurality of applications. In this case, when the electronic device switches the icon of the folder to a widget set, a plurality of widgets included in the widget set are widgets of the plurality of applications in the folder. For example, the folder may include an application A and an application B. In this case, when the electronic device may switch the icon of the folder to the widget set, the plurality of widgets included in the widget set are a widget of the application A and a widget of the application B.
In an optional embodiment, the plurality of widgets include a first widget, a second widget, and a third widget. That the electronic device changes a widget displayed in the widget set includes: If the second operation is a slide operation in a first direction, the electronic device changes the first widget displayed in the widget set to the second widget. The second widget and the first widget are of a same type. Alternatively, if the second operation is a slide operation in a second direction, the electronic device changes the first widget displayed in the widget set to the third widget. The third widget and the first widget are of different types. The first direction and the second direction are different directions.
In an optional embodiment, after the electronic device switches the target icon to the widget set, the method may further include: The electronic device receives a third operation performed on a target widget. The target widget is a widget displayed in the widget set. In response to the third operation, the electronic device displays an application interface corresponding to the target widget. For example, the third operation may be specifically the foregoing operation 2. The third operation may be specifically a tap operation. In other words, in response to the tap operation performed on the target widget displayed in the widget set, the electronic device may display the application interface corresponding to the target widget.
In an optional embodiment, after the electronic device switches the target icon to the widget set, the method may further include: The electronic device receives a fourth operation performed on the widget set, and the electronic device switches the widget set to the target icon in response to the fourth operation. For example, the fourth operation may be specifically the foregoing operation 4. Specifically, the fourth operation may be a touch and hold operation and a scale down gesture operation. The electronic device receives a touch and hold gesture operation performed on the widget set, the electronic device displays a frame at an edge of the widget set in response to the touch and hold gesture operation, the electronic device receives a scale down gesture operation performed on the frame, and the electronic device switches the widget set to the target icon in response to the scale down gesture operation.
In an optional embodiment, after the electronic device switches the target icon to the widget set, the method may further include: The electronic device receives a fifth operation performed on the widget set, and the electronic device changes a size of a display region of the widget set in response to the fifth operation, for example, changes a widget set with a relatively small display region to a widget set with a relatively large display region, or changes a widget set with a relatively large display region to a widget set with a relatively small display region. For example, the fifth operation may be specifically the foregoing operation 5.
It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, refer to a corresponding process in the foregoing method embodiments. Details are not described herein again.
In several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in another manner. For example, the described apparatus embodiment is merely an example. For example, division into the units is merely logical function division and may be other division during actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
The units described as separate parts may or may not be physically separate. Parts displayed as units may or may not be physical units, to be specific, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected according to an actual requirement to achieve the objectives of the solutions of embodiments.
In addition, function units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in a form of hardware, or may be implemented in a form of a software function unit.
When the integrated unit is implemented in the form of a software function unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of this application essentially, or the part contributing to the conventional technology, or all or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in embodiments of this application. The foregoing storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disc.
Number | Date | Country | Kind |
---|---|---|---|
202010058434.2 | Jan 2020 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2021/072026 | 1/15/2021 | WO |