Card display method and terminal equipment
By implementing a card display method that dynamically matches card size and content size on terminal devices, the problems of poor flexibility and poor user experience caused by card size fixation are solved, and more convenient content viewing and better user experience are achieved.
Patent Information
- Application Number
- CN202311600990.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-05-27
AI Technical Summary
The card size in existing terminal devices is fixed and has poor flexibility, resulting in poor user experience.
By implementing the card display method on the terminal device, the card size can dynamically match the content size displayed in the card and change with the content update.
Improves the flexibility of card display, ensures that the card content is not hidden, and users can view the content more conveniently, improving the user experience.
Smart Images

Figure CN120045254A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminals, and in particular, to a method for displaying a card and a terminal device. Background Art
[0002] During the process of using a terminal device, a user usually needs to click on the icon of a certain application on the desktop of the terminal device to enter the application, and then can view the content in the application. In order to improve the convenience of the user to view the application content, some terminal devices provide cards associated with the application. Through the display of the cards, the user can obtain the application content more conveniently and intuitively. For example, the user can add a card associated with the "Album" application on the desktop of the terminal device. Pictures in the album can be displayed on this card, and the user can view the album content through the card on the desktop without clicking to enter the album application; for another example, the user can add a card associated with the "Weather" application on the desktop of the terminal device. The weather condition can be displayed in real time on this card, and the user can view the current weather condition without clicking to enter the weather application.
[0003] However, currently, the size of the cards displayed by the terminal device is fixed, the flexibility of card display is poor, and the user experience is not good. Summary of the Invention
[0004] This application provides a method for displaying a card and a terminal device, which can make the size of the card change with the update of the content displayed in the card. The size of the card can be dynamically matched with the size of the content displayed by the card, improving the flexibility of card display and being beneficial to enhancing the user experience.
[0005] In a first aspect, this application provides a method for displaying a card. This method can be executed by a terminal device, or can be executed by a component (such as a chip, a chip system, etc.) configured in the terminal device, or can also be implemented by a logic module or software that can implement all or part of the functions of the terminal device. This application does not make any limitations in this regard. The method includes: at a first moment, displaying a first card with a first size on a first interface, where the first content is displayed in the first card, and the first size matches the size of the first content; at a second moment, displaying the first card with a second size on the first interface, where the second content is displayed in the first card, and the second size matches the size of the second content; where the second content is different from the first content, the second size is different from the first size, and the second moment is different from the first moment.
[0006] It should be understood that the "matching" mentioned here may mean that the first size is exactly the same as the size of the first content, or it may mean that the effective information of the first content can be fully displayed through the first size. This application does not make any limitations in this regard. Exemplarily, if the first content is a photo of a person, then the person can be understood as the effective information. If the first content is a table, then the part with text in the table can be understood as the effective information.
[0007] In the embodiments of the present application, at the first moment and the second moment, the first card displayed on the first interface always matches the size of the content it displays. The size of the first card is adaptively adjusted according to the size of the content it needs to display, improving the flexibility of card display on the terminal device. Since the size of the first card matches the size of the content it needs to display, the content displayed on the first card is not hidden, and the user does not need to enter the application to view the content, improving the convenience for the user to view the content and enhancing the user experience.
[0008] Combined with the first aspect, in some implementation manners of the first aspect, at the first moment, the first card is displayed at a first position on the first interface, and at the second moment, the first card is displayed at a second position on the first interface, and the second position is different from the first position.
[0009] It should be understood that the first position may be Figure 3 the position where the first card 302 is located as shown in a of Figure 3 and the second position may be the position where the first card 302 is located as shown in b of
[0010] In a possible implementation manner, the position of the card on the first interface may be based on a certain vertex or the center point of the rectangle circumscribing it. When the reference basis is the center point, it can be considered that the first position is different from the second position.
[0011] Combined with the first aspect, in some implementation manners of the first aspect, other controls are also displayed in the first interface, and the other controls include application icons and / or second cards; at the first moment, the first card is displayed at a third position on the first interface, and the other controls are displayed at a fourth position on the first interface; at the second moment, the first card is displayed at the third position on the first interface, and the other controls are displayed at a fifth position on the first interface, and the fifth position is different from the fourth position.
[0012] It should be understood that the third position may be Figure 4 the position where the first card 302 is located as shown in a of Figure 4 or the position where the first card 302 is located as shown in b of Figure 4The position of the second card 401 shown in a of, the fifth position may be Figure 4 The position of the second card 401 shown in b of.
[0013] It should be understood that while the size of the first card changes, the sizes of other controls on the first interface may also change according to the content they display, and this application does not limit this either.
[0014] In combination with the first aspect, in some implementation manners of the first aspect, the first interface is the negative first screen or the system desktop.
[0015] In combination with the first aspect, in some implementation manners of the first aspect, the terminal device includes a first software module, a second software module, and a display driver. The first software module is used to obtain the content displayed by the first card and perform layout and rendering on the content displayed by the first card. The second software module is used to perform layout and rendering on the first interface. Before the first card with a second size is displayed on the first interface, the method further includes: the first software module obtains the second content from a first application and determines that the size required to display the second content is the second size. When the second size is different from the first size, the first software module sends a first notification to the second software module, and the first notification is used to indicate the second size of the first card. The second software module receives the first notification, updates the size information corresponding to the first card to the second size, and performs layout and rendering on the first interface based on the second size to obtain a first layout result of the first interface, and sends the first layout result to the display driver. The first layout result is used to indicate the position of the first card in the first interface and the size of the first card, and the size of the first card is the second size. The second software module sends a second notification to the first software module, and the second notification is used to indicate the first layout result. The first software module receives the second notification, performs layout and rendering on the second content based on the first layout result to obtain a second layout result of the second content, and sends the second layout result to the display driver. The second layout result is used to indicate the layout of the second content in the first card. Displaying the first card with a second size on the first interface includes: the display driver displays the first card with a second size on the first interface based on the first layout result and the second layout result.
[0016] It should be understood that the first application refers to an application that provides content for the first card and manages the click events of the controls on the first card. It can be a system application or a third-party application, and the present application does not limit this. Exemplarily, the update strategy of the content displayed in the first card can be provided by the first application, and the first application maintains its update cycle. When the content update cycle of the first card arrives, the content to be updated by the first application is sent to the first software module.
[0017] Optionally, the first software module can be a card component or a card internal layout management module included in the card component, and the present application does not limit this.
[0018] It should be understood that the second software module is used to control the display position of the card on the first interface, the display size of the card, and layout and render all or part of the controls displayed on the first interface.
[0019] In the method provided by the embodiments of the present application, through the bidirectional notification between the first software module and the second software module, the size of the first card can be adaptively changed according to the content to be displayed, and the content displayed in the first card always matches its size, improving the flexibility of the card size during the card display process. At the same time, the card display method of the present application can make the information obtained by the user through the first card more intuitive and comprehensive, enhancing the user experience.
[0020] In combination with the first aspect, in some implementation manners of the first aspect, before displaying the first card with the first size on the first interface, the method further includes: in response to a click operation of the user on the first button, enabling the first mode. In the first mode, the size of the cards displayed on the terminal device changes adaptively according to the change of the content displayed in the cards, and the first button is used to enable or disable the first mode.
[0021] In the embodiments of the present application, the setting of the first button on the terminal device increases the interaction between the user and the terminal device. The user can independently choose to enable or disable the first mode, which is beneficial to saving energy by turning off the first mode when the power of the terminal device is low, bringing a better playing experience to the user.
[0022] In combination with the first aspect, in some implementation manners of the first aspect, the first card includes multiple components, and the situations where the content displayed in the first card changes include: the number of the multiple components changes, or the size of at least one of the multiple components changes.
[0023] In combination with the first aspect, in some implementation manners of the first aspect, at a third moment before the first moment, the first card is displayed, the size of the first card is a preset size, and the first content is displayed in the first card.
[0024] In the embodiments of the present application, regardless of the initial size selected by the user for the first card, the size of the first card can be adjusted based on the content to be displayed on the first card, improving the flexibility of card display.
[0025] In a second aspect, the present application provides a terminal device that can implement the method described in any possible implementation manner of the first aspect. The terminal device includes corresponding modules for executing the above method. The modules included in the terminal device can be implemented in software and / or hardware manners.
[0026] In a third aspect, the present application provides a terminal device that includes a processor. The processor is coupled to a memory and can be used to execute a computer program in the memory to implement the method in any possible implementation manner of the first aspect.
[0027] Optionally, the terminal device further includes a communication interface, and the processor is coupled to the communication interface. The communication interface is used to receive signals from other communication devices outside the device and transmit them to the processor, or to send signals from the processor to other communication devices outside the device. Exemplarily, the communication interface can be a transceiver, a circuit, a bus, a module, or other types of communication interfaces.
[0028] Optionally, the terminal device further includes a memory, and the processor is coupled to the memory. The memory is used to store program instructions and data.
[0029] In a fourth aspect, a processor is provided, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive signals through the input circuit and transmit signals through the output circuit, so that the processor executes the method in any possible implementation manner of the first aspect above.
[0030] In a specific implementation process, the above processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be transistors, gate circuits, flip-flops, and various logic circuits, etc. The input signals received by the input circuit can be received and input by, for example, but not limited to, a receiver, and the signals output by the output circuit can be output to, for example, but not limited to, a transmitter and transmitted by the transmitter. Moreover, the input circuit and the output circuit can be the same circuit, which serves as the input circuit and the output circuit at different times. The embodiments of the present application do not limit the specific implementation manners of the processor and various circuits.
[0031] In a fifth aspect, a processing device is provided, including a processor and a memory. The processor is used to read instructions stored in the memory and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation manner of the first aspect above.
[0032] Optionally, there is one or more processors and one or more memories.
[0033] Optionally, the memory may be integrated with the processor or may be separately provided from the processor.
[0034] In a specific implementation process, the memory may be a non-transitory memory, such as a read only memory (ROM). It may be integrated with the processor on the same chip or may be separately provided on different chips. Embodiments of the present application do not limit the type of the memory and the setting manner of the memory and the processor.
[0035] It should be understood that relevant data interaction processes, such as sending indication information, may be a process of outputting indication information from the processor, and receiving capability information may be a process of the processor receiving input capability information. Specifically, the data processed and output may be output to a transmitter, and the input data received by the processor may come from a receiver. Among them, the transmitter and the receiver may be collectively referred to as a transceiver.
[0036] The processing device in the fifth aspect above may be a chip. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor, which is implemented by reading software code stored in the memory. The memory may be integrated in the processor or may exist independently outside the processor.
[0037] In a sixth aspect, a computer program product is provided. The computer program product includes: a computer program (which may also be referred to as code or instruction). When the computer program is run, the computer is caused to execute the method in any possible implementation manner in the first aspect above.
[0038] In a seventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (which may also be referred to as code or instruction). When it runs on a computer, the computer is caused to execute the method in any possible implementation manner in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a hardware structure block diagram of a terminal device provided by an embodiment of the present application;
[0040] Figure 2 It is a software structure block diagram of a terminal device provided by an embodiment of the present application;
[0041] Figure 3An example diagram of card display provided by an embodiment of this application;
[0042] Figure 4 Another example diagram of card display provided by an embodiment of this application;
[0043] Figure 5 A schematic flowchart of internal module interaction provided by an embodiment of this application;
[0044] Figure 6 A schematic diagram of internal module interaction provided by an embodiment of this application. Detailed implementation manners
[0045] Next, the technical solutions in this application will be described with reference to the accompanying drawings.
[0046] To facilitate understanding of the embodiments of this application, the following explanations are made first:
[0047] First, in this application, in order to clearly describe the technical solutions of the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. For example, the first page and the second page are only used to distinguish different pages, and no limitation is imposed on their sequence. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and "first" and "second" do not necessarily mean different.
[0048] Second, in this application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects, but does not exclude the case where it represents a "and" relationship between the front and rear associated objects. The specific meaning represented can be understood in combination with the context. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can represent: a, b, c; a and b; a and c; b and c; or a, b, and c. Where a, b, and c can be single or multiple.
[0049] Third, in this application, "when...", "assuming", "if", "in... case", and "if" all mean that the device will perform corresponding processing under a certain objective situation, which does not limit the time, and does not require the device to have a judgment action when implemented, nor does it mean that there are other limitations.
[0050] Fourth, the method provided in this application can be executed by a terminal device, or by components (such as chips, chip systems, etc.) configured in the terminal device, or by a logic module or software capable of implementing all or part of the functions of the terminal device. This application does not make any limitations in this regard. Among them, the terminal device can also be referred to as a user equipment (UE), access terminal, user unit, user station, mobile station, mobile device, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device, etc. This application does not make any limitations in this regard in the embodiments.
[0051] In the embodiments of this application, the types of terminal devices include, but are not limited to: mobile phones, tablets (pads), computers with wireless transceiver functions (such as laptop computers, handheld computers, etc.), mobile internet devices (MIDs), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication functions, computing devices, or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, terminals in the fifth generation (5G) network, or terminals in a future evolved public land mobile network (PLMN), laptop computers, machine type communication (MTC) terminals, etc.
[0052] In addition, the terminal device may also be a terminal device in an Internet of Things (IoT) system. The IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-object interconnection. The IoT technology can achieve massive connections, deep coverage, and power saving of terminals through, for example, narrowband (NB) technology.
[0053] Figure 1 It is a schematic diagram of the hardware structure of the terminal device 100 provided by the embodiments of the present application. The following will combine Figure 1 Describe in detail the possible hardware structure of the terminal device.
[0054] The terminal device 100 includes a processor 101, a transceiver 102, a memory 103, a camera 104, a display screen 105, a power module 106, a sensor module 107, an audio module 108, an antenna 109, etc.
[0055] Among them, the processor 101 may include one or more processing units. For example, the processor 101 may include an application processor (AP), a microcontroller unit (MCU), a modulation and demodulation processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU), etc. One or more of them. Among them, different processing units may be independent devices or integrated in one or more processors.
[0056] The memory 103 can be used to store computer-executable program codes, and the executable program codes include instructions. The processor 101 executes various functional applications and data processing of the terminal device 100 by running the instructions stored in the memory 103. The memory 103 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the terminal device 100 (such as audio data, phone book, etc.). In addition, the memory 103 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0057] The processor 101, the transceiver 102, and the memory 103 can communicate with each other through an internal connection path to transmit control and / or data signals. The processor 101 is used to call and run the computer program stored in the memory 103 to control the transceiver 102 to send and receive signals.
[0058] The antenna 109 is used to send out the data or signaling output by the transceiver 102. The power module 106 is used to supply power to various devices or circuits in the terminal device 100.
[0059] The display screen 105 can be used to display text, images, videos, etc. For example, in the embodiments of the present application, the display screen 105 can be used to display a first interface including a first card.
[0060] It can be understood that the structure illustrated in the present application does not constitute a specific limitation on the terminal device 100. In other embodiments, the terminal device 100 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0061] In addition, the operating system of the terminal device can be an Android operating system, a Harmony OS, an OpenHarmony operating system, etc. The embodiments of the present application do not make any limitations in this regard.
[0062] Figure 2 is a structural block diagram of the software of the terminal device applicable to the embodiments of the present application. The present application does not limit the type of the operating system of the terminal device. As Figure 2As shown, in some embodiments, the software architecture of the terminal device may be divided into an application layer and an operating system layer.
[0063] Among them, the application layer may include a series of applications. For example, Figure 2 As shown, the application layer may include system applications and third-party applications. System applications can be understood as some applications that come with the system, such as camera, gallery (or album), calendar, call, map, Bluetooth, video, and music applications. Third-party applications can be understood as non-system applications that can be downloaded and installed from an application store. In the embodiments of this application, both system applications and third-party applications can be used as card providers (which can be understood as providers of card content, the source of the content displayed in the card) and / or card users (the host applications of the card, such as the negative first screen, the system desktop, etc.). This application does not make any limitations in this regard.
[0064] In some embodiments, the operating system layer can be further divided into a system framework layer, a system service layer, and a kernel layer. Among them, the system framework layer may include a user interface (UI) framework or an application framework, a user program framework (or program framework), a component framework, an Ability framework, etc. The system framework layer provides multi-language user program frameworks and component frameworks in languages such as C, C++, and JavaScript (JS) for the application programs of the operating system, as well as multi-language frameworks (application programming interface, API) for various software and hardware services to be open to the outside world; at the same time, it provides a multi-language UI framework in languages such as C, C++, and JS for the device. The APIs supported by different devices are related to the degree of componentization and customization of the system. The system service layer may include a system basic capability subsystem set, a basic software service subsystem set, an enhanced software service subsystem set, and a hardware service subsystem set. The system service layer is the core capability set of the operating system and provides services for application programs through the system framework layer. The kernel layer may include a kernel subsystem and a driver subsystem. The operating system can adopt a multi-kernel design. Based on the kernel subsystem, the operating system supports selecting a suitable OS kernel for different resource-constrained devices; the kernel abstract layer (KAL) provides basic kernel capabilities for the upper layer by shielding the differences between multi-kernels, including process management / thread management, memory management, file system, network management, and peripheral management, etc. The driver framework in the driver subsystem is the basis for the opening of the operating system hardware ecosystem and can provide unified peripheral access capabilities and driver development and management frameworks, such as display drivers.
[0065] In an embodiment of the present application, the UI framework includes a first software module for obtaining the content to be displayed on the card and for laying out and rendering the content displayed on the card, and a second software module for laying out and rendering the first interface of the host application of the card. In a possible implementation manner, the layout and rendering results of the first software module and / or the second software module can be sent to the display driver, and the display driver is used to drive the display screen for display.
[0066] In a possible implementation manner, the first software module may be referred to as a card component or an in-card layout management module, and the second software module may be referred to as a card user or an out-of-card layout management module, etc. The present application does not make specific limitations thereto.
[0067] In a possible implementation manner, the UI framework further includes a resident proxy service for managing the cards added in the system, which can provide interface capabilities and also provide capabilities such as management and use of card objects and periodic refreshing of cards. This service may be, for example, a card management service. The present application does not make limitations thereto.
[0068] It should be understood that Figure 1 and Figure 2 the described structure of the terminal device is only an example and should not impose any limitations on the embodiments of the present application.
[0069] When a user uses a terminal device, the user usually needs to click on the icon of a certain application on the desktop of the terminal device to enter the application in order to view the content in the application. To improve the convenience for the user to view the application content, some terminal devices provide cards associated with the application. Through the display of the cards, the user can obtain the application content more conveniently and intuitively. For example, the user can add a card associated with the "Album" application on the desktop of the terminal device, and the pictures in the album can be displayed on the card. The user can view the album content through the card on the desktop without clicking to enter the album application. Another example is that the user can add a card associated with the "Weather" application on the desktop of the terminal device, and the weather condition can be displayed in real time on the card. The user can view the current weather condition without clicking to enter the weather application.
[0070] However, in the prior art, the card size provided by the terminal device is a fixed size, that is, when the user adds a card, the size of the added card can be selected, such as preset sizes like 2*2 or 2*4, etc. After the card is successfully added, the card will not change with the update of the content displayed in the card. For example, if the pictures displayed on the card associated with the photo album are updated every 10 minutes, when the pictures displayed on the card do not match the size of the card, it may occur that the card cannot display the full picture, and the user cannot obtain all the information of the picture through the card. The user still needs to click on the card to enter the photo album or click on the photo album application to enter the photo album to see the complete picture. Such a card with a fixed size has poor flexibility and a bad user experience.
[0071] In view of this, the present application provides a card display method, which can make the card size change with the update of the content displayed in the card. The card size can be dynamically matched with the size of the content displayed on the card, improving the flexibility of the card and being beneficial to enhancing the user experience.
[0072] In order to make the purpose and technical solution of the present application clearer and more intuitive, the following will, in conjunction with the accompanying drawings and embodiments, detail the card display method and terminal device provided by the embodiments of the present application. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0073] The following will be combined with Figures 3 to 6 to illustrate the card display method provided by the embodiments of the present application. Figure 3 The hardware structure of the terminal device shown in Figure 1 can be as shown in Figure 2 shown, and the software structure can be as shown in
[0074] Figure 3 Taking the terminal device as a mobile phone, the first interface as the negative first screen, and the content displayed on the first card provided by the photo album application as an example for illustration. It should be understood that the terminal device can also be a tablet computer, a laptop computer, a smart watch, etc., the first interface can also be a system interface or other application interfaces, and the content displayed on the first card can also be provided by other system applications or third-party applications. The present application does not make any limitations thereto.
[0075] As shown in Figure 3 a in Figure 3Exemplarily, a shows a first card 302 displayed in a first interface 301 of a terminal device 300 at a first moment. A first content 303 is shown in the first card 302. Exemplarily, the content shown in the first card 302 is provided by an album application. The content shown in the first card is updated every preset duration. The update method may be to traverse the album according to the saving time of pictures in the album, or any other preset method, which is not limited in this application. At the first moment, the size of the first card 302 is a first size, which matches the size of the first content 303.
[0076] It should be understood that the so-called "matching" here may mean that the first size is exactly the same as the size of the first content, or it may mean that the effective information of the first content can be fully displayed through the first size, which is not limited in this application. Exemplarily, if the first content is a portrait photo, the person can be understood as the effective information. If the first content is a table, the part with text in the table can be understood as the effective information.
[0077] As Figure 3 As shown in b, it shows the first card 302 displayed in the first interface 301 of the terminal device 300 at a second moment after the first moment. Since the content shown in the first card 302 is updated between the first moment and the second moment, or at the second moment, a second content 304 is shown in the first card 302 at the second moment. At this time, the size of the first card 302 is updated to a second size, which matches the size of the second content 304.
[0078] In the embodiment of this application, at the first moment and the second moment, the first card displayed on the first interface always matches the size of the content it shows. The size of the first card is adaptively adjusted according to the size of the content it needs to show, improving the flexibility of card display on the terminal device. Since the size of the first card matches the size of the content it needs to show, the content shown in the first card is not hidden, and the user does not need to enter the application to view the content, improving the convenience for the user to view the content and enhancing the user experience.
[0079] It should be understood that the above first moment and second moment can be any two moments after the user adds the first card to the first interface. In a possible scenario, at a third moment before the first moment, the user adds the first card to the first interface. When adding the first card, the user selects the size of the first card as a preset size, and the first content can be displayed in the first card. When the preset size is the same as the first size, the size of the first card may not change between the third moment and the first moment. If the preset size is different from the first size, that is, when the preset size does not match the size of the first content, after the user selects the size of the first card as the preset size, the size of the first card can still be adaptively adjusted according to the first content to be displayed, so that at the first moment, the size of the first card displayed on the terminal device on the first interface matches the first content it displays.
[0080] In the embodiments of the present application, regardless of the initial size selected by the user for the first card, the size of the first card can be adjusted based on the content to be displayed on the first card, improving the flexibility of card display.
[0081] As an optional embodiment, a first button for turning on or off the first mode is provided on the terminal device. The terminal device can respond to the user's click operation on the first button to turn on the first mode. In the first mode, the size of the card displayed on the terminal device changes adaptively according to the change of the content displayed in the card. When the first mode is turned on, the terminal device executes the card display method provided by the embodiments of the present application.
[0082] Optionally, the terminal device can also respond to the user's voice command to turn on the first mode. The present application does not make specific limitations on the way to turn on the first mode.
[0083] In the embodiments of the present application, the setting of the first button on the terminal device provides more choices for the user. The user can independently choose to turn on or off the first mode, which is beneficial for the user to choose to turn on the first mode when wanting to intuitively obtain information from the card, and is beneficial for the user to save energy by turning off the first mode when the power of the terminal device is low, bringing a better user experience of using the device.
[0084] It should be understood that Figure 3 the shape of the first card in is only exemplary, and the first card can also be circular or any other shape. The present application does not make limitations on this.
[0085] As an optional embodiment, other controls are also displayed in the first interface, and the other controls include application icons and / or other cards.
[0086] It should be understood that when there are other controls in the first interface, a change in the size of the first card may cause a change in the positions of other controls. Exemplarily, in combination with Figure 4 , taking the example where the second card 401 is also included in the first interface 301 for illustration. Figure 4 a in Figure 4 shows the display situation of the first interface 301 at the first moment, Figure 4 and b in Figure 4 shows the display situation of the first interface 301 at the second moment. It can be seen from Figure 4 a and Figure 4 b that since the content displayed by the first card 302 is updated from the first content 303 to the second content 304 between the first moment and the second moment or at the second moment, and the sizes of the first content 303 and the second content 304 are different, the first card 302 is adaptively adjusted according to the size of the second content 304, resulting in a change in the position of the second card 401 on the first interface 301.
[0087] In a possible implementation manner, the position of the card on the first interface may be based on a certain vertex or the center point of the circumscribed rectangle thereof. As shown in a of Figure 4 , the shape of the first card 302 is a rounded rectangle, and its circumscribed rectangle is like the rectangle formed by the dashed line a in Figure 4 . If the vertex A of the rectangle is used as the position reference point of the first card 302, then after the first card 302 is updated from the first size shown in a of Figure 4 to the second size shown in b of Figure 4 , since the position of the vertex A of the circumscribed rectangle of the first card 302 has not changed, it can be considered that the position of the first card 302 on the first interface has not changed. However, if other vertices or the center point, etc. are used as the position reference point of the first card 302, it can be considered that the position of the first card corresponding to the second moment has changed compared with the first moment. Similarly, for the second card 401, it can be seen that the positions of the vertices or the center point of the circumscribed rectangle of the second card have both changed, and the position where the second card 401 is located at the first moment is different from the position where it is located at the second moment.
[0088] Exemplarily, Figure 4 c in Figure 4 shows another possible display situation of the first interface 301 at the second moment. From Figure 4 a and Figure 4 c, it can be seen that regardless of which position of the card is used as the reference point, the position where the first card 302 is located at the first moment is different from the position where the first card is located at the second moment, and the position where the second card 401 is located at the first moment is different from the position where the second card is located at the second moment.
[0089] Optionally, the first interface may also be a system interface or other application interfaces, and the other controls may also be application icons. This application does not make specific limitations in this regard. It should also be understood that while the size of the first card changes, the sizes of the other controls on the first interface may also change according to the content they display. This application does not make limitations in this regard either.
[0090] The following Figure 5 , based on the software structure in the terminal device, further illustrates the principle of the card display method provided in the embodiments of this application. The terminal device includes a first software module, a second software module, and a display driver. The first software module is used to obtain the content displayed on the first card and perform layout and rendering on the content displayed on the first card. The second software module is used to perform layout and rendering on the first interface. The first software module and the second software module are modules in the UI framework. The positions of the first software module, the second software module, and the display driver in the intermediate device software architecture may be as Figure 2 shown.
[0091] Figure 5 Exemplarily shows the flowchart of the card display method 500 provided in this application from the perspective of software module interaction. The method 500 includes the following steps:
[0092] S501. The first software module obtains second content from the first application and determines that the size required to display the second content is the second size.
[0093] It should be understood that the first application refers to the application that provides content for the first card and manages the control click events of the first card. It may be a system application or a third-party application. This application does not make limitations in this regard. Exemplarily, the update policy of the content displayed in the first card may be provided by the first application, and the first application maintains its update cycle. When the content update cycle of the first card reaches, the first application sends the content to be updated to the first software module.
[0094] Optionally, the first software module may be a card component or a card inner layout management module included in the card component. This application does not make limitations in this regard.
[0095] S502. The first software module sends a first notification to the second software module. The first notification is used to indicate the second size of the first card. Correspondingly, the second software module receives the first notification.
[0096] It should be noted that the first software module executes S502 when it determines that the second size is different from the current first size of the first card.
[0097] S503. The second software module updates the size information of the first card to a second size, and based on the second size, layouts and renders the first interface to obtain a first layout result of the first interface.
[0098] It should be understood that the second software module is used to control the display position of the card on the first interface, the size of the card display, and layout and render all or part of the controls displayed on the first interface. When the size of the first card needs to be changed, the first software module notifies the second software module of the second size of the first card. The second software module updates the size information of the first card based on the second size of the first card, and based on the new size of the first card, layouts and renders the second interface to obtain a first layout result. The first layout result includes the size and position information of all or part of the controls on the first interface.
[0099] S504. The second software module sends the first layout result to the display driver. Correspondingly, the display driver receives the first layout result.
[0100] S505. The display driver displays the first card with the second size on the first interface based on the first layout result.
[0101] In a possible implementation, the display driver is in the kernel layer of the terminal device software structure, and the second software module is in the system framework layer of the terminal device software structure. The second software module sends the first layout result to the display driver, and the display driver can drive the display screen in the hardware layer to display the rendered first layout result.
[0102] S506. The second software module sends a second notification to the first software module, and the second notification is used to indicate the first layout result. Correspondingly, the first software module receives the first notification.
[0103] S507. The first software module layouts and renders the second content based on the first layout result to obtain a second layout result of the second content.
[0104] It should be understood that the second layout result is the result of the first software module's layout and rendering of the second content, and is the layout and rendering of the second content to be displayed within the first card. Since the content displayed on the first card is updated from the first content to the second content, and its size is updated from the first size to the second size, the first software module's layout and rendering of the second content based on the second size can make the second content adapt to the second size.
[0105] S508. The first software module sends the second layout result to the display driver. Correspondingly, the display driver receives the second layout result.
[0106] S509: The display driver displays the second content in the first card based on the second layout result.
[0107] The method provided in the embodiment of the present application can make the size of the first card adaptively change according to the content to be displayed through two-way notification between the first software module and the second software module. The content displayed in the first card always matches its size, thereby improving the flexibility of the card size during the card display process. At the same time, the card display method of the present application can make the information obtained by the user through the first card more intuitive and comprehensive, thereby improving the user experience.
[0108] In a possible implementation, the first software module may include a first measurement module, a first layout module, and a first rendering module, and the second software module may include a second measurement module, a second layout module, and a second rendering module. Figure 6 The architecture diagram of the first software module and the second software module is exemplarily shown. S501 in the above method 500 can be executed by the first measurement module in the first software module, and the update of the first card size information in S503 can be executed by the second measurement module.
[0109] like Figure 6 As shown, when the first measurement module detects that the content displayed by the first card is updated and the second size required by the updated second content is different from the current first size of the first card, the first measurement module sends a first notification to the second measurement module, and the first notification is used to indicate the second size of the first card. The second measurement module performs layout measurement on the first interface based on the second size and the size and position of other controls, obtains the layout result of the first interface, and notifies the first measurement module of the layout result through the second notification.
[0110] It is worth noting that the first measurement module, the first layout module and the first rendering module in the first software module can share the second notification, and the second measurement module, the second layout module and the second rendering module in the second software module can share the first notification. In a possible implementation, the first software module and the second software module can each maintain a layout and / or rendering refresh cycle. When the calculation of the measurement module is completed and the refresh cycle arrives, the first layout module and the first rendering module in the first software module layout and render the content to be displayed in the first card, and the second layout module and the second rendering module in the second software module layout and render the cards and / or other controls in the first interface. The first software module and the second software module can implement layout and rendering simultaneously or at different times. The refresh cycles maintained by the first software module and the second software module can be the same or different, and this application does not limit this.
[0111] As an alternative embodiment, the first card described above may include a component tree formed by multiple components. The change in the content displayed on the first card may be a change in the number of multiple components, or a change in the size of at least one component among the multiple components.
[0112] It should be understood that the component tree is related to the content displayed on the first card. The change in the content displayed on the first card can be understood as a change in the business logic of the component tree corresponding to the first card. This change can be a change in the number of multiple components included in the first card, or a change in the size of at least one component among the multiple components included in the first card. When the first software module detects a change in the component tree, it can determine that the content displayed on the first card has been updated.
[0113] It should be understood that the steps of the above various embodiments may also be coupled to each other, and this application does not make any limitations in this regard. Moreover, the magnitude of the sequence numbers of the above processes does not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.
[0114] The embodiments of this application also provide a terminal device that can implement the method described in any of the above embodiments. The terminal device includes corresponding modules for executing the above method. The modules included in the terminal device can be implemented in software and / or hardware.
[0115] The embodiments of this application also provide a terminal device. The terminal device includes a memory and a processor. Among them, the memory is used to store a computer program, and the processor is used to call and execute the computer program so that the terminal device implements the method described in any of the above embodiments.
[0116] This application also provides a chip system. The chip system includes at least one processor for implementing the functions involved in the method described in any of the above embodiments. For example, receiving or processing the data and / or information involved in the above method.
[0117] In a possible design, the chip system further includes a memory. The memory is used to store program instructions and data, and the memory is located inside or outside the processor.
[0118] The chip system may be composed of chips or may include chips and other discrete devices.
[0119] This application also provides a computer-readable storage medium. A computer program (which may also be referred to as code or instruction) is stored on the computer storage medium. When the computer program is run by a processor, the method described in any of the above embodiments is executed.
[0120] The present application also provides a computer program product, which includes a computer program (which may also be referred to as code or instructions). When the computer program is run, it causes a computer to execute the method described in any one of the above embodiments.
[0121] It should be understood that the processor in the embodiments of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiments may be completed by the integrated logic circuit in the hardware of the processor or by instructions in software form. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0122] It should also be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include but not be limited to these and any other suitable types of memory.
[0123] The terms "unit", "module", etc. used in this specification can be used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. The units and modules in the embodiments of the present application have the same meaning and can be used interchangeably.
[0124] Those of ordinary skill in the art will realize that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. In several embodiments provided in this application, it should be understood that the disclosed devices, equipment, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.
[0125] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer instructions (programs) are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state drive (SSD)), etc.
[0126] If the functions provided by the embodiments of the present application are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0127] As described above, the foregoing are only specific implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for card display, characterized in that, it includes: At a first moment, a first card with a first size is displayed on a first interface, and first content is shown in the first card, and the first size matches the size of the first content; At a second moment, the first card with a second size is displayed on the first interface, and second content is shown in the first card, and the second size matches the size of the second content; wherein, the second content is different from the first content, the second size is different from the first size, and the second moment is different from the first moment.
2. The method according to claim 1, characterized in that, At the first moment, the first card is displayed at a first position on the first interface, and at the second moment, the first card is displayed at a second position on the first interface, and the second position is different from the first position.
3. The method according to claim 1, characterized in that, Other controls are also displayed in the first interface, and the other controls include application icons and / or second cards; At the first moment, the first card is displayed at a third position on the first interface, and the other controls are displayed at a fourth position on the first interface; At the second moment, the first card is displayed at the third position on the first interface, and the other controls are displayed at a fifth position on the first interface, and the fifth position is different from the fourth position.
4. The method according to any one of claims 1 to 3, characterized in that, The first interface is a negative first screen or a system desktop.
5. The method according to any one of claims 1 to 4, characterized in that, The terminal device includes a first software module, a second software module and a display driver. The first software module is used to obtain the content shown in the first card, and perform layout and rendering on the content shown in the first card. The second software module is used to perform layout and rendering on the first interface; Before the first card with a second size is displayed on the first interface, the method further includes: The first software module obtains the second content from a first application and determines that the size required to display the second content is the second size; When the second size is different from the first size, the first software module sends a first notification to the second software module, and the first notification is used to indicate the second size of the first card; The second software module receives the first notification, updates the size information corresponding to the first card to the second size, and performs layout and rendering on the first interface based on the second size to obtain a first layout result of the first interface, and sends the first layout result to the display driver. The first layout result is used to indicate the position of the first card in the first interface and the size of the first card, and the size of the first card is the second size; The second software module sends a second notification to the first software module, and the second notification is used to indicate the first layout result; The first software module receives the second notification, layouts and renders the second content based on the first layout result to obtain a second layout result of the second content, and sends the second layout result to the display driver, where the second layout result is used to indicate the layout of the second content in the first card; The displaying the first card with a second size on the first interface includes: Based on the first layout result and the second layout result, the display driver displays the first card with the second size on the first interface.
6. The method according to any one of claims 1 to 5, characterized in that, Before displaying the first card with a first size on the first interface, the method further includes: In response to a click operation of the user on the first button, a first mode is enabled. In the first mode, the size of the cards displayed on the terminal device adaptively changes according to the change of the content displayed in the cards, and the first button is used to enable or disable the first mode.
7. The method according to any one of claims 1 to 6, characterized in that, The first card includes a plurality of components, and the situations where the content displayed by the first card changes include: the number of the plurality of components changes, or the size of at least one of the plurality of components changes.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: At a third moment before the first moment, the first card is displayed, the size of the first card is a preset size, and the first content is displayed in the first card.
9. A terminal device, characterized in that, including: A processor, the processor is coupled to a memory, the memory stores computer execution instructions, and the processor executes the computer execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, It is used to store a computer program, and the computer program includes instructions for implementing the method according to any one of claims 1 to 8.
11. A computer program product, the computer program product includes computer program code, characterized in that, When the computer program code runs on a computer, the computer is enabled to implement the method according to any one of claims 1 to 8.