Processing method and device

By listening to the view type and changes of widgets and adjusting the interface display accordingly, the limitations of transition states during widget loading are resolved, thus improving the user experience.

CN121764573APending Publication Date: 2026-03-31HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies have limitations in handling transition states during the loading process and result in poor user experience when displaying widgets.

Method used

By listening to the view type and view changes of the widgets, it can determine whether the displayed content has finished loading, and adjust the interface display when loading is complete, shrinking the original widgets to make room for the new widgets.

Benefits of technology

It improves the accuracy of widget loading process detection, reduces the display of transition states, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764573A_ABST
    Figure CN121764573A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a processing method and device, and relates to the technical field of terminals. The method comprises the following steps: displaying a first interface, wherein a first area of the first interface comprises a first small component; in response to an operation for displaying a second small component, when it is detected that loading of display content in the second small component is completed, the second small component is obtained, a second display area occupied by the second small component is smaller than a first display area occupied by the first small component, and the display content in the second small component is related to details in the first application; the first application is an application providing a second widget; and under the condition that the first display area is located in the second display area, displaying the second small component and the shrunk first small component in the first display area. Therefore, the electronic equipment can adjust the interface when determining that the display content is loaded, so as to reduce the limitation caused by displaying the occupied image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a processing method and apparatus. Background Technology

[0002] With the rapid development of electronic technology, various types of applications are emerging in endlessly. To increase user engagement with these applications, electronic devices can display applications or their content on the desktop in the form of application icons or widgets. Widgets can be used to display content such as calendar details, clock information, memos, or weather forecasts.

[0003] Typically, in response to a user's action to display a widget, an electronic device can load widget content at a fixed location, display a preset placeholder image during the loading process, and then display the widget content after loading is complete. However, the above method has certain limitations. Summary of the Invention

[0004] This application provides a processing method and apparatus, applied in the field of terminal technology, to improve the limitations in the display widget process.

[0005] In a first aspect, embodiments of this application propose a processing method. The method includes: displaying a first interface, wherein a first area of ​​the first interface includes a first widget; in response to an operation to display a second widget, upon detecting that the display content in the second widget has finished loading, acquiring the second widget, wherein the second widget occupies a second display area smaller than the first display area occupied by the first widget, and the display content in the second widget is related to details in a first application, the first application being the application that provides the second widget; and, when the first display area is located within the second display area, displaying the second widget and a scaled-down version of the first widget in the first display area.

[0006] Based on this, the electronic device can determine whether to display the second component by detecting whether the content displayed in the second component has been loaded. While displaying the second component, the electronic device can simultaneously perform the process of shrinking the first component due to the relationship between the first and second display areas, so as to reduce the amount of image occupied by the second component during the loading process.

[0007] In one possible implementation, detecting that the display content in the second widget has finished loading includes: listening to the second widget's view type being a content type, or listening to the view corresponding to the second widget changing and determining that the second widget's view type is a content type, where the content type is used to indicate that the second widget's view contains display content.

[0008] In this way, electronic devices can determine whether the content displayed in the second widget has been fully loaded by considering factors such as view type and / or view changes, thereby improving the accuracy of detection.

[0009] In one possible implementation, detecting that the view type of the second widget is a content type includes: detecting that the view type of the second widget is a content type through a first interface, where the first interface is used to listen for changes in the state of the view type; detecting that the view corresponding to the second widget has changed includes: detecting that the view corresponding to the second widget has changed through a second interface, where the second interface is used to listen for whether a new view has been generated.

[0010] The first interface can be interface 1 as described in the embodiments of this application, and the second interface can be interface 2 as described in the embodiments of this application. It is understood that the electronic device can initiate listening through the interface, enabling the electronic device to detect different changes in the state of the component and improve the accuracy of detection.

[0011] In one possible implementation, the method further includes generating either a first interface or a second interface before retrieving the second widget. This allows the electronic device to pre-configure a listening interface, enabling it to detect changes in the widget's state.

[0012] In one possible implementation, the view type may also include one or more of the following: a default type or an error type, wherein the default type is used to indicate that the drawing contains a placeholder image, the error type is used to indicate that the view is displaying abnormally, the placeholder image is used to indicate the display area occupied by the widget, and the placeholder image does not include the display content in the widget.

[0013] Understandably, electronic devices can use view types to mark the state of different views in order to assist in subsequent listening to changes in the state of widgets.

[0014] In one possible implementation, after responding to the operation for displaying the second widget, the method further includes: obtaining the view corresponding to the second widget; when it is detected that the remote view corresponding to the widget is not empty, obtaining the display content of the second widget from the remote view, the remote view being obtained from the first application, the remote view including the display content of the second widget; generating a first view with the display content of the second widget; and setting the view type of the second widget to a content type.

[0015] The first view can be the view described in the embodiments of this application. Figure 2The electronic device can obtain a remote view from the first application, and then obtain the actual display content needed in the second component from the remote view, and add the display content to the first view so that the electronic device can perform the display steps.

[0016] In one possible implementation, the electronic device includes: a widget host module and a widget view module. Obtaining the view corresponding to the second widget includes: the widget host module sending a first request to the widget view module, the first request being used to request an update to the view corresponding to the second widget; when it is detected that the remote view corresponding to the widget is not empty, obtaining the display content of the second widget from the remote view, including: the widget view module obtaining the display content of the second widget from the remote view when it detects that the remote view is not empty; after generating a first view containing the display content of the second widget and setting the view type of the second widget to a content type, the method further includes: the widget view module returning the first view to the widget host module.

[0017] The first request can be the request described in S520. The widget view module can perform steps such as determining whether the remote view is empty, setting the view type, and generating the first view, and then return the first view to the widget host module for subsequent use by the desktop application. The loading of the widget is completed through the interaction between modules.

[0018] Secondly, embodiments of this application provide a processing apparatus, which may be an electronic device, a chip, or a chip system within an electronic device. The processing apparatus may include a display unit and a processing unit. When the processing apparatus is an electronic device, the display unit may be a display screen. The display unit is used to perform display steps to cause the electronic device to implement a processing method described in the first aspect or any possible implementation of the first aspect. When the processing apparatus is an electronic device, the processing unit may be a processor. The processing apparatus may further include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to cause the electronic device to implement a processing method described in the first aspect or any possible implementation of the first aspect. When the processing apparatus is a chip or a chip system within an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit to cause the electronic device to implement a processing method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.), or a storage unit located outside the chip within the electronic device (e.g., a read-only memory, random access memory, etc.).

[0019] Specifically, the display unit is used to display a first interface, the first area of ​​which includes a first widget; in response to an operation to display a second widget, when it is detected that the display content in the second widget has been loaded, the processing unit is used to acquire the second widget, the second display area occupied by the second widget is smaller than the first display area occupied by the first widget, the display content in the second widget is related to details in the first application, and the first application is the application that provides the second widget; when the first display area is located within the second display area, the display unit is also used to display the second widget and the scaled-down first widget in the first display area.

[0020] Thirdly, embodiments of this application provide an electronic device, which includes: one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the methods described in the first aspect or any possible implementation thereof.

[0022] Fifthly, embodiments of this application provide a computer program product including a computer program. When the computer program product includes computer program code, when the computer program code is run on an electronic device, it causes the electronic device to perform the method described in the first aspect or any possible implementation of the first aspect.

[0023] Sixthly, this application provides a chip system applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0024] In one possible implementation, the chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip system, such as a register or cache, or it can be a storage unit of the chip system itself (e.g., read-only memory, random access memory, etc.).

[0025] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0026] Figure 1 A scenario diagram provided for an embodiment of this application;

[0027] Figure 2 This is another scenario illustration provided for an embodiment of this application;

[0028] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0029] Figure 4 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0030] Figure 5 A schematic diagram of module interaction for a processing method provided in an embodiment of this application;

[0031] Figure 6 A schematic diagram of module interaction for another processing method provided in an embodiment of this application;

[0032] Figure 7 A flowchart illustrating a processing method provided in an embodiment of this application;

[0033] Figure 8 This is a schematic diagram of the hardware structure of another electronic device provided in an embodiment of this application. Detailed Implementation

[0034] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:

[0035] 1. Other terms

[0036] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with substantially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order of execution. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.

[0037] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0038] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0039] 2. Electronic equipment

[0040] The electronic devices in this application embodiment may include handheld devices with display functions, vehicle-mounted devices, etc. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving vehicles, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.

[0041] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories.

[0042] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.

[0043] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0044] 3. widget

[0045] A widget can be understood as a small component embedded on the desktop, providing quick access to application functions and information. A widget can also be called a micro-component, component, etc.; in this embodiment, we will use "widget" as an example.

[0046] When a calendar widget is created for an electronic device corresponding to a calendar application, the widget can display the current date and other related information. This allows users to quickly view calendar details without opening the calendar application, improving the user experience. The display content and format of the calendar widget can be found below. Figure 1 or Figure 2 The description in the text will not be repeated here.

[0047] The following is combined with Figures 1-2 The corresponding implementation example illustrates the display process of the widget.

[0048] Figures 1-2 These are all schematic diagrams of a scenario provided in the embodiments of this application. Figures 1-2 In the description, a mobile phone is used as an example for illustration, but this example does not constitute a limitation on the embodiments of this application.

[0049] When an electronic device adds widget2 to the area where widget1 is displayed, and the display area occupied by widget1 is larger than the display area occupied by widget2, the electronic device can... Figure 1 The description in the text is used for interface display. Alternatively, when a widget2 is added to a blank space on the electronic device, the electronic device can display the widget based on the description in the text. Figure 2 The description in the text is displayed on the interface.

[0050] exist Figure 1 The description uses widget1 as widget102 and widget2 as widget105 as an example for illustration.

[0051] Electronic devices can display such as Figure 1 As shown in Figure A, the desktop may include icons for at least one application.

[0052] Figure 1 A can include: the calendar application icon 101, and widget 102, etc. Widget 102 can be used to display the weather forecast, and the display area occupied by widget 102 can be 2*4.

[0053] In response to a user's trigger action on icon 101 (such as placing the calendar application's corresponding widget 105 in the right position within widget 102), the electronic device can load the calendar application's corresponding widget 105. During the loading of widget 105, the electronic device can shrink widget 102 and display a placeholder image of the calendar application, such as showing... Figure 1 The interface shown in B.

[0054] It is understandable that placeholder images are only used to indicate the display area occupied by a widget; the content displayed in the widget cannot be shown in the placeholder image.

[0055] Figure 1B can display widget103 and placeholder image 104. Widget103 can be obtained by scaling down widget102 on an electronic device. The display area occupied by placeholder image 104 can be 2*2, that is, the display area occupied by placeholder image 104 is smaller than the display area occupied by widget102.

[0056] Furthermore, after the display content of widget105 is loaded, the electronic device can display, as follows: Figure 1 The interface shown in C.

[0057] Figure 1 In C, widget103 and widget105 can be displayed. Widget105 can include one or more of the following display contents: such as the icon of the calendar application, the name of the calendar application, the current date (such as September 29, the lunar calendar, the 27th of the eighth month, etc.), or matters related to the current date (such as today is auspicious for praying for blessings, today is inauspicious for getting a haircut, etc.).

[0058] Optionally, during the loading of widget105, the electronic device page can shrink widget102, such as displaying... Figure 1 The interface shown in D. Figure 1 D can include widget103, and a 2x2 area can be reserved to the right of widget103 for display. Furthermore, after the content of widget105 is loaded, the electronic device can display, as shown below... Figure 1 The interface shown in C.

[0059] exist Figure 2 The description uses widget202 as an example for illustration.

[0060] Electronic devices can display such as Figure 2 The desktop shown in Figure A, Figure 2 A may include the calendar application icon 101.

[0061] In response to a user's trigger action on icon 101 (such as placing the calendar application's corresponding widget 201 into an empty area), the electronic device can load the calendar application's corresponding widget 202. During the loading of widget 202, the electronic device can display a placeholder image for the calendar application, such as displaying... Figure 2 The interface shown in B.

[0062] Figure 2 Placeholder image 201 can be displayed in section B. The display area occupied by placeholder image 201 can be 2*4.

[0063] Furthermore, after the content of widget202 has been loaded, the electronic device can display, as follows: Figure 2 The interface shown in C.

[0064] Figure 2 In C, widget202 can be displayed. The content that widget202 can include can be similar to that described in widget105, and will not be repeated here.

[0065] In combination with the above Figure 1 as well as Figure 2 The description in the text, Figure 1 B or Figure 1 D can be understood as the transitional state during the loading process of widget105. Figure 2 B can be understood as the transitional state during the loading process of widget202. This transitional state not only has limitations in display, but also brings a poor user experience.

[0066] In view of this, embodiments of this application provide a processing method in which an electronic device can determine whether the view contains display content by monitoring whether the view type and / or view changes, and adjust the interface when it is determined that the display content has been loaded, in order to reduce... Figure 1 or Figure 2 The transition state described in the text.

[0067] To better understand the embodiments of this application, the structure of the electronic device according to the embodiments of this application is described below. For example, Figure 3 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application.

[0068] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, an indicator 192, a camera 193, and a display screen 194, etc.

[0069] The sensor module 180 may also include one or more of the following: proximity sensor, ambient light sensor, touch sensor, pressure sensor, gyroscope sensor, barometric pressure sensor, magnetic sensor, accelerometer, distance sensor, fingerprint sensor, temperature sensor, or bone conduction sensor, etc. Figure 3(not shown in the text), and this application does not specifically limit this in the embodiments.

[0070] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0071] The processor 110 may include one or more processing units, and the processor 110 may implement the execution steps in the interface processing method provided in the embodiments of this application.

[0072] like Figure 1 In the scenario described, the processor 110 can be set to listen and, after listening to the completion of the loading of widget2 corresponding to the non-desktop application, shrink widget1 at the location of widget2.

[0073] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc.

[0074] The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the charging management module 140 and the processor 110.

[0075] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0076] The electronic device implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU can be used to implement the image processing procedures in the processing methods described in the embodiments of this application, such as the steps of drawing widget2 and the scaled-down widget1.

[0077] Display screen 194 is used to display images and videos, for example, display screen 194 can display the images provided in the embodiments of this application. Figures 1-2 Any interface described in the document.

[0078] Electronic devices can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0079] Camera 193 is used to capture still images or videos.

[0080] The external storage interface 120 can be used to connect an external storage card.

[0081] Internal memory 121 can be used to store computer executable program code, which includes instructions.

[0082] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.

[0083] A touch sensor can be placed on the display screen 194. The touch sensor and the display screen 194 together form a touch screen, also known as a "touchscreen". The touch sensor can detect user operations on the touch screen, such as detecting user actions that trigger widget display.

[0084] Button 190 includes the power button, volume buttons, etc.

[0085] The software systems of electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc., which will not be elaborated here.

[0086] For example, Figure 4 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces.

[0087] In some embodiments, the Android system is divided into multiple layers, from top to bottom: the application (APP) layer, the application framework (FWK) layer, and the driver layer, etc. This application embodiment does not limit this.

[0088] The application layer may include a series of application packages. The application layer may include one or more of the following: desktop applications and non-desktop applications, etc., which are not limited in this embodiment.

[0089] Desktop applications can be used to create listeners to monitor widget processing. Alternatively, desktop applications can be used to shrink widget1 when widget1 is detected on the desktop and widget2's display area occupies part of widget1's area.

[0090] Desktop applications may include: a widget host module (or AppWidgetHost) and a widget view module (or AppWidgetHostView).

[0091] The widget host module can be used to forward messages obtained from the desktop application to the widget view module.

[0092] The widget view module can be used to detect whether a placeholder image or widget display content has been obtained, and to create a widget with the placeholder image or display content based on the placeholder image or widget display content.

[0093] Non-desktop applications can include system-provided applications as well as third-party applications.

[0094] For example, the applications provided by the system may include calendar applications, memo applications, and email applications, while third-party applications may include short video applications and shopping applications. This application does not impose any limitations on these applications. Figure 4 Not shown in the image.

[0095] Non-desktop applications may include widget management modules (or AppWidgetManager) and widget providers (or AppWidgetProvider), etc.

[0096] The widget provider module can be used to provide the display content of a widget, or the widget's footprint, etc.

[0097] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer.

[0098] The application framework layer includes a number of predefined interfaces. It may include one or more of the following: system services (system server), etc.

[0099] The system services may include a widget service module (or AppWidgetServiceImpl), which can be used to send the display content of widgets obtained from non-desktop applications, as well as the widget's occupation map, to the desktop application.

[0100] In possible implementations, the application framework layer may also include a display compositor, window manager, content provider, resource manager, view system, or notification manager, etc. Figure 4 Not shown in the image.

[0101] The driver layer is the layer between hardware and software. It is used to drive the hardware, enabling it to function. The driver layer can include one or more of the following: sensor driver, display driver, etc.

[0102] Sensor drivers are used to drive sensors to perform data detection steps, and display drivers are used to drive displays to perform interface display steps, etc.

[0103] It is understood that the embodiments of this application do not specifically limit the software layers involved in the software architecture, the modules contained in the software layers, and the functions of the modules.

[0104] Combination Figure 4 The software structure described herein will be explained in detail below through specific embodiments, illustrating the technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems. These specific embodiments can be implemented independently or in combination with each other. Similar or identical concepts or processes may not be described again in some embodiments.

[0105] Figure 5 This is a schematic diagram illustrating the module interaction of a processing method provided in an embodiment of this application. Figure 5 In a corresponding embodiment, the electronic device may include: a desktop application, a widget host module, a widget view module, a widget service module, a widget management module, and a widget provider module, etc. The function of each module can be found in [reference needed]. Figure 4 The description in the text.

[0106] The following is combined with Figure 1 The scenario described herein uses a non-desktop application, such as a calendar application, as an example for illustration. In this case, both the widget management module and the widget provider module can be modules within the calendar application.

[0107] like Figure 5 As shown, the processing method may include the following steps:

[0108] S501, the desktop application displays widget1 on the monitor.

[0109] S502, In response to the user's operation of triggering the display of widget2, the widget management module requests the desktop application to load the widget2 corresponding to the calendar application.

[0110] The request to load the widget2 corresponding to the calendar application can include: the calendar application's identifier, which can be represented by information such as the widget2's package name. In other words, the user can determine that they need to obtain the widget related to the calendar application by using the calendar application's identifier.

[0111] It is understandable that the content contained in widget2 corresponding to the calendar application is only used as an illustration. If widget2 corresponding to the calendar application contains other information, the desktop application can also store other information in S503, and then store the correspondence between other information and the ID of widget2 based on S504-S508.

[0112] S503, the identifier of the desktop application storing the calendar application.

[0113] S504: The desktop application requests the widget host module to assign an ID to widget2.

[0114] The ID requested for widget2 can also include: a default ID (such as 0), and the identifier of the calendar application. The default ID can be used to indicate that the widget has not been assigned an ID, and the identifier of the calendar application can be used to indicate the origin of widget2.

[0115] S505, the widget host module requests the widget service module to assign the ID of widget2.

[0116] The S506 widget service module assigns an ID to widget2 and stores it locally.

[0117] For example, the widget service module can assign an ID to widget2, which is different from the default ID. Then, the mapping between widget2's ID and the calendar application's identifier is stored locally in mWidget.

[0118] S507, the widget service module returns the ID of widget2 to the widget host module.

[0119] S508, the widget host module returns the ID of widget2 to the widget desktop application.

[0120] S509. The desktop application requests the creation of the view corresponding to widget2 from the widget host module.

[0121] The request to create the view corresponding to widget2 can include: the ID of widget2, and the identifier of the third-party application.

[0122] S510, the widget host module requests the widget service module to create the view corresponding to widget2.

[0123] S511, the widget service module determines whether the view corresponding to widget2 has been detected.

[0124] The widget service module can use the ID of widget2 to query the cache for remote views (i.e., RemoteViews) associated with the ID of widget2.

[0125] When it is detected that the RemoteViews associated with the ID of widget2 are empty (or it can be understood as no view corresponding to widget2 is detected), the widget service module can generate RemoteViews1, which can be empty, and then execute the steps shown in S512-S518.

[0126] Alternatively, when it is detected that RemoteViews associated with the ID of widget2 is not empty (or it can be understood as detecting the view corresponding to widget2), the widget service module can generate RemoteViews2. RemoteViews2 is not empty, and then the steps shown in S519-S525 are executed.

[0127] Specifically, the widget service module can pre-obtain RemoteViews associated with the ID of widget2 from the calendar application, enabling the widget service module to detect the view corresponding to widget2. The process of the widget service module obtaining RemoteViews associated with the ID of widget2 can be found in [link to documentation]. Figure 6 The description in the text.

[0128] S512, the widget service module returns remote view to the widget host module. Figure 1 .

[0129] S513, The widget host module requests the widget view module to update the view corresponding to widget2.

[0130] In the description of S513, the request to update the view corresponding to widget2 may include a remote view. Figure 1 For example, the widget host module can notify the widget view module to update the view by calling the updateAppwidget() method.

[0131] S514, upon detecting remote vision Figure 1 When empty, the widget view module obtains the placeholder image of widget2 through the widget service module and the widget provider module.

[0132] For example, the widget view module can request a placeholder image of widget2 from the widget service module, and the widget service module can request the placeholder image of widget2 from the widget provider module. The requested placeholder image of widget2 may include the identifier of the calendar application. When the widget provider module receives the identifier of the calendar application, it can return the placeholder image of widget2 to the widget service module, which then returns the placeholder image of widget2 to the widget view module.

[0133] Optionally, if the widget provider module determines that a placeholder image cannot be displayed, it can also send a message indicating that the placeholder image should not be displayed to the widget view module through the widget service module. In this case, the widget view module can determine the view... Figure 1 No content is displayed.

[0134] S515, the widget view module sets the view type to the default type.

[0135] View types can include: unfilled type, default type, content type, and error type, etc.

[0136] The "No INIT" field can be used to indicate that the view type is empty. When the view type is "No INIT", VIEW_MODE_NOINIT = 0.

[0137] The content type can be used to indicate whether a view contains displayed content. When the view type is content type, VIEW_MODE_NOINIT = 1.

[0138] Error types can be used to indicate that a view cannot be displayed correctly. When the view type is an error type, VIEW_MODE_NOINIT = 2.

[0139] The default type can be used to indicate that the view is a placeholder. When the view type is the default type, VIEW_MODE_NOINIT = 3.

[0140] It is understood that the above view types and the descriptions of the views under each type are merely examples and do not constitute a limitation on the embodiments of this application.

[0141] S516, the widget view module generates a view containing placeholder images. Figure 1 .

[0142] For example, the widget view module can generate a view by calling the addView() method. Figure 1 .

[0143] At this time, because the widget view module has not yet displayed the view... Figure 1 Return to the desktop application, so the desktop application will not be in view. Figure 1 Display it.

[0144] S516 can be implemented synchronously in S514, or it can be implemented after S514. This application embodiment does not limit this.

[0145] S517. The widget view module can return a view to the desktop application through the widget host module. Figure 1 .

[0146] See Figure 1 This can include an identifier indicating that the view type is the default type. When a view is detected in a desktop application... Figure 1 It can be determined that the view has changed. At this point, since the desktop application does not execute a listener mechanism, it can ignore the view change. Figure 1 Display it.

[0147] S518, Desktop application settings listener.

[0148] Desktop applications can set up listeners through interface 1 or interface 2. The meaning of interface 1 or interface 2 can be found in the descriptions of method 1-method 2 below, and will not be repeated here.

[0149] After S518, when a desktop application receives a remote view, it can replace the content displayed in the remote view with the content displayed in the desktop application. Figure 1 In the middle, a view with the content displayed by widget 2 is obtained, or a view. Figure 2 .

[0150] S519, the widget service module returns remote view to the widget host module. Figure 2 .

[0151] Combined with the following Figure 6 The description in the text, remote view Figure 2 This can include the display content of widget2. For example, the display content of widget2 can be as shown in widget105, which will not be elaborated further here.

[0152] S520, the widget host module requests the widget view module to update the view corresponding to widget2.

[0153] In the description of S520, the request to update the view corresponding to widget2 can include remote views. Figure 2 .

[0154] S521, upon detecting remote vision Figure 2 When not empty, the widget view module is based on the remote view. Figure 2Load the display content of widget2.

[0155] S522, the widget view module sets the view type to content type.

[0156] The meaning of content type can be found in the description in S515, and will not be repeated here.

[0157] S523, the widget view module generates a view containing the displayed content. Figure 2 .

[0158] S523 can be implemented synchronously in S521, or it can be implemented after S521. This application embodiment does not limit this.

[0159] For example, the widget view module can generate a view by calling the addView() method. Figure 2 .

[0160] S524. The widget view module can return a view to the desktop application through the widget host module. Figure 2 .

[0161] See Figure 2 This can include an identifier indicating that the view type is the default type. When a view is detected in a desktop application... Figure 2 It can be determined that the view has changed. At this point, since the desktop application does not execute a listener mechanism, it can ignore the view change. Figure 2 Display it.

[0162] Adaptable, when the desktop application detects the view Figure 2 After that, you can temporarily avoid eye contact. Figure 2 Display it.

[0163] S525, Desktop application settings listener.

[0164] Desktop applications can set up listeners through interface 1 or interface 2. The meaning of interface 1 or interface 2 can be found in the descriptions of method 1-method 2 below, and will not be repeated here.

[0165] S526, Desktop applications obtain visual information based on method one or method two. Figure 2 .

[0166] Method 1: When the desktop application detects that the view type is content, obtain the view... Figure 2 .

[0167] In Method 1, the desktop application can add Interface 1 before S526. Interface 1 can be used to listen for state changes of view types in the widget view module. For example, when the desktop application detects through Interface 1 that the view type in the widget view module is content type, it determines that it can obtain the view with displayed content, i.e., the view... Figure 2 .

[0168] Among them, interface 1 can be AppWidgetHostView.setOnHierarchyChangeListener().

[0169] It should be noted that electronic devices can add interface 1 by modifying the system source code and synchronize interface 1 to the system. This interface 1 can correspond to the system version.

[0170] Method 2: When a view change is detected, the widget host module obtains the view type. If the view type is content type, it obtains the view... Figure 2 .

[0171] The change in view can be understood as the detection of a view generated in S512. Figure 2 .

[0172] In Method 2, the desktop application can add Interface 2 before S526. Interface 2 can be used to listen for changes in the view in the widget view module (or to understand it as whether a view has been generated). For example, the desktop application listens for the generation of a view in the widget view module through Interface 2.

[0173] Furthermore, desktop applications can be accessed via video. Figure 2 The information contained therein determines that the view type is a content type and obtains the view... Figure 2 .

[0174] Optionally, if the electronic device does not execute S524, the desktop application can send a request to the widget host module to obtain the view type, and the widget host module can send a request to the widget view module to obtain the view type. The widget view module can then return the view type (i.e., the content type) to the desktop application through the widget host module. When the desktop application detects the content type, it obtains the view type. Figure 2 .

[0175] Interface 2 can be setOnHierarchyChangeListener().

[0176] Combining the descriptions of Method 1 and Method 2, electronic devices can directly monitor whether the view type is a content type using Method 1 to simplify the processing flow; or they can use Method 2 to detect whether the view type is a content type only when a change in the view is detected, thereby improving the reliability of the processing flow.

[0177] Optionally, the electronic device can also retrieve the view generated when the view change is detected from the widget view module, such as the view... Figure 1 Or view Figure 2 In this scenario, the electronic device can listen to the view generated in the widget view module through interface 2. At this time, there may be situations where the view contains an occupied image or an abnormal image. The abnormal image can be used to indicate that the widget is displaying an error.

[0178] Furthermore, the desktop application records view changes at this time, for example, when a view change is detected. Figure 1 When a view change occurs, it is determined that a view change has taken place, and then the view is detected. Figure 2 At that time, it was determined that two view changes had occurred. Desktop applications can determine whether to display the changed view when the number of view changes detected is 2 or higher. Figure 2 .

[0179] Under normal circumstances, a widget can first display the occupancy image and then the actual content. Therefore, electronic devices can determine when to display the changed view by recording the number of view changes, i.e., when two view changes are detected. Figure 2 This reduces the number of times the occupancy map is displayed.

[0180] S527, The desktop application shrinks widget1 and displays the shrunken widget1 along with the view. Figure 2 widget2.

[0181] For example, desktop applications can display things like Figure 1 The interface shown in C.

[0182] It should be noted that in S527, the desktop application can, when it detects that widget1 can be minimized and the display area of ​​widget2 is within the display area of ​​widget1, execute the action of minimizing widget1 and displaying the minimized widget1 along with the display area. Figure 2 The steps for widget2.

[0183] Based on this, electronic devices can use a monitoring mechanism to determine whether the view contains display content by listening for changes in view type and / or view type. Once the display content has finished loading, the interface can be adjusted to reduce [the impact of changes]. Figure 1 or Figure 2 The transition state described in the text.

[0184] The following is combined with Figure 6 The corresponding embodiment illustrates the process by which a desktop application obtains RemoteViews associated with the ID of widget2 from a non-desktop application.

[0185] Figure 6 This is a schematic diagram illustrating the module interaction of an alternative processing method provided in an embodiment of this application. Figure 6 In a corresponding embodiment, the electronic device may include: a desktop application, a widget host module, a widget service module, a widget management module, and a widget provider module, etc. The function of each module can be found in [reference needed]. Figure 4 The description in the text.

[0186] like Figure 6 As shown, the processing method may include the following steps:

[0187] S601, the desktop application requests the display content of widget2 from the widget service module through the widget host module.

[0188] The request to retrieve the display content of widget2 may include: widget2's ID and the identifier of the calendar application.

[0189] S602, the widget service module requests the display content of widget2 from the widget provider module.

[0190] For example, the widget service module can send a request to the widget provider module by calling the onReceive() method.

[0191] S603, the widget provider module creates RemoteViews containing the displayed content.

[0192] After the widget provider module confirms that the request has been received, it can obtain the display content of widget2 based on the identifier of the calendar application, and then create RemoteViews containing the display content.

[0193] S604, the widget provider module returns the IDs of RemoteViews and widget2 to the widget management module.

[0194] S605, the widget management module returns the IDs of RemoteViews and widget2 to the widget service module.

[0195] S606, the widget service module returns the IDs of RemoteViews and widget2 to the widget host module.

[0196] After S606, the widget host module can also return the IDs of RemoteViews and widget2 to the desktop application, allowing the desktop application to view them after S517. Figure 1 Replace the content in the image to obtain the view. Figure 2 .

[0197] In the descriptions of S604-S606, the IDs of RemoteViews and widget2 can be transmitted via messages, but this application embodiment does not limit this.

[0198] Following S605, the electronic device can perform the steps shown in S520-S527, for details of which can be found in [link to S605]. Figure 5 The description in the text will not be repeated here.

[0199] It should be noted that electronic devices can also be based on Figures 5-6 The description of execution Figure 1 The processing steps described in the scenario will not be elaborated upon here.

[0200] exist Figures 5-6 Based on the corresponding embodiments, Figure 7 This application provides a flowchart of a processing method.

[0201] exist Figure 7 In a corresponding embodiment, the processing method may include the following steps:

[0202] S701, the electronic device displays the first interface.

[0203] The first area of ​​the first interface includes the first widget.

[0204] The first component can be widget1 as described in the embodiments of this application, and the first interface can be... Figure 1 The interface shown in Figure A.

[0205] S702, In response to the operation for displaying the second widget, when it is detected that the display content in the second widget has finished loading, the second widget is obtained.

[0206] The second component can be widget2 as described in the embodiments of this application.

[0207] The completion of content loading in the second widget can include: detecting that the view type of the second widget is content type, or detecting that the view corresponding to the second widget has changed and determining that the view type of the second widget is content type.

[0208] The second widget occupies a smaller display area than the first widget occupies. The content displayed in the second widget is related to details in the first application, which is the application that provides the second widget. For example, the first application could be a calendar application.

[0209] S703, when the first display area is located within the second display area, the second widget and the scaled-down first widget are displayed in the first display area.

[0210] For example, electronic devices can display such as Figure 1 The interface shown in C.

[0211] based on Figure 7 As described, the electronic device can determine whether to display the second component by detecting whether the content displayed in the second component has been loaded. While displaying the second component, the electronic device can simultaneously perform the process of shrinking the first component due to the relationship between the first and second display areas, so as to reduce the amount of image occupied by the second component during the loading process.

[0212] It should be noted that the module names involved in the embodiments of this application can all be defined as other names, as long as they can achieve the function of each module, and no specific restrictions are placed on the module names.

[0213] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0214] The processing method of the embodiments of this application has been described above. The apparatus for performing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined and referenced with each other, and the related apparatus provided in the embodiments of this application can perform the steps in the above list sorting method.

[0215] Figure 8 This is a schematic diagram of the hardware structure of another electronic device provided in an embodiment of this application.

[0216] The electronic device includes a processor 801, a communication line 804, and at least one communication interface. Figure 8 (The example provided uses communication interface 803 as an example.)

[0217] The processor 801 may be a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.

[0218] Communication line 804 may include circuitry for transmitting information between the aforementioned components.

[0219] The communication interface 803 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.

[0220] Possibly, the electronic device may also include a memory 802.

[0221] The memory 802 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via communication line 804. The memory may also be integrated with the processor.

[0222] The memory 802 stores computer execution instructions for implementing the scheme of this application, and its execution is controlled by the processor 801. The processor 801 executes the computer execution instructions stored in the memory 802 to implement the method provided in the embodiments of this application.

[0223] It is possible that the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.

[0224] In a specific implementation, as one example, the processor 801 may include one or more CPUs, for example... Figure 8 CPU0 and CPU1 in the CPU.

[0225] In a specific implementation, as one example, an electronic device may include multiple processors, for example... Figure 8 Processors 801 and 805 are mentioned. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0226] The display method provided in this application can be applied to electronic devices with communication functions. Electronic devices include terminal devices, and the specific device form of the terminal device can be referred to the above-described related descriptions, which will not be repeated here.

[0227] This application provides a terminal device, which includes a processor and a memory; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, causing the terminal device to perform the above-described method.

[0228] This application provides a chip. The chip includes a processor, which is used to call a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.

[0229] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0230] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0231] This application provides a computer program product, which includes a computer program that, when run, causes a computer to perform the above-described method.

[0232] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0233] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A processing method characterized by, The method applied to an electronic device comprises: displaying a first interface, the first interface comprising a first widget in a first region of the first interface; in response to an operation for displaying a second widget, obtaining the second widget when it is detected that display content in the second widget is loaded, the second widget occupying a second display region smaller than a first display region occupied by the first widget, the display content in the second widget being related to details in a first application, the first application being an application providing the second widget; in a case where the first display region is located within the second display region, displaying the second widget and the first widget in the first display region.

2. The method of claim 1, wherein, detecting that the display content in the second widget is loaded, comprising: listening to a view type of the second widget being a content type, or listening to a view corresponding to the second widget changing and determining that the view type of the second widget is the content type, the content type being used to indicate that the view of the second widget contains the display content.

3. The method of claim 2, wherein listening to the view type of the second widget being the content type comprises: listening to the view type of the second widget being the content type through a first interface, the first interface being used to listen to a state change of the view type; listening to the view corresponding to the second widget changing comprises: listening to the view corresponding to the second widget changing through a second interface, the second interface being used to listen to whether a new view is generated.

4. The method of claim 3, wherein, Before the second widget is obtained, the method further comprises: generating the first interface or the second interface.

5. The method according to any one of claims 2-4, characterized in that, The view type further comprises one or more of the following: a default type or an error type, the default type being used to indicate that a placeholder is contained in a drawing, the error type being used to indicate that a view displays abnormally, the placeholder being used to indicate a display region occupied by a widget, and the placeholder not including display content in the widget.

6. The method according to any one of claims 1 to 5, characterized in that, After the operation for displaying the second widget is responded to, the method further comprises: obtaining a view corresponding to the second widget; when it is detected that a remote view corresponding to the widget is not empty, obtaining the display content in the second widget from the remote view, the remote view being obtained from the first application, the remote view including the display content in the second widget; generating a first view with the display content in the second widget and setting the view type of the second widget to the content type.

7. The method of claim 6, wherein, The electronic device comprises a widget host module and a widget view module, obtaining the view corresponding to the second widget comprises: the widget host module sending a first request to the widget view module, the first request being used to request to update the view corresponding to the second widget; In the case that the remote view corresponding to the widget is detected to be not empty, the display content in the second widget is obtained from the remote view, including: the widget view module obtains the display content in the second widget from the remote view in the case that the remote view is detected to be not empty; After the first view with the display content in the second widget is generated and the view type of the second widget is set to the content type, the method further includes: the widget view module returns the first view to the widget host module.

8. An electronic device, comprising: The electronic device includes one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store computer program codes including computer instructions, and the one or more processors are configured to invoke the computer instructions to enable the electronic device to perform the method in any one of claims 1 to 7.

9. A chip system, characterized by The chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to enable the electronic device to perform the method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium includes computer instructions configured to enable the electronic device to perform the method in any one of claims 1 to 7 when the computer instructions are run on the electronic device.

11. A computer program product, characterised in that, The computer program product includes computer program codes configured to enable the electronic device to perform the method in any one of claims 1 to 7 when the computer program codes are run on the electronic device.