This application claims priority to Chinese Patent Application No. 202210881397.4, filed with the China National Intellectual Property Administration on Jul. 26, 2022 and entitled “CARD DISPLAY METHOD AND TERMINAL DEVICE”, which is incorporated herein by reference in its entirety.
This application relates to the field of electronic technologies, and in particular, to a card display method and a terminal device.
Messages such as a new reminder or a notification message always appear in various applications (application, APP) installed on a terminal device. A means used by a user to view these notification messages and reminders is relatively simple, and is generally: viewing by using a leftmost home screen of the terminal device or viewing by tapping to enter a specific APP.
Appearance of a service card enriches ways used by the user to view messages such as APP notification messages and reminders. A card is a new message display technology, and is now widely applied to various terminal devices, to provide rich information display and meet a user requirement. However, currently, a manner of setting an APP application as a card is relatively cumbersome, and affects user experience. In addition, one card can display information about only one APP.
This application relates to the field of electronic technologies, and in particular, to a card display method and a terminal device. In the card display method in this application, after a user adds a card of a first application to a desktop of an electronic device, the card of the first application is displayed on the desktop of the electronic device, and the user may drag an icon or a card of another application to a display region corresponding to the card of the first application and hover for specified duration, to add the card of the another application. In this method, after adding a card of an application, the user only needs to drag an icon or a card of another application to a card display region corresponding to the application, to add the another application as a card, thereby eliminating a series of operations performed through system settings each time a card is added, and improving user experience.
Solutions of this application are described below.
According to a first aspect, this application provides a card display method, applied to an electronic device. The method includes: displaying a first card of a first application in a first display region of the electronic device; detecting a generation instruction for generating a second card of a second application; and using the first display region as a display region for both the second card of the second application and the first card of the first application.
In some implementations, the first application may be an application such as a video application, a note-taking application, or a food ordering application in the following descriptions. The second application is different from the first application. In some implementations, the electronic device may be a terminal device such as a smartphone or a tablet computer. This is not limited in this application.
In other words, the first card of the first application is displayed in the first display region, and then, after detecting the generation instruction for generating the second card of the second application, the electronic device uses a display region of the first card of the first application as the display region for both the second card of the second application and the first card of the first application. In addition, the second card of the second application does not separately occupy space of a desktop of the electronic device, but is displayed in the first display region together with the first card of the first application.
In some implementations, after the second card of the second application is generated, the first card of the first application may alternatively still be displayed in the first display region. In some implementations, after the second card of the second application is generated, the second card of the second application may be displayed in the first display region, that is, the second card covers the first card for display. This is not limited in this application.
In this manner, a newly-added card of an application does not occupy the space of the desktop of the electronic device, and does not apply a layout of the desktop of the electronic device, and further does not affect user experience.
With reference to the first aspect, in a possible implementation of the first aspect, the method further includes: detecting the generation instruction for generating the second card of the second application, and displaying the second card in the first display region, where the second card covers the first card for display.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the first card is displayed in the first display region in a first display size, and a size of the first display region is the same as the first display size; and the method further includes: detecting the generation instruction for generating the second card of the second application; obtaining card data of the second card, where the card data of the second card includes at least one display size corresponding to the second card; determining whether the at least one display size of the second card includes the first display size; and if the at least one display size of the card of the second application includes the first display size, displaying the second card of the second application in the first display region in the first display size.
It may be understood that a card of each application has a display size supported by the card, for example, 1000 pixels×500 pixels, and 500 pixels×500 pixels. Therefore, the electronic device displays the card in the display size supported by the card.
Therefore, in some implementations, the first card is displayed in the first display region in the first display size supported by the first card, and the size of the first display region is the same as the first display size. Then, when detecting the generation instruction for generating the second card of the second application, the electronic device obtains the card data of the second card, to obtain the at least one display size supported by the second card. Then, it is determined whether the at least one display size supported by the second card includes the first display size, that is, it is determined whether the second card can be displayed in the first display size. If the second card can be displayed in the first display size, the card of the second application is displayed in the first display region in the first display size. It may be understood that in this case, the second card of the second application covers the first card of the first application for display.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, there is correspondingly a first control in the first display region, and the first control is configured to control, according to a user instruction, to switch a card displayed in the first display region.
In other words, to facilitate selection, by the user based on a requirement of the user, of the card displayed in the first display region, there is correspondingly the first control in the first display region, and the user may control, by using the first control, to switch the card displayed in the first display region. For example, if the user wants to view the first card of the first application, the user may select, by using the first control, the card of the first application for display.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the method further includes: detecting the instruction for generating the second card of the second application; determining whether a quantity of cards included in the first display region exceeds a preset quantity; and if the quantity of cards included in the first display region is less than the preset quantity, using the first display region as the display region for both the second card of the second application and the first card of the first application.
It may be understood that, an excessively large quantity of cards included in the first display region are unfavorable to viewing a card of a corresponding application by the user. Therefore, in some implementations, it is necessary to set an upper limit for a quantity of cards that can be accommodated in the first display region. To be specific, after detecting the instruction for generating the second card of the second application, the electronic device needs to determine whether the first display region can continue to accommodate a new card. When the quantity of cards included in the first display region is less than the preset quantity; the first display region is used as the display region for both the second card of the second application and the first card of the first application. If the quantity of cards included in the first display region is greater than the preset quantity; the first display region is no longer used as the display region for both the second card of the second application and the first card of the first application. The preset quantity is an empirical value or an experimental value, and a value of the preset quantity may be, for example, 10. This is not limited in this application.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the generation instruction is generated after an operation of moving an icon or a card of the second application to the first display region is detected. In other words, in some implementations, the generation instruction for generating the second card of the second application needs to be generated after the operation of moving the icon or the card of the second application to the first display region is detected.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the generation instruction is generated after an operation of moving an icon or a card of the second application to a preset region corresponding to the first display region is detected. In other words, in some implementations, the generation instruction may be generated after the icon or the card of the second application is moved to the first display region, or may be generated after the icon or the card of the second application is moved to the preset region corresponding to the first display region, for example, the generation instruction is generated after the icon or the card of the second application is moved to a place close to the first display region. This is not limited in this application.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the detecting a generation instruction for generating a second card of a second application includes: detecting the generation instruction when it is detected that time of stay of the icon or the card corresponding to the second application in the first display region or the preset region corresponding to the first display region exceeds first preset duration.
In other words, to avoid mis-generation of the second card of the second application, for example, the user transitorily moves the icon or the card of the second application to the first display region or the preset region corresponding to the first display region when adjusting a location of the icon or the card of the second application, in an implementation of this application, after it is detected that the icon or the card corresponding to the second application is moved to the first display region or the preset region corresponding to the first display region, it is further determined whether time of stay of the icon or the card corresponding to the second application in the first display region or the preset region corresponding to the first display region exceeds the first preset duration. When the time of stay of the icon or the card corresponding to the second application in the first display region or the preset region corresponding to the first display region exceeds the first preset duration, it is determined that the generation instruction for the second card of the second application is detected.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, an Android operating system is deployed on the electronic device, and the Android system of the electronic device includes a system program and the second application that are located at an application layer, and the system program is used to: in response to the generation instruction for generating the second card of the second application, obtain card data of the second card from the second application, and when the at least one display size of the second card of the second application includes the first display size, control the electronic device to display the card of the second application in the first display region in the first display size.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the system program is further used to: detect the instruction for generating the second card of the second application, determine whether a quantity of cards included in the first display region exceeds a preset quantity; and obtain card data of the second card from the second application when the quantity of cards included in the first display region is less than the preset quantity.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the generation instruction is generated by the system program after the operation of moving the icon or the card of the second application to the first display region is detected.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the generation instruction is generated by the system program after the operation of moving the icon or the card of the second application to the preset region corresponding to the first display region is detected.
With reference to the first aspect and the foregoing possible implementations, in a possible implementation, the generation instruction is generated when it is detected that the time of stay of the icon or the card corresponding to the second application in the first display region or the preset region corresponding to the first display region exceeds the first preset duration.
According to a second aspect, this application provides a card display apparatus, including a display module and a processing module. The processing module is configured to: detect a generation instruction for generating a second card of a second application, and use a first display region for displaying a first card of a first application as a display region for both the second card of the second application and the first card of the first application.
The display module is configured to display the first card of the first application in the first display region.
In some implementations, the processing module is further configured to: detect the generation instruction for generating the second card of the second application, and control the display module to display the second card in the first display region, where the second card covers the first card for display.
In some other implementations, the first card is displayed in the first display region in a first display size, and a size of the first display region is the same as the first display size; and the processing module is further configured to: detect the generation instruction for generating the second card of the second application; then, obtain card data of the second card, where the card data of the second card includes at least one display size corresponding to the second card; determine whether the at least one display size of the second card includes the first display size; and if the at least one display size of the card of the second application includes the first display size, control the display module to display the second card of the second application in the first display region in the first display size.
In some implementations, there is correspondingly a first control in the first display region, and the first control is configured to control, according to a user instruction, to switch a card displayed in the first display region. The user instruction includes: The user switches the card in the first display region in a manner such as voice or a preset gesture. For example, the user slides downward, upward, leftward, or rightward by using an air gesture, to switch the card displayed in the first display region.
In some implementations, the processing module is further configured to: detect the instruction for generating the second card of the second application; determine whether a quantity of cards included in the first display region exceeds a preset quantity; and if the quantity of cards included in the first display region is less than the preset quantity; use the first display region as the display region for both the second card of the second application and the first card of the first application.
In some implementations, the generation instruction is generated after an operation of moving an icon or a card of the second application to the first display region is detected. In some other implementations, the generation instruction is generated after an operation of moving an icon or a card of the second application to a preset region corresponding to the first display region is detected.
In some implementations, the processing module detects the generation instruction when detecting that time of stay of the icon or the card corresponding to the second application in the first display region or the preset region corresponding to the first display region exceeds first preset duration.
According to a third aspect, this application provides an electronic device, including one or more processors and one or more memories. The one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device is enabled to perform the method according to any implementation of the first aspect.
According to a fourth aspect, this application provides a computer-readable storage medium. The storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to perform the method according to any implementation of the first aspect.
According to a fifth aspect, an embodiment of this application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to perform the method according to any implementation of the first aspect.
It may be understood that, for beneficial effects of the second aspect to the fifth aspect, refer to related descriptions in the first aspect. Details are not described herein again.
This application provides a card display method and a terminal device. Various aspects of illustrative embodiments are described below by using terms commonly used by persons skilled in the art. In the descriptions of embodiments of this application, “/” means “or” unless otherwise specified. For example, A/B may represent A or B. In this specification, “and/or” is merely an association relationship for describing associated objects, and represents that three relationships may exist. For example, A and/or B may represent 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.
Terms “first”, “second”, and “third” below are used for description only; and cannot be understood as indicating or implying relative importance or implicitly indicating a quantity of indicated technical features. Therefore, a feature defined by “first”, “second”, or “third” may explicitly or implicitly include one or more such features.
A card display method provided in embodiments of this application may be applied to a terminal device such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (augmented reality; AR)/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 terminal device is not limited in embodiments of this application.
As described above, a user usually views a message of an APP by using a leftmost home screen of the terminal device or taps an APP to view a message of the APP. For example, as shown in
It may be understood that information about the weather application 106 displayed on the leftmost home screen 20 of the mobile phone 1 and the first interface 17 of the weather application 106 is merely an example. In another implementation, more weather-related information may be further displayed. This is not limited in this application.
It may be understood that the applications displayed on the desktop 10 are also examples. In another implementation, there may alternatively be more or fewer other applications on the desktop 10. This is not limited in this application.
It may be learned that the foregoing operation manner is simplex and boring. Therefore, in some implementations, the user may display an APP message by using a service card. The service card (referred to as a card below) is a new message display manner. After the user adds a card of an APP application, a message of the APP is displayed to the user in a form of a card.
For example, as shown in
In such a solution, rich messages of an application can be flexibly displayed. However, first, steps of adding a card are cumbersome. The user needs to add, as a card by using a system settings option, an application that the user wants to add as a card. If the user wants to add cards of a plurality of applications, the user needs to add each application as a card by using the system settings option.
For example, as shown in
Second, each card can display a message of only one application; in other words, a card and an application are in a one-to-one relationship. If the user wants to display messages of more applications on the desktop 10 in a form of a card, the user needs to add cards of a plurality of applications. This increases a quantity of cards and affects display of cards. In addition, to display more application messages, a size of the card is usually greater than a size of an application icon. Therefore, while the quantity of cards is increased, more space of the desktop 10 is undoubtedly occupied, an overall layout of the desktop 10 is affected, and sense of beauty of the desktop 10 is affected.
For another example, as shown in
In some implementations, a display region corresponding to the card of the first application may accommodate a preset quantity of cards. The preset quantity is an empirical value or an experimental value, and may be set by the user based on a requirement; or the preset quantity may be a fixed value, and a value of the preset quantity may be 10. This is not limited in this application.
In addition, the first card displayed to the user in the display region corresponding to the card of the first application is a card corresponding to a message of an application displayed on the desktop, and may be selected by the user based on a requirement from cards in the display region corresponding to the card of the first application, and a display sequence of the cards in the display region may also be adjusted by the user based on a requirement. The first application includes but is not limited to applications such as the video application 02, the food ordering application 103, the gallery application 104, the game application 105, the weather application 106, the review application 107, the chat application 108, Settings 109, and Clock 110. Another application is an application different from the first application.
For example, as shown in
In some implementations, when the user does not adjust a display sequence of the card corresponding to the weather application 106 and the card of the note-taking application 101 or a card of another application (for example, the card of the video application 102 or the card of the food ordering application 103) in the display region 11a, as shown in
In some implementations, the user may slide upward or downward by using a control 13 to switch a card displayed in the display region, to choose to view a message of the card 11 corresponding to the note-taking application 101. This is not limited in this application.
In some other implementations, when the user does not adjust a display sequence of the card corresponding to the weather application 106 and the card of the note-taking application 101 or a card of another application in the display region 11a, the newly-added card 12 of the weather application 106 may alternatively be displayed below an existing card; in other words, the card 11 of the note-taking application 101 is still displayed in the display region 11a.
In the foregoing method, after adding a card of an application, the user only needs to drag an icon or a card of another application to a card display region corresponding to the application, to add the another application as a card, thereby eliminating a series of operations performed through system settings each time a card is added, and improving user experience.
In addition, if all newly-added cards are displayed in a display region corresponding to an existing card, and an overall layout of the desktop 10 is not affected due to an increase in a quantity of cards, thereby saving space of the desktop 10, ensuring sense of beauty of the layout of the desktop 10, and improving user experience.
It may be understood that the card display method in this application may be applied to a terminal device such as a smartphone, a tablet computer, or an intelligent wearable device with no limitation. For ease of description, a mobile phone is still used as the terminal device 1 to provide descriptions with reference to the accompanying drawings.
The application layer 01 may include a series of application packages. In some implementations of this application, programs mainly included in the application layer 01 are classified into an application 012 and a system program 011. The application 012 is each application installed on a desktop of the mobile phone 1, and the system program 011 is a system program used to manage each application on the desktop of the mobile phone 1, and is a system that controls and coordinates the mobile phone 1 and an external device (for example, an input/output device) of the mobile phone 1 and supports application development and running on the mobile phone 1. A main function of the system program 011 is to schedule, monitor, and maintain a system of the mobile phone 1, and manage various independent hardware in the system of the mobile phone 1, so that they can work in a coordinated manner. In some implementations, the system program 011 may be an operating system installed on the mobile phone 1, for example, an Android (android) operating system or a Harmony operating system.
In some implementations of this application, the system program 011 is used to: add a card of an application according to a user instruction, and determine, according to the user instruction, a display manner of the card corresponding to the application. In some implementations, a display manner of a card corresponding to an application includes a display size of the card and a display theme of the card (for example, a daytime theme or a night theme). This is not limited in this application.
In some implementations of this application, the system program 011 is further used to: obtain card data corresponding to an application, determine a display size that can be supported by the card corresponding to the application, and display the card in the display size supported by the card corresponding to the application. Details are described below with reference to
The application 012 may include applications installed on the mobile phone 1, such as a video application 102, a food ordering application 103, a gallery application 104, a game application 105, a weather application 106, a review application 107, a chat application 108, Settings 109, and Clock 110. Examples are not listed one by one in this embodiment of this application.
The application framework layer 02 provides an application programming interface (application programming interface, API) and a programming framework for an application at the application layer 01. The application framework layer 02 includes some predefined functions. As shown in
The Android runtime 035 includes a kernel library and a virtual machine. The Android runtime 035 is responsible for scheduling and management of the Android system. The kernel library includes two parts: a functional function that needs to be invoked by a java language, and a kernel library of Android.
The application layer 01 and the application framework layer 02 run in the virtual machine. The virtual machine executes java files at the application layer 01 and the application framework layer 02 as binary files. The virtual machine is configured to perform operations such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
The system library may include a plurality of functional modules, for example, a surface manager 031 (surface manager or surface flinger), a media library 034 (media libraries), a three-dimensional graphics processing library 032 (for example, OpenGL ES), and a two-dimensional graphics engine 033 (for example, SGL).
The surface manager 031 is configured to manage a display subsystem, and provide fusion of two-dimensional and three-dimensional layers for a plurality of applications. The media library 034 supports playback and recording in a plurality of common audio and video formats, static image files, and the like. The media library may support a plurality of audio and video coding formats, for example, MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The three-dimensional graphics processing library 032 is used to implement three-dimensional graphics drawing, image rendering, composition, layer processing, and the like. The two-dimensional graphics engine 033 is a drawing engine for two-dimensional drawing.
The kernel layer 04 is a layer between hardware and software. The kernel layer 04 includes at least a display driver 041, a camera driver 042, an audio driver 043, and a sensor driver 044.
A physical layer (physic, PHY) may be included below the kernel layer 04, and the physical layer may provide a transmission medium and an interconnection channel for data communication inside a device or between devices, to provide a reliable environment for data transmission. The physical layer may be understood as a transport layer that provides a “signal and medium”.
It may be understood that the foregoing schematic diagram of the layered architecture of the software structure of the mobile phone 1 is merely an example. In another implementation, the layered architecture of the software structure of the mobile phone 1 may further include more or fewer layers, or a layered structure formed in another manner. This is not limited in this application.
An interaction process of some modules or layer structures in
Specifically, as shown in
501: The mobile phone 1 invokes, in response to a first operation of adding a card of a first application, a system program 011 to send information about the added card to the first application.
It should be noted that, when a user creates the card of the first application, the first operation means that the user adds the card of the first application through system settings. For details, refer to the descriptions in
502: The mobile phone 1 invokes the system program 011 to obtain first card data of the first application from an application 012.
In some implementations, the card data includes data such as a display size that can be supported by the card, a display theme of the card, and a display location of the card. It may be understood that for operations of adding cards for different applications, the mobile phone 1 invokes the system program 011 to obtain card data of corresponding applications from different applications 012. For example, if the first operation is to add a card for the video application 102, the system program 011 obtains card data of the video application 102 from the video application 102; and if the first operation is to add a card for the food ordering application 103, the system 011 obtains card data of the food ordering application 103 from the food ordering application 103.
For example,
503: The mobile phone 1 invokes the system program 011 to control the mobile phone 1 to display the card of the first application in a first size.
In some implementations, the mobile phone 1 invokes the system program 011 to control the mobile phone 1 to display the card of the first application in the first size according to a user instruction. It may be understood that, when the user adds the card of the first application through system settings, the user may select any display size based on a display size supported by the card, to display the card of the first application.
For example, the first application is the note-taking application 101. If the user chooses to display a card of the note-taking application 101 in the display size with the length-width ratio 4×2, as shown in
504: The mobile phone 1 invokes, in response to a second operation of adding a card of a second application, the system program 011 to send information about the added card to the second application.
In some implementations, the second application is different from the first application, and the second application includes but is not limited to applications such as the video application 102, the food ordering application 103, the gallery application 104, the game application 105, the weather application 106, the review application 107, the chat application 108, Settings 109, and Clock 110 that are shown in
In some implementations, the second operation is an operation in which the user adds an application card without using a manner of adding the application card through system settings, for example, an operation in which the user adds the card of the second application by dragging an icon of the second application to a display region of the card of the first application.
In some implementations, the second operation may alternatively be an operation in which the user adds an application card through system settings and then drags the card to a display region of the card of the first application to accommodate the card of the second application in the display region of the card of the first application. This is not limited in this application.
In some implementations, the display region of the card of the first application is a region covered by the card after the card is displayed in any display size. For example, as shown in
In some implementations, when detecting that the user drags an icon of the second application to the region S1 and stays in the region S1 for first preset duration, the mobile phone 1 may determine that it is detected that the user has an obvious hovering action in the region S1. The first preset duration is an empirical value or an experimental value, for example, a value of the first preset duration may be 3 seconds. This is not limited in this application.
It may be understood that, in some implementations, the user may alternatively drag the icon of the second application to a preset region corresponding to a location of the card of the first application, and after detecting that the user drags the icon of the second application to the preset region, the mobile phone 1 determines that the second operation of adding the card of the second application by the user is detected. For example, as shown in
Similarly, in some implementations, after detecting that the user drags the icon of the second application to the preset region S2 and detecting that the user has an obvious hovering action, the mobile phone 1 determines that the second operation of adding the second application by the user is detected, and then invokes the system program 011 to control to deform the icon of the second application, to indicate that the user is currently performing an operation of adding a card. This is not limited in this application.
In some other implementations, the second application may alternatively be a card corresponding to an application. In other words, it may be understood that the card is also an application. When the second application is a card, the second operation means that the user drags a card of an application to a display region of the existing card of the first application, that is, accommodates and manages cards in the interface 10. It may be understood that, when the second application is an application such as a non-card application, the user may add the second application as a card by dragging the icon of the second application to the display region of the card of the first application, and when the second application is a card application, the user may accommodate the second application in the display region of the existing card of the first application by dragging the card to the display region of the card of the first application. For example, as shown in
505: The system program 011 determines whether a quantity of cards in the display region is less than a preset quantity.
In some implementations, after detecting the second operation of adding the card of the second application by the user, the system program 011 needs to determine whether the display region of the card of the first application can continue to accommodate the card of the second application that is currently added by the user, that is, determine whether the quantity of cards in the display region exceeds the preset quantity. In some implementations, the preset quantity is an empirical value or an experimental value, and may be set by research and development personnel based on a requirement. For example, a value of the preset quantity may be 10. In some other implementations, the preset quantity may alternatively be set by the user through system settings based on a requirement. For example, the user may set the preset quantity to 5.
In still other implementations, the user may separately set different preset quantities for display regions of different types of cards based on requirements. For example, the user may add all chat applications in a display region (for example, a display region corresponding to a card of the chat application 108) as cards, and if three chat applications are installed on the mobile phone 1, the user may set the preset quantity to 3 (or greater than 3). For another example, the user may alternatively add commonly used APPs to a display region, and the preset quantity is also set based on a quantity of commonly used APPs of the user. This is not limited in this application.
If the quantity of cards in the display region is already equal to or even greater than the preset quantity; it indicates that the display region cannot accommodate a new card, and a current process of adding the card of the second application ends. In some implementations, when it is determined that the quantity of cards in the display region is already equal to or even greater than the preset quantity; the mobile phone 1 may display corresponding prompt information, to prompt the user that a quantity of cards that can be accommodated in the current display region has exceeded the preset quantity.
For example, as shown in
If the quantity of cards in the display region is less than the preset quantity, it indicates that the display region can further accommodate a new card. In this case, 506 is performed.
506: When the quantity of cards in the display region is less than the preset quantity, the mobile phone 1 invokes the system program 011 to obtain second card data of the second application from the application 012.
When determining that the quantity of cards in the display region does not exceed the preset quantity; the mobile phone 10 invokes the system program 011 to obtain the card data of the second application from the application 012. For details, refer to the foregoing descriptions of 502. Details are not described herein again.
507: The system program 011 determines whether the card of the second application can be displayed in the first size. If yes, 508 is performed, and the system program 011 displays the card of the second application in the first size. If no, a current operation procedure of adding the card of the second application ends.
It may be understood that display sizes that can be supported by cards of applications are different. Therefore, whether a display size supported by the card of the second application that is to be added by the user includes the first size needs to be determined, that is, whether the card of the second application can be displayed in the first size.
If the card of the second application does not support the first size, the current process of adding the card of the second application ends.
In some implementations, when determining that the card of the second application does not support the first size, the mobile phone 1 may also display corresponding prompt information, to prompt the user that the card of the second application does not support the first size and cannot be displayed in the first size.
For example, as shown in
If the card of the second application can be displayed in the first size, 508 is performed.
508: The system program 011 displays the card of the second application in the first size.
For example, the second application is the weather application 106. As shown in
It should be noted that, generally, after the user adds a card of an application, an icon of the application is still displayed in the interface 10. For example, as shown in
However, when the second application is a card, a purpose of dragging the card by the user to the display region of the card of the first application is to accommodate the card in the existing display region, to save space of the interface 10. In this case, after the user drags the second application to the display region, the icon of the application corresponding to the card is no longer displayed in the interface 10, and a location of the icon of the application corresponding to the card is automatically filled by an icon of another application, for example, as shown in
In some implementations, after the user drags the card to the display region of the card of the first application, a card corresponding to an original application in the interface 10 may also continue to be displayed. For example, as shown in
509: The system program 011 detects a user instruction for adjusting a display sequence of cards, and displays the cards in the card sequence adjusted by the user.
In some implementations, the user may alternatively adjust the display sequence of the cards in the display region based on a requirement. For example, as shown in
In some other implementations, if the user does not adjust the display sequence of the cards in the display region, a first card displayed in the display region is, by default, a card newly added by the user. For example, it can be learned by comparing
In the foregoing method, when adding a card of an application, the user does not need to add the card of the application through system settings each time, and only needs to drag, after creating a new card for the first time, an icon of another application or a card of another application to a location of the card created for the first time, to add the card of the another application. In addition, the newly-added card is accommodated in the display region of the card of the first application, to reduce space occupied by the card, and ensure that a layout of the interface 10 is not affected by an increase in a quantity of cards.
In some implementations of this application, after a quantity of cards in the display region of the card of the first application exceeds a specific value, the user needs to continuously slide, by using the control 13, to a card that the user wants to view; instead of viewing a message of a related application in a card manner. Therefore, when the user adds a card to the display region, it is necessary to set an upper limit for a quantity of cards that can be accommodated in the display region. When the quantity of cards in the display region is equal to the upper limit, the user is no longer allowed to continue to add a card to the display region, to ensure convenience of a manner in which the user views an application message by using the display region. However, if necessary; the user may alternatively not limit the quantity of cards that can be accommodated in the display region, that is, in the foregoing interaction process, 505 may be omitted. This is not limited in this application.
In some implementations of this application, the user may further combine display regions of cards corresponding to different applications, to quickly organize cards on the desktop 10. However, it should be understood that, before the display regions of the cards corresponding to the different applications are combined, it is still necessary to determine whether sizes of the display regions of the cards corresponding to the different applications are the same. When the sizes of the display regions of the cards corresponding to the different applications are the same, the user may combine display regions of cards corresponding to two applications by moving a display region of a card corresponding to an application to a display region of a card corresponding to the other application. For a specific manner, refer to 501 to 509. Details are not described herein again.
It may be understood that, in some implementations, after the card or the icon of the second application is dragged to the display region of the card of the first application for display, the card or the icon of the second application is displayed in the display size of the card of the first application. In addition, if the user drags the card of the second application that is already in the display region of the card of the first application out of the display region, the card of the second application is still displayed on the desktop 10 in the display size of the card of the first application. A display location of the card of the second application may be determined by a location dragged to by the user, or the card of the second application may be displayed below the display region of the card of the first application. This is not limited in this application.
For example, as shown in
When moving a card displayed in the display region of the card of the first application, the user may want to adjust a display location of the display region of the card of the first application. Therefore, to determine whether the user is to move the display location of the display region of the card of the first application, in some other implementations, it may be further determined whether duration of pressing or tapping the card in the display region of the card of the first application by the user exceeds the second preset duration. If the duration of pressing or tapping the card in the display region of the card of the first application by the user exceeds the second preset duration, it indicates that the user does not want to adjust the display location of the display region of the card of the first application, but wants to remove the card from the display region (that is, edit the card). In this case, the display region enters an editing state shown in
As shown in
The display module 1320 is configured to display the first card of the first application in the first display region.
In some implementations, the processing module 1310 is further configured to: detect the generation instruction for generating the second card of the second application, and control the display module 1320 to display the second card in the first display region, where the second card covers the first card for display.
In some other implementations, the first card is displayed in the first display region in a first display size, and a size of the first display region is the same as the first display size; and the processing module 1310 is further configured to: detect the generation instruction for generating the second card of the second application; then, obtain card data of the second card, where the card data of the second card includes at least one display size corresponding to the second card; determine whether the at least one display size of the second card includes the first display size; and if the at least one display size of the card of the second application includes the first display size, control the display module 1320 to display the second card of the second application in the first display region in the first display size.
In some implementations, there is correspondingly a first control in the first display region, and the first control is configured to control, according to a user instruction, to switch a card displayed in the first display region. The user instruction includes: The user switches the card in the first display region in a manner such as voice or a preset gesture. For example, the user slides downward, upward, leftward, or rightward by using an air gesture, to switch the card displayed in the first display region.
In some implementations, the processing module 1310 is further configured to: detect the instruction for generating the second card of the second application; determine whether a quantity of cards included in the first display region exceeds a preset quantity; and if the quantity of cards included in the first display region is less than the preset quantity; use the first display region as the display region for both the second card of the second application and the first card of the first application. In some implementations, the generation instruction is generated after an operation of moving an icon or a card of the second application to the first display region is detected. In some other implementations, the generation instruction is generated after an operation of moving an icon or a card of the second application to a preset region corresponding to the first display region is detected.
In some implementations, the processing module 1310 detects the generation instruction when detecting that time of stay of the icon or the card corresponding to the second application in the first display region or the preset region corresponding to the first display region exceeds first preset duration. It may be understood that the foregoing modules may be implemented in a software or hardware manner. For example, as an example of hardware, the processing module 1310 may be a processor shown in
For example,
It may be understood that the structure shown in this embodiment of this application constitutes no specific limitation on the electronic device 100. In some other embodiments of this application, the electronic device 100 may include more or fewer components than those shown in the figure, some components may be combined, some components may be split, or different components may be disposed. The components shown in the figure may be implemented by using hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory; a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a neural-network processing unit (neural-network processing unit, NPU), and/or the like. Different processing units may be independent components, or may be integrated into one or more processors. The controller may be a nerve center and command center of the electronic device 100. The controller may generate an operation control signal based on an instruction operation code and a timing signal, to control instruction fetching and instruction execution.
A memory may further be disposed in the processor 110, to store instructions and data. In some embodiments, the memory in the processor 110 is a cache. The memory may store instructions or data that is recently used or cyclically used by the processor 110. If the processor 110 needs to use the instructions or the data again, the processor 110 may directly invoke the instructions or the data from the memory. This avoids repeated access and reduces waiting time of the processor 110, thereby improving system efficiency. In some implementations, the processor 110 is configured to control, according to a detected instruction for generating a second card of a second application, to display the second card in a display region corresponding to a first card of a first application. In some implementations, the processor 110 may be configured to perform the foregoing methods 501 to 509.
In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (inter-integrated circuit, I2C) interface, an inter-integrated circuit sound (inter-integrated circuit sound, 12S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (general-purpose input/output, GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, a universal serial bus (universal serial bus, USB) interface, and/or the like.
The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). The I2S interface may be used for audio communication. The PCM interface may also be used for audio communication, to sample, quantize, and encode an analog signal. The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. The bus converts to-be-transmitted data between serial communication and parallel communication.
The MIPI interface may be configured to connect the processor 110 and peripheral devices such as the display 194 and the camera 193. The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and the like. In some embodiments, the processor 110 and the camera 193 communicate with each other by using the CSI interface, to implement a photographing function of the electronic device 100. The processor 110 and the display 194 communicate with each other by using the DSI interface, to implement a display function of the electronic device 100.
It may be understood that an interface connection relationship between the modules that is shown in this embodiment of this application is merely an example for description, and constitutes no limitation on the structure of the electronic device 100. In some other embodiments of this application, different interface connection manners in the foregoing embodiments or a combination of a plurality of interface connection manners may alternatively be used for the electronic device 100.
The charging management module 140 is configured to receive charging input from the charger. The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. A wireless communication function of the electronic device 100 may be implemented by using the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like. The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G and the like applied to the electronic device 100. The wireless communication module 160 may provide a solution for wireless communication including a wireless local area network (wireless local area networks, WLAN) (for example, a wireless fidelity (wireless fidelity; Wi-Fi) network), Bluetooth (bluetooth, BT), a global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), a near field communication (near field communication, NFC) technology, an infrared (infrared, IR) technology; and the like applied to the electronic device 100.
The electronic device 100 implements a display function by using the GPU, the display 194, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is configured to perform mathematical and geometric calculation for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display 194 is configured to display an image, a video, or the like. The display 194 includes a display panel. The display panel may use a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (organic light-emitting diode, OLED), an active-matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), a flexible light-emitting diode (flex light-emitting diode, FLED), a MiniLed, a MicroLed, a Micro-OLED, a quantum dot light emitting diode (quantum dot light emitting diodes, QLED), and the like. In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. In some implementations of this application, the display 194 is configured to display icons of the foregoing applications, a card (a first card) corresponding to a first application, and a card (a second card) corresponding to a second application.
The electronic device 100 may implement a photographing function by using the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is configured to process data fed back by the camera 193. For example, during photographing, a shutter is opened, and light is transmitted to a photosensitive element of the camera by using a lens. An optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing, to convert the electrical signal into an image visible to naked eyes. The ISP may further perform algorithm optimization on noise, brightness, and complexion of the image. The ISP may further optimize parameters such as exposure and color temperature of a shooting scene. In some embodiments, the ISP may be disposed in the camera 193.
The camera 193 is configured to capture a still image or a video. An optical image is generated for an object by using the lens and is projected onto the photosensitive element. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
The digital signal processor is configured to process a digital signal. In addition to processing a digital image signal, the digital signal processor can further process another digital signal. For example, when the electronic device 100 selects a frequency; the digital signal processor is configured to perform Fourier transform on frequency energy.
The video codec is configured to compress or decompress a digital video. The electronic device 100 may support one or more types of video codecs. Therefore, the electronic device 100 may play or record videos in a plurality of encoding formats, such as moving picture experts group (moving picture experts group, MPEG)1, MPEG2, MPEG3, and MPEG4.
The NPU is a neural-network (neural-network, NN) computing processor. By referring to a biological neural-network structure, for example, by referring to a transfer mode between human brain neurons, the NPU quickly processes input information, and can further continuously perform self-learning. Applications such as intelligent cognition of the electronic device 100, for example, image recognition, face recognition, speech recognition, and text understanding, may be implemented by using the NPU.
The external memory interface 120 may be configured to connect to an external storage card, for example, a Micro SD card, to expand a storage capability of the electronic device 100. The external storage card communicates with the processor 110 through the external memory interface 120, to implement a data storage function, for example, to store files such as music and a video in the external storage card.
The internal memory 121 may be configured to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may 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 (for example, a sound playback function or an image playback function), and the like. The data storage area may store data (such as audio data and a phone book) and the like created during use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory; and may further include a nonvolatile memory, for example, at least one disk storage device, a flash memory device, or a universal flash storage (universal flash storage, UFS).
The electronic device 100 may implement audio functions such as music playing and sound recording by using the audio module 170, the speaker 170A, the telephone receiver 170B, the microphone 170C, the headset jack 170D, the application processor, and the like.
The audio module 170 is configured to convert digital audio information into an analog audio signal for output, and is further configured to convert an analog audio input into a digital audio signal. The audio module 170 may be further configured to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules in the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a “loudspeaker”, is configured to convert an audio electrical signal into a sound signal. The electronic device 100 may be configured to listen to music or answer a call in a hands-free mode by using the speaker 170A.
The telephone receiver 170B, also referred to as an “earpiece”, is configured to convert an audio electrical signal into a sound signal. When a call is answered or audio information is listened to by using the electronic device 100, the telephone receiver 170B may be put close to a human ear to listen to a voice.
The microphone 170C, also referred to as a “mic” or “mike”, is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, a user may make a sound by approaching the mouth to the microphone 170C, to input a sound signal to the microphone 170C. At least one microphone 170C may be disposed in the electronic device 100. In some other embodiments, two microphones 170C may be disposed in the electronic device 100, to implement a noise reduction function in addition to collecting a sound signal. In some other embodiments, three, four, or more microphones 170C may be disposed in the electronic device 100, to collect a sound signal, implement noise reduction, and identify a sound source, so as to implement a directional recording function and the like.
The headset jack 170D is configured to be connected to a wired headset. The headset jack 170D may be a USB interface 130, or may be a 3.5 mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, or a cellular telecommunications industry association of the USA (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is configured to sense a pressure signal, and may convert the pressure signal into an electrical signal. The gyroscope sensor 180B may be configured to determine a moving posture of the electronic device 100. The barometric pressure sensor 180C is configured to measure barometric pressure. In some embodiments, the electronic device 100 calculates an altitude by using a barometric pressure value measured by the barometric pressure sensor 180C, to assist in positioning and navigation. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E may detect magnitudes of acceleration of the electronic device 100 in all directions (generally in three axes), and may detect a magnitude and a direction of gravity when the electronic device 100 is still. The acceleration sensor 180E may be further configured to identify a posture of the electronic device, and is applied to applications such as switching between a landscape mode and a portrait mode and a pedometer. The distance sensor 180F is configured to measure a distance. The electronic device 100 may measure a distance in an infrared manner or a laser manner. The optical proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The ambient light sensor 180L is configured to sense brightness of ambient light. The electronic device 100 may adaptively adjust brightness of the display 194 based on sensed brightness of ambient light. The fingerprint sensor 180H is configured to collect a fingerprint. The electronic device 100 may implement fingerprint unlocking, application lock accessing, fingerprint-based photographing, fingerprint-based call answering, and the like by using a feature of the collected fingerprint. The temperature sensor 180J is configured to detect temperature. In some embodiments, the electronic device 100 performs a temperature handling policy based on the temperature detected by the temperature sensor 180J. The touch sensor 180K is also referred to as a “touch panel”. The touch sensor 180K may be disposed on the display 194. The touch sensor 180K and the display 194 form a touchscreen, which is also referred to as “touch control screen”. The bone conduction sensor 180M may obtain a vibration signal. The button 190 includes a power on/off button, a volume button, and the like. The button 190 may be a mechanical button, or may be a touch button. The electronic device 100 may receive a key input and generate a key signal input related to user settings and function control of the electronic device 100. The motor 191 may generate a vibration prompt. The motor 191 may be configured to provide a vibration prompt for an incoming call, and may also be configured to provide vibration feedback for a touch. The indicator 192 may be an indicator light, may be configured to indicate a charging state or a power change, and may be further configured to indicate a message, a missed call, a notification, and the like. The SIM card interface 195 is configured to be connected to a SIM card.
A possible hardware structure of the electronic device 100 is described above. It may be understood that the structure shown in this embodiment of this application does not constitute a specific limitation on the electronic device 100. In some other embodiments of this application, the electronic device 100 may include more or fewer components than those shown in the figure, some components may be combined, some components may be split, or different components may be disposed. The components shown in the figure may be implemented by using hardware, software, or a combination of software and hardware.
An embodiment of this application further provides an electronic device. The electronic device includes at least one processor, a memory, and a computer program that is stored in the memory and that can run on the at least one processor. The processor implements the steps in the foregoing method embodiments when executing the computer program.
An embodiment of this application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiments may be implemented.
An embodiment of this application provides a computer program product. When the computer program product runs on a terminal device or an electronic device, the terminal device or the electronic device is enabled to perform the steps in the foregoing method embodiments.
When the integrated unit is implemented in the form of the software functional 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, in this application, all or a part of the processes in the methods in the foregoing embodiments may be implemented by a computer program instructing related hardware. The computer program may be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the foregoing method embodiments may be implemented. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, some intermediate forms, or the like. The computer-readable medium may include at least any entity or apparatus capable of adding computer program code to a photographing apparatus/terminal device, a recording medium, a computer memory; a read-only memory (read-only memory; ROM), a random access memory (random access memory; RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium, for example, a USB flash drive, a removable hard disk, a magnetic disk, or an optical disc. In some jurisdictions, under legislation and patent practice, a computer-readable medium cannot be an electrical carrier signal or a telecommunications signal.
In the foregoing embodiments, descriptions of the embodiments have respective focuses. For a part that is not detailed or described in an embodiment, refer to related descriptions in other embodiments.
Persons of ordinary skill in the art may recognize that the units and algorithm steps of the examples described with reference to embodiments disclosed herein can be implemented by using electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in a hardware or software manner depends on a specific application and a design constraint of a technical solution. Persons skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
In the embodiments provided in this application, it should be understood that the disclosed apparatus/network device and method may be implemented in another manner. For example, the described apparatus/network device embodiment is merely an example. For example, division of the modules or units is merely logical function division. In actual implementation, there may be another division manner. For example, a plurality of units or components may be combined or integrated into another system, or some characteristics may be ignored or not performed. In addition, the displayed or discussed mutual coupling, direct coupling, or communication connection may be implemented through some interfaces, and indirect coupling or a communication connection of the apparatuses or units may be in an electrical, mechanical, or another form.
The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions in the embodiments.
In the following descriptions, specific details such as a specific system structure and a technology are proposed for description rather than limitation, to thoroughly understand embodiments of this application. However, persons skilled in the art should understand that this application may also be implemented in another embodiment without these specific details. In other cases, detailed descriptions about a well-known system, apparatus, circuit, and method are omitted to prevent unnecessary details from obscuring the description of this application.
It should be understood that when being used in this specification and the appended claims of this application, the term “include” indicates presence of a described characteristic, entirety, step, operation, element and/or component, but does not rule out presence or addition of one or more other characteristics, entireties, steps, operations, elements, components and/or sets thereof.
It should also be understood that the term “and/or” used in this specification and the appended claims of this application means any combination and all possible combinations of one or more of listed associated items, and these combinations are included.
As used in this specification and the appended claims of this application, the term “if” may be interpreted according to the context as “when . . . ”, “once”, “determining in response to”, or “detecting in response to”. Similarly, the phrase “if it is determined that” or “if [a described condition or event] is detected” may be interpreted according to the context as “once it is determined that”, “it is determined that in response to”, “once [a described condition or event] is detected”, or “[a described condition or event] is detected in response to”.
In addition, in the descriptions of this specification and the appended claims of this application, the terms “first”, “second”, “third”, and the like are merely used to distinguish between the descriptions, and cannot be understood as indicating or implying relative importance.
Referring to “one embodiment”, “some embodiments”, or the like that is described in this specification of this application means that specific characteristics, structures, or features described with reference to one or more embodiments are included in the one or more embodiments of this application. Therefore, the statements “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, and the like that appear in different parts of this specification are not necessarily referred to a same embodiment, but mean “one or more but not all embodiments”, unless otherwise specifically emphasized. The terms “include”, “comprise”, “have”, and variations thereof all mean “include but be not limited to” unless otherwise specified in another manner.
The foregoing embodiments are merely used to describe the technical solutions of this application, but not limit the technical solutions of this application. Although this application is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they may still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacement on some technical features. However, these modifications or replacements do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions in embodiments of this application, and shall fall within the protection scope of this application.
Number | Date | Country | Kind |
---|---|---|---|
202210881397.4 | Jul 2022 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2022/143238 | 12/29/2022 | WO |