CN117271022A - Method, device and storage medium for displaying icons in widget - Google Patents

Method, device and storage medium for displaying icons in widget Download PDF

Info

Publication number
CN117271022A
CN117271022A CN202311033797.0A CN202311033797A CN117271022A CN 117271022 A CN117271022 A CN 117271022A CN 202311033797 A CN202311033797 A CN 202311033797A CN 117271022 A CN117271022 A CN 117271022A
Authority
CN
China
Prior art keywords
icon
widget
target
container
desktop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311033797.0A
Other languages
Chinese (zh)
Inventor
张南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202311033797.0A priority Critical patent/CN117271022A/en
Publication of CN117271022A publication Critical patent/CN117271022A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Abstract

The application provides a method, a device and a storage medium for displaying icons in widgets, and the container layout of target widgets is configured through the application; the container layout includes at least one container therein; configuring a data identifier of an icon to be displayed for a container; traversing all views of the target widget based on the icon updating instruction of the target widget, and searching a target text box matched with the data identifier; according to the method, as the container layout of the target Widget is configured in the Widget application, the data identifier of each container to be displayed icon is configured, the data identifier is identified in the desktop starter, and the desktop icon data corresponding to the data identifier can be loaded into the corresponding container to be displayed, so that the problem that the icons of the same application program in the Widget are consistent with the desktop icon to be displayed can be solved, the effect of enriching the presentation forms of the icons in the Widget is achieved, and the user experience is improved.

Description

Method, device and storage medium for displaying icons in widget
Technical Field
The application relates to the technical field of widgets, in particular to a method, a device and a storage medium for displaying icons in a widget.
Background
Widget (widget) is a lightweight user interface space, which can display different personalized information for users, and users can conveniently and rapidly browse information such as weather, news, picture libraries and the like through the widget, and meanwhile, the widget is an important entry interface provided for users by applications. However, due to the limitation of the Widget mechanism, the presentation form and animation of the icon on the Widget are not rich, the difference between the icon and the corresponding desktop application icon is large, and the user experience is poor.
Disclosure of Invention
The embodiment of the application provides a method, a device and a storage medium for displaying icons in a Widget, which at least solve the problem of how to display icons of the same application program in the Widget consistent with desktop icons in the related art.
According to one embodiment of the present application, there is provided a method for displaying icons in a widget, including:
configuring a container layout of a target widget in a widget application; wherein the container layout comprises at least one container;
configuring a data identifier of an icon to be displayed for the container in a widget application;
the desktop starter traverses all views of the target widget based on the icon updating instruction of the target widget, and searches a target text box matched with the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed;
and the desktop starter loads the icon to be displayed to the container corresponding to the data identifier, and displays the icon to be displayed in the container.
According to another embodiment of the present application, there is provided an apparatus for displaying icons in a widget, including:
a container layout configuration module for configuring a container layout of the target widget in the widget application; wherein the container layout comprises at least one container;
the data identifier configuration module is used for configuring the data identifier of the icon to be displayed for the container in the widget application;
the acquisition module is used for traversing all views of the target widget by the desktop starter based on the icon updating instruction of the target widget and searching a target text box matched with the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed;
and the display module is used for loading the icon to be displayed to the container corresponding to the data identifier by the desktop starter and displaying the icon to be displayed in the container.
According to a further embodiment of the present application, there is also provided a storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
By the application, the container layout of the target widget is configured in the widget application; wherein the container layout comprises at least one container; configuring a data identifier of an icon to be displayed for the container; the desktop starter traverses all views of the target widget based on the icon updating instruction of the target widget, and searches a target text box matched with the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed; and loading the icon to be displayed to the container corresponding to the data identifier, and displaying the icon to be displayed in the container. According to the method, the container layout of the target Widget is configured in the Widget application, the data identifier of the icon to be displayed of each container is configured, the data identifier is identified in the desktop starter, and the desktop icon data corresponding to the data identifier can be loaded into the corresponding container for displaying, so that the problem that the icon of the same application program in the Widget is consistent with the desktop icon for displaying can be solved, the effect of enriching the display form of the icon in the Widget is achieved, and the user experience is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for displaying icons in a widget according to one embodiment of the present application;
FIG. 3 is an effect diagram of a method for displaying icons in a widget according to one embodiment of the present application;
FIG. 4 is a flow chart of a method for displaying icons in a widget according to another embodiment of the present application;
FIG. 5 is an effect diagram of a method for displaying icons in a widget according to one embodiment of the present application;
fig. 6 is a schematic structural diagram of an apparatus for displaying icons in a widget according to an embodiment of the present application.
Detailed Description
The present application will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided by the embodiments of the present application may be performed in a mobile terminal, a computer terminal, or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a method for displaying icons in a widget according to an embodiment of the present application. As shown in fig. 1, the mobile terminal 10 may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1 or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, such as software programs and modules of application software, such as computer programs corresponding to the methods of displaying icons in widgets in the embodiments of the present application, and the processor 102 executes the computer programs stored in the memory 104, thereby performing various functional applications and data processing, i.e. implementing the methods described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific examples of networks described above may include wireless networks provided by the communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for displaying an icon in a widget running in the mobile terminal is provided, and fig. 2 is a flowchart of a method for displaying an icon in a widget according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
step S202, configuring a container layout of the target widget in the widget application, wherein the container layout comprises at least one container.
The container layout of each target widget may be different, for example, the container layout of the target widget a is 4×2, the container layout of the target widget B is 2×2, and the container may be 1×1, where the container layout of the target widget a includes 8 containers, the container layout of the target widget B includes 4 containers, and of course, if the container is 2×2, the target widget a includes 2 containers, and the target widget B includes 1 container.
The layout of the container and the size of the container are all exemplified, and the size of the container is not limited, and the container can be determined according to the setting of the widget itself or according to the need in practical application, and is not limited.
Step S204, data identification of the icon to be displayed is configured for the container in the widget application.
The icon to be displayed can be any one or more icons of a corner mark of an icon of a certain application program to be displayed in the target widget, an icon click animation, an icon long-press event, an icon opening animation and the like. The data identifier may be an identifier ID of an icon to be displayed, or may be an application name or text box identifier of an application program corresponding to the icon to be displayed, which is not limited.
Step S206, the desktop starter traverses all views of the target widget based on the icon update instruction of the target widget, searches for a target text box matched with the data identifier, acquires desktop icon data corresponding to the target text box, and takes the desktop icon data as an icon to be displayed.
Wherein, desktop icon data includes: any one or more of an icon corner mark, an icon click animation, an icon long press event and an icon open animation. The corner mark of the icon can be, for example, a corner mark of information, representing the number of unread short messages, and the icon long-press event can be a menu popped up after the application long-press, and the like.
In one embodiment, the icon update instruction includes a first indication message characterizing widget creation or a second indication message characterizing widget update.
In this embodiment, when the widget is created or updated, an indication message is generated, where the indication message may be used as an icon update instruction, and after receiving the icon update instruction of the target widget, the desktop initiator may initiate an operation of updating the icon of the target widget.
In one embodiment, the data identifier includes a text box identifier, the desktop initiator traverses all views of the target widget based on an icon update instruction of the target widget, searches for a target text box matched with the data identifier, obtains desktop icon data corresponding to the target text box, and uses the desktop icon data as an icon to be displayed, including: and acquiring an icon updating instruction, traversing all views (views) of the target widget based on the icon updating instruction, searching and determining a target text box (TextView) matched with the text box identifier, acquiring an application package indication identifier carried by the target text box, and creating an icon to be displayed which is identical to desktop icon data according to the application package indication identifier.
In this embodiment, the desktop Launcher is an android desktop Launcher (Launcher). The Widget application has set a container layout and a data identifier of a container for a target Widget, for example, a 4×2 container layout is set for a Widget, each 1×1 small lattice is a container of an icon, the small lattices (containers) are set with identifiers, for example, a text view with width and height being 0 and invisible is added to the container, the id of each container is set as icon_tag_text_0, icon_tag_text_1, icon_tag_text_2 … … and the like, the text is set to be similar to { "ppkg": "application package name" }, and the like, and the "application package name" can be used as an application package indication identifier, for example, the application package name of the container with the id of icon_tag_text_0 is a micro-letter, and an icon to be displayed, which corresponds to the icon data of the desktop application corresponding to the icon_tag_text_0 and is the same as that of the micro-letter, is created in the Widget, so that the icon can be displayed in the target Widget and reach the effect of the icon in accordance with the desktop.
Step S208, the desktop starter loads the icon to be displayed to a container corresponding to the data identifier, and displays the icon to be displayed in the container.
The schematic diagram of the displayed effect is shown in fig. 3, the icons on the widgets and the desktop icons are the same View, and the icons like corner marks, icon click animations, long-press events and application opening animations of the icons are the same as those in the desktop of the mobile phone.
Through the steps, the container layout of the target Widget is configured in the Widget application, the data identifier of each container to be displayed icon is configured, the data identifier is identified in the desktop starter, and the desktop icon data corresponding to the data identifier can be loaded into the corresponding container for display, so that the problem that the icons of the same application program in the Widget are consistent with the desktop icon display can be solved, the effect of enriching the display forms of the icons in the Widget is achieved, and the user experience is improved.
Alternatively, the mobile terminal of the execution subject of the above steps may be, but not limited to, a mobile phone, a tablet computer, a notebook computer, a palm top computer, a PDA (Personal Digital Assistant, a personal digital assistant), a PMP (Portable Media Player, a portable multimedia player), and the like.
In one embodiment, after the application package indication identifier carried by the target text box is obtained, before the icon to be displayed, which is the same as the desktop icon data, is created in the widget according to the application package indication identifier, the method further includes: it is determined that the icon to be presented is not included in the container.
In this embodiment, before creating the icon to be displayed, it is first determined that the icon to be displayed is not included in the container, so as to avoid duplication and data confusion.
In one embodiment, if the container includes the icon to be displayed, the method further includes: and acquiring target icon data corresponding to the application package indication identifier, and updating the icon to be displayed according to the target icon data.
If the container already includes the icon to be displayed, the creation is not needed again, but the target icon data corresponding to the application package indication identifier is updated to the existing icon to be displayed, for example, the container already includes the WeChat icon, and only the corner mark data (i.e. the number of unread messages) of the WeChat is updated to the existing WeChat icon in the container.
In one embodiment, before the desktop initiator traverses all views of the target widget based on the icon update instruction of the target widget, the method further comprises: and determining a target sub-class from the micro-component host view class, wherein the micro-component loaded by using the target sub-class supports the display of desktop icon data, and loading the target micro-component based on the target sub-class.
In this embodiment, the desktop may first obtain a target subclass when creating a host view HostView of a Widget, where the target subclass may be a custom subclass in a Widget host view class, for example, obtain a custom subclass suggestwidthastview in a desktop initiator application Widget host view launchenappwidthastview, to load a Widget (i.e., a target Widget) that needs special processing, and distinguish from other widgets. It should be appreciated that since each target widget supporting presentation of desktop icon data is loaded by a target sub-class, the desktop initiator can facilitate identifying all of the target widgets in the widget.
In one embodiment, the core steps of the method for displaying icons in the Widget are as shown in fig. 4, and the layout of the icon container is provided when the Widget application updates the Widget, and the data identifier of the icon is set. When the desktop starter receives the Widget update, traversing all layouts in the Widget, finding out the identifier, loading the corresponding data desktop and displaying the corresponding icon.
Specifically, the Widget application is exemplified by the application of the smart advice, as shown in fig. 5, when the Widget is created or updated, only a traditional Widget layout mode is used to set a layout of 4x2 for the 4x2 Widget, each 1x1 small grid is a container of an icon, an identifier is set for the layout of the small grids, for example, a TextView with width and height of 0 is added to the layout, the id is set as icon_tag_text_0,1,2.
When creating the HostView of the Widget, the desktop uses the custom subclass of the LaunchelAPWidgetHostView, such as SuggestWidgetHostView, to load the target Widget which needs special processing, and distinguish from other Widgets. When the target Widget is updated, the desktop traverses all views in the target Widget, finds the TextView with id being the start of icon_tag_text, acquires the text on the TextView, namely the icon data of { "pkg": "application package name" }, and the desktop initiator creates and loads the icon into the parent layout (namely the container) of the TextView according to the acquired icon data. If other application icons previously created in the Widget already exist in the current parent layout, the icon is not required to be created again, and only the lower icon data is required to be updated.
According to the steps, the icons on the Widget are the same View as the desktop icons, and the icons, such as corner marks, icon click animations, long-press events and application opening animations of the icons are the same as those in the desktop.
In addition, when the data such as the corner mark in the desktop is updated, all icons in the Widget need to be traversed, and the data needs to be updated.
In this embodiment, the limitation that only default controls can be used on the Widget and long press cannot be performed is broken through functionally, so that the visual effects of the icons on the Widget and the desktop are identical, and in terms of functions, such as long press events, the effects of the icons on the desktop are identical, other animations are identical, the presentation forms of the icons in the Widget are enriched, the problem that the long press events and animations of the icons or pictures on the traditional Widget and the icons in the desktop have a great gap is solved, and the experience feeling of a user in the use process can be improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
In an embodiment of the present application, a device for displaying icons in a widget is further provided, where the device is used to implement the foregoing embodiment and the preferred implementation, and the description is omitted herein. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
FIG. 6 is a block diagram of an apparatus for displaying icons in a widget, according to an embodiment of the present application, as shown in FIG. 6, including:
a container layout configuration module 602 for configuring a container layout of a target widget in a widget application; wherein the container layout comprises at least one container;
a data identifier configuration module 604, configured to configure, in a widget application, a data identifier of an icon to be displayed for the container;
an obtaining module 606, configured to enable the desktop launcher to traverse all views of the target widget based on the icon update instruction of the target widget, and find a target text box that matches the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed;
and the display module 608 is configured to load the icon to be displayed to the container corresponding to the data identifier by using a desktop starter, and display the icon to be displayed in the container.
According to the device, the container layout of the target Widget is configured in the Widget application, the data identifier of the icon to be displayed of each container is configured, the data identifier is identified in the desktop starter, and the desktop icon data corresponding to the data identifier can be loaded into the corresponding container for displaying, so that the problem that the icon of the same application program in the Widget is consistent with the desktop icon for displaying can be solved, the effect of enriching the display form of the icon in the Widget is achieved, and the user experience is improved.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
An embodiment of the present application further provides a storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
configuring a container layout of a target widget in a widget application; wherein the container layout comprises at least one container;
configuring a data identifier of an icon to be displayed for the container in a widget application;
the desktop starter traverses all views of the target widget based on the icon updating instruction of the target widget, and searches a target text box matched with the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed;
and the desktop starter loads the icon to be displayed to the container corresponding to the data identifier, and displays the icon to be displayed in the container.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the present application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above. The memory 104 in fig. 1 is taken as an example of a memory in the electronic device.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
configuring a container layout of a target widget in a widget application; wherein the container layout comprises at least one container;
configuring a data identifier of an icon to be displayed for the container in a widget application;
the desktop starter traverses all views of the target widget based on the icon updating instruction of the target widget, and searches a target text box matched with the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed;
and the desktop starter loads the icon to be displayed to the container corresponding to the data identifier, and displays the icon to be displayed in the container.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a memory device for execution by the computing devices and, in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be implemented as individual integrated circuit modules, or as individual integrated circuit modules. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method of displaying icons in a widget, the method comprising:
configuring a container layout of a target widget in a widget application; wherein the container layout comprises at least one container;
configuring a data identifier of an icon to be displayed for the container in a widget application;
the desktop starter traverses all views of the target widget based on the icon updating instruction of the target widget, and searches a target text box matched with the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed;
and the desktop starter loads the icon to be displayed to the container corresponding to the data identifier, and displays the icon to be displayed in the container.
2. The method of claim 1, wherein the data identification comprises a text box identification; the desktop starter traverses all views of the target widget based on the icon updating instruction of the target widget, and searches a target text box matched with the data identifier; obtaining desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed, wherein the method comprises the following steps:
acquiring the icon updating instruction;
traversing all views of the target widget based on the icon updating instruction, and searching and determining a target text box matched with the text box identification;
acquiring an application package indication identifier carried by the target text box;
and creating the icon to be displayed which is the same as the desktop icon data according to the application package indication identifier.
3. The method according to claim 2, wherein after obtaining the application package indication identifier carried by the target text box, before creating the icon to be presented in the widget, which is identical to the desktop icon data, according to the application package indication identifier, the method further comprises:
and determining that the icon to be displayed is not included in the container.
4. A method according to claim 3, wherein if the icon to be displayed is included in the container, the method further comprises:
acquiring target icon data corresponding to the application package indication identifier;
and updating the icon to be displayed according to the target icon data.
5. The method of claim 1, wherein the desktop icon data comprises: at least one of an icon's corner mark, an icon click animation, an icon long press event, and an icon open animation.
6. The method of claim 1, wherein before the desktop launcher traverses all views of the target widget based on the icon update instructions of the target widget, the method further comprises:
determining a target subclass from the widget host view class; the widget support loaded by the target subclass displays the desktop icon data;
loading the target widget based on the target subclass;
accordingly, the desktop launcher traverses all views of the target widget based on the icon update instruction of the target widget, including:
the desktop initiator traverses all views of the target widget based on an icon update instruction of the target widget loaded by the target sub-class.
7. The method of claim 1, wherein the icon update instruction comprises a first indication message characterizing widget creation or a second indication message characterizing widget update.
8. A device for displaying icons in a widget, the device comprising:
a container layout configuration module for configuring a container layout of the target widget in the widget application; wherein the container layout comprises at least one container;
the data identifier configuration module is used for configuring the data identifier of the icon to be displayed for the container in the widget application;
the acquisition module is used for traversing all views of the target widget by the desktop starter based on the icon updating instruction of the target widget and searching a target text box matched with the data identifier; acquiring desktop icon data corresponding to the target text box, and taking the desktop icon data as the icon to be displayed;
and the display module is used for loading the icon to be displayed to the container corresponding to the data identifier by the desktop starter and displaying the icon to be displayed in the container.
9. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when run.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of claims 1 to 7.
CN202311033797.0A 2023-08-15 2023-08-15 Method, device and storage medium for displaying icons in widget Pending CN117271022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311033797.0A CN117271022A (en) 2023-08-15 2023-08-15 Method, device and storage medium for displaying icons in widget

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311033797.0A CN117271022A (en) 2023-08-15 2023-08-15 Method, device and storage medium for displaying icons in widget

Publications (1)

Publication Number Publication Date
CN117271022A true CN117271022A (en) 2023-12-22

Family

ID=89214912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311033797.0A Pending CN117271022A (en) 2023-08-15 2023-08-15 Method, device and storage medium for displaying icons in widget

Country Status (1)

Country Link
CN (1) CN117271022A (en)

Similar Documents

Publication Publication Date Title
CN107957831B (en) Data processing method, device and processing equipment for displaying interface content
US10754633B2 (en) Application installation package generation method and apparatus, and storage medium
EP3335411B1 (en) Electronic device and method of managing application programs thereof
CN109445783B (en) Method and device for constructing dynamic configuration application driven by service
CN109478180B (en) Cloud content state determination logic
CN109725901A (en) Development approach, device, equipment and the computer storage medium of front-end code
CN109361948B (en) Interface management method, intelligent terminal and readable storage medium
CN109324857B (en) User guide implementation method, device and storage medium
CN111124412B (en) Game page drawing method, device, equipment and storage medium
CN107958365B (en) Material information changing method and device, storage medium and electronic equipment
KR20110090651A (en) Method and apparatus for generating application user adapted in portable terminal
WO2015184736A1 (en) Method and terminal for transforming background picture of touchscreen device
CN110020293A (en) Multi-medium data methods of exhibiting, device and storage medium
US8651951B2 (en) Game processing server apparatus
CN112631689A (en) Application program loading method and device and computer storage medium
CN113360211A (en) Loading display method based on control and related equipment
CN104182266B (en) A kind of application installation method and device
CN109634610B (en) Interface marking data generation method and device
CN110609957A (en) Method, terminal and server for global search
CN112130734B (en) Document management method and device based on floating layer technology
CN110457408B (en) Personalized map downloading method, device, equipment and storage medium
CN112286616A (en) Dynamic wallpaper setting method and device and electronic equipment
CN117271022A (en) Method, device and storage medium for displaying icons in widget
CN112307377A (en) Information display method and device and electronic equipment
CN117234638A (en) Method, device and storage medium for displaying target display object in widget

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication