Display device and floating window display method
By responding to the operation of the floating window of the touch development target on the display device, the display area is determined based on the priority of the view element, which solves the problem of the floating window blocking important elements of the interface and improves the user experience.
Patent Information
- Application Number
- CN202411607973.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-09-05
- Filing Date
- 2024-11-11
- Publication Date
- 2025-04-11
AI Technical Summary
The floating window display position on existing display devices is fixed or random, which can easily obstruct important view elements in the interface and affect the user experience.
By responding to the trigger operation of the touch development target floating window, the area information of the view element is obtained based on the priority of the view element in the interface, and the target display area is determined to display the floating window without blocking the view element higher than or equal to the target priority.
Effectively avoiding floating windows blocking important view elements, improving user operation and viewing experience.
Smart Images

Figure CN119806694A_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202411245464.9, filed on September 5, 2024, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to computer technology, and more specifically, to a display device and a floating window display method. Background Art
[0003] With the continuous development of electronic technology, display devices (such as mobile phones, tablet computers, etc.) have brought great convenience to people's lives and work. With the popularization of display devices, more and more users chat, shop, watch videos and news, etc. through applications installed on display devices, so that display devices have become an important tool for users to learn, socialize, and entertain.
[0004] Currently, many application interactions on display devices use floating windows to improve user experience. However, the display position of floating windows is usually fixed or random, so the display of floating windows may block some important view elements (such as input boxes, video windows, etc.) in the interface, causing users to be unable to view or operate the blocked view elements, seriously affecting user experience. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present application provide a display device and a floating window display method, which can avoid the floating window from blocking more important view elements to a certain extent, thereby improving the user experience.
[0006] In a first aspect, an embodiment of the present application provides a display device, comprising: a display, configured to: display a user interface; a controller, configured to: in response to a triggering operation for triggering display of a target floating window, obtain area information of an area occupied by at least one first view element in the interface based on the priority of at least one view element in the interface, the at least one first view element being a view element of the at least one view element excluding view elements with a lower priority than a target; the priority of the view element is used to indicate the level of preventing the corresponding view element from being obscured by the floating window; determining a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as a target display area; and displaying the target floating window in the target display area.
[0007] In a second aspect, an embodiment of the present application provides a floating window display method, comprising: in response to a triggering operation for triggering display of a target floating window, based on the priority of at least one view element in the interface, obtaining area information of an area occupied by at least one first view element in the interface, the at least one first view element being a view element among the at least one view element except a view element with a lower priority than a target view element; the priority of the view element is used to indicate the level of preventing the corresponding view element from being obscured by the floating window; determining a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as a target display area; and displaying the target floating window in the target display area.
[0008] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the floating window display method shown in the second aspect is implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a computer program product, including: when the computer program product is run on a computer, the computer implements the floating window display method shown in the second aspect.
[0010] Compared with the prior art, the technical solution provided by the embodiment of the present application has the following advantages: In the embodiment of the present application, by responding to the triggering operation of triggering the display of the target floating window, based on the priority of at least one view element in the interface, the area information of the area occupied by at least one first view element in the interface is obtained, and the at least one first view element is a view element other than the view element with a lower priority than the target in the at least one view element; the priority of the view element is used to indicate the level of preventing the corresponding view element from being blocked by the floating window; the display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element is determined as the target display area; the target floating window is displayed in the target display area. In this way, based on the priority of at least one view element, the target display area that does not overlap with the display area where the view element with a priority higher than or equal to the target priority is located is determined, and the target floating window is displayed in the target display area, which can avoid, to a certain extent, the display of the target floating window from blocking more important view elements (with a priority higher than or equal to the target priority), so that the user can quickly view or operate the more important view element, which can improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0012] Figure 1 An operation scenario between a display device and a control device according to some embodiments is shown;
[0013] Figure 2 shows a hardware configuration block diagram of a control device 100 according to some embodiments;
[0014] Figure 3 shows a hardware configuration block diagram of a display device 200 according to some embodiments;
[0015] Figure 4 shows a software configuration diagram in a display device 200 according to some embodiments;
[0016] Figure 5 One of the interface schematic diagrams of the floating window display method according to some embodiments is shown;
[0017] Figure 6 A second interface schematic diagram of a floating window display method according to some embodiments is shown;
[0018] Figure 7 A third interface schematic diagram of a floating window display method according to some embodiments is shown;
[0019] Figure 8 A fourth interface schematic diagram of a floating window display method according to some embodiments is shown;
[0020] Fig. 9 One of the flowcharts of the floating window display method according to some embodiments is shown;
[0021] Fig.10 A second flowchart of a floating window display method according to some embodiments is shown. DETAILED DESCRIPTION
[0022] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0023] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0024] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0025] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0026] The display device provided in the embodiments of the present application may have various implementation forms, for example, it may be a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, etc.
[0027] Figure 1 FIG. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment, wherein the control device includes an intelligent device or a control apparatus. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control apparatus 100 .
[0028] In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.
[0029] In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.
[0030] In some embodiments, the display device may not use the above-mentioned smart device or control device to receive instructions, but may receive user control through touch or gestures.
[0031] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
[0032] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be one cluster or multiple clusters, and may include one or more types of servers.
[0033] Figure 2 Schematically shows a block diagram of a configuration of the control device 100 according to an exemplary embodiment. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, an external memory, and a power supply. The control device 100 can receive an input operation instruction from a user, and convert the operation instruction into an instruction that can be recognized and responded to by the display device 200, playing the role of an interactive intermediary between the user and the display device 200.
[0034] like Figure 3 The display device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a user interface 280, an external memory, and a power supply.
[0035] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output.
[0036] The display 260 includes a display screen component for presenting images, and a driving component for driving image display, which is used to receive image signals output from the controller, and display video content, image content, and menu control interface components and user control UI interface.
[0037] The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection interface.
[0038] The communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
[0039] The user interface 280 can be used to receive control signals from the control device 100 (such as an infrared remote controller, etc.) It can also be used to directly receive user input operation instructions and convert the operation instructions into instructions that the display device 200 can recognize and respond to, which can be called a user input interface.
[0040] The detector 230 is used to collect signals from the external environment or the external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0041] The external device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.
[0042] The tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
[0043] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0044] The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory (internal memory or external memory). The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the controller 250 can perform operations related to the object selected by the user command.
[0045] In some embodiments, the controller includes a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), and at least one of a random access memory (RAM), a read-only memory (ROM), a first interface to an nth interface for input / output, a communication bus, etc.
[0046] Among them, RAM, also called main memory, is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except when refreshed), and it is very fast. It is usually used as a temporary data storage medium for operating systems or other running programs. The biggest difference between it and ROM is the volatility of data, that is, once the power is cut off, the stored data will be lost. RAM is used in computers and digital systems to temporarily store programs, data and intermediate results. ROM works in a non-destructive read-out mode and can only read but not write information. Once the information is written, it is fixed, and even if the power is cut off, the information will not be lost, so it is also called fixed memory.
[0047] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
[0048] "User interface" is the medium interface for interaction and information exchange between applications or operating systems and users. It realizes the conversion between the internal form of information and the form acceptable to users. The commonly used form of user interface is the Graphical User Interface (GUI), which refers to the user interface related to computer operation displayed in a graphical way. It can be an icon, window, control or other interface element displayed on the display screen of a display device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements.
[0049] The diversity of display devices provides users with a variety of product forms. On devices such as mobile phones, TVs, and tablets, many application interactions use floating window displays to enhance the user experience. For example, although the input method on mobile phones and other devices is often displayed in half screen, the half screen display will occupy a large amount of display area, which is very inconvenient for users to operate manually. Therefore, functional scenarios such as floating input methods and floating applications have emerged. However, since the display area of the floating window is fixed or random, there is a problem that the floating window may block the view elements in other interfaces on the interface, especially some more important view elements, resulting in the inability to quickly view or operate these blocked view elements, resulting in a poor user experience.
[0050] The present application provides a display device, a floating window display method, and a computer-readable storage medium, wherein the display device can implement the floating window display method provided in the present application embodiment, or the functional module or functional entity in the display device can implement the floating window display method provided in the present application embodiment. The display device includes: a controller and a display, respectively corresponding to the above Figure 3 The controller 250 and the display 260 are shown in FIG.
[0051] In some embodiments of the present application, the display is configured to: display a user interface; the controller is configured to: in response to a triggering operation for triggering display of a target floating window, obtain area information of an area occupied by at least one first view element in the interface based on the priority of at least one view element in the interface, the at least one first view element being a view element among the at least one view element except a view element with a lower priority than a target; the priority of the view element is used to indicate the level of preventing the corresponding view element from being obscured by the floating window; determine a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as a target display area; and display the target floating window in the target display area.
[0052] Among them, the interface is a graphical user interface displayed on the screen of the display device. The interface can display application windows of one or more applications, and each application window displays corresponding view elements. Therefore, at least one view element can be a view element displayed in one application window or a view element displayed in multiple application windows.
[0053] Among them, when an application window of an application is displayed in the interface, the application window can be displayed in full screen or in floating state; when application windows of multiple applications are displayed in the interface, the multiple application windows can be displayed in split screen or in superposition. The specific details can be determined according to actual conditions and are not limited here.
[0054] The at least one view element may be all view elements in the interface, or all view elements in the interface that have been set with a priority. The interface may also include view elements that have not been set with a priority. The view elements in the interface that have not been set with a priority do not need to consider whether they are blocked by the floating window, and are view elements that can be blocked, hereinafter referred to as view elements that can be blocked.
[0055] The priority of at least one view element includes the priority corresponding to each view element in at least one view element. The priority of a view element can be determined by the application of the interface where the view element is located according to the importance of the view element (the importance of the view element can be preset by the application, or determined by the application according to the user's usage habits); or it can be determined according to the element type to which the view element belongs, and the mapping relationship between multiple element types and multiple priorities. The specific priority of the view element can be determined according to the actual situation and is not limited here.
[0056] The area information of the area occupied by at least one view element in the interface (hereinafter referred to as the area information of at least one view element) includes: the area information of the area occupied by each view element in the interface. The area information of a view element is determined according to the size information of the view element and the position information in the interface.
[0057] Among them, the target display area that matches the size information can be that the size information of the target display area is the same as the size information of the target floating window, or the size information of the target display area (indicated size) is the product of the size information of the target floating window (indicated size) and the target ratio (the target ratio is within a preset ratio range, and the preset ratio range can be determined according to actual conditions and is not limited here. For example, the target ratio range is greater than or equal to 90% and less than or equal to 1), or the size information of the target display area is slightly larger than the size information of the target floating window, that is, it can be used to fully display the target floating window within the target display area; the target display area that matches the size information can be determined specifically according to actual conditions and is not limited here.
[0058] In some embodiments of the present disclosure, the priority of at least one view element, and the area information of the at least one view element, may be determined before receiving the triggering operation for triggering the display target floating window; may also be determined in response to the triggering operation for triggering the display target floating window; may also be partially determined before receiving the triggering operation for triggering the display target floating window, and partially determined in response to the triggering operation for triggering the display target floating window; the specific determination may be based on actual conditions and is not limited here.
[0059] In an embodiment of the present application, in response to a trigger operation for triggering the display of a target floating window, based on the priority of at least one view element in the interface, the region information of the region occupied by at least one first view element in the interface is obtained, and the at least one first view element is a view element in the at least one view element except for the view element with a lower priority than the target; the priority of the view element is used to indicate the level of preventing the corresponding view element from being blocked by the floating window; the display area in the interface that matches the size information of the target floating window and does not overlap with the region information of any first view element is determined as the target display area; and the target floating window is displayed in the target display area. In this way, based on the priority of at least one view element, a target display area that does not overlap with the display area where the view element with a priority higher than or equal to the target priority is located is determined, and the target floating window is displayed in the target display area, which can, to a certain extent, avoid the display of the target floating window blocking a more important view element (with a priority higher than or equal to the target priority), so that the user can quickly view or operate the more important view element, which can improve the user experience.
[0060] In some embodiments of the present application, the target priority is the lowest priority among the priorities of the at least one view element, the at least one first view element is all the view elements in the at least one view element, and the target display area does not include any view element in the at least one view element; that is, displaying the target floating window in the target display area will not obstruct any view element in the at least one view element.
[0061] It can be understood that if at least one first interface only includes at least one view element, then when the target display area does not include any view element of the at least one view element, the target display area is an empty area where no view element is displayed. In this way, displaying the target floating window in the target display area may not block any view element in the interface. If at least one first interface includes, in addition to at least one view element, a view element that can be blocked, the target display area may be an empty area where no view element is displayed, or may be an area where a view element that can be blocked is displayed. In this way, displaying the target floating window in the target display area may not block any view element in the interface, or may block the view element that can be blocked in the interface.
[0062] For example, Figure 4 As shown, the interface includes view elements corresponding to the bold solid line frame, view elements corresponding to the non-bold solid line frame and view elements corresponding to the dotted line frame. The priority of the view elements corresponding to the bold solid line frame is higher than the priority of the view elements corresponding to the non-bold solid line frame, and the priority of the view elements corresponding to the non-bold solid line frame is higher than the priority of the view elements corresponding to the dotted line frame, as shown in FIG. Figure 5As shown, the target floating window is displayed in an empty area where no view element is displayed.
[0063] In some embodiments of the present application, the target priority is not the lowest priority among the priorities of the at least one view element, the at least one first view element is a partial view element among the at least one view element, and the at least one first view element is a view element among the at least one view element except the view element whose priority is lower than the target priority, then there is a view element whose priority is lower than the target priority in the target display area.
[0064] In some embodiments of the present disclosure, the controller executes to determine a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area. Specifically, the controller is configured as follows: when there are multiple display areas in the interface that match the size information and do not overlap with the area information of any first view element, the display area with the smallest occupied area by the view element among the multiple display areas is determined as the target display area.
[0065] In some embodiments of the present disclosure, when there are multiple display areas in the interface that match the size information and do not overlap with the area information of any first view element, the display area with the smallest occupied area by the first-priority view element among the multiple display areas is determined as the target display area.
[0066] Among them, the first priority is one level lower than the target priority (for example, the priority levels include high priority, medium priority and low priority. If the target priority is medium priority, the first priority is low priority. If the target priority is high priority, the first priority is medium priority).
[0067] It can be understood that the target display area includes the target view element in the at least one view element, and the priority of the target view element is the first priority. The target view element can be one view element, or it can include multiple view elements with the same priority, which can be determined according to actual conditions and is not limited here.
[0068] In an embodiment of the present application, the target display area is determined as the area occupied by the first-priority view element among the multiple display areas. This can minimize the display target floating window and the obstruction of the first-priority view element. This can facilitate users to view and operate the obscured first-priority view element, thereby improving user experience.
[0069] It can be understood that displaying the target floating window in the target display area obstructs view elements in at least one view element (including at least view elements of the first priority, and may also obstruct other view elements with a lower priority than the first priority). However, since the priority of the highest priority view elements included in any other display areas in the interface that match the size information (and can display the target floating window) is greater than or equal to the first priority, displaying the target floating window in the target display area is the solution that has the least impact on at least one view element and minimizes the obstruction of the view elements of the first priority. Therefore, to a certain extent, the user can quickly view or operate the view elements of the first priority, which can improve the user experience.
[0070] For example, Figure 6 As shown, the interface includes view elements corresponding to bold solid line boxes and view elements corresponding to non-bold solid line boxes. The view elements corresponding to bold solid line boxes have a higher priority than the view elements corresponding to non-bold solid line boxes. Figure 7 As shown, the target floating window is displayed in the target display area including the view element 6 (target view element), and the overlapping area between the target display area and the view element 6 is less than or equal to the overlapping area between other display areas (areas that can be used to display the target floating window) and the corresponding second view element.
[0071] In some embodiments of the present application, when there are multiple display areas in the interface that match the size information and do not overlap with the area information of any first view element, the one in which the sum of the occupied areas of all view elements is the smallest among the multiple display areas is determined as the target display area. In this way, the impact on view elements with a lower priority than the target can be minimized, and the user experience can be improved. Furthermore, displaying the target floating window in the target display area minimizes the impact on at least one view element and minimizes the occlusion of more important view elements. Therefore, to a certain extent, it can avoid the display of the floating window occluding more important view elements, and the user can quickly view or operate the more important view elements, which can improve the user experience.
[0072] In some embodiments of the present disclosure, before the controller executes the acquisition of area information of the area occupied by at least one first view element in the interface, it is also configured to: determine the priority of the at least one view element, and the area information of the at least one view element; save the identification of the at least one view element and the area information to a view list of corresponding priority according to the priority of the at least one view element, to obtain at least one view list; the controller executes the acquisition of area information of the area occupied by at least one first view element in the interface, and is specifically configured to: acquire the area information of the at least one first view element from the at least one view list.
[0073] It can be understood that at least one view list can be one view list, and the identifiers and region information of view elements of all priorities are stored in one view list. In this case, the one view list also stores the priority of each view element; at least one view list can be multiple view lists, and the identifiers and region information of view elements of different priorities are stored in different view lists. In this case, different view lists indicate the priorities of the stored view elements, and the view list does not need to store the priority of each view element. Whether the at least one view list includes one view list or multiple view lists can be determined according to actual conditions and is not limited here.
[0074] In an embodiment of the present disclosure, the identification and area information of the view element are stored in at least one view list to facilitate the management of at least one view element, thereby facilitating the rapid acquisition of the area information of at least one first view element from at least one view list, and further used to rapidly determine the target display area.
[0075] In some embodiments of the present disclosure, in a case where the view list is used to store the identifiers and the area information of view elements of the same priority, the controller executes obtaining the area information of the at least one first view element from the at least one view list, and is specifically configured to obtain the area information of the at least one first view element from a view list with a higher priority than the target priority and a view list with a priority equal to the target priority.
[0076] It can be understood that different view lists store the identifiers and area information of view elements of different priorities, and the identifiers and area information of view elements of equal priority are stored in the same view list. Among them, the identifier of the view element is used to indicate the corresponding view element, and the area information of the view element is used to indicate the display area of the corresponding view element on the interface.
[0077] In an embodiment of the present application, the identifier of each view element and the area information are saved in a view list of corresponding priority according to the priority of each view element, and multiple view lists are obtained to facilitate the management of at least one view element, thereby facilitating the acquisition of the area information of at least one first view element from a view list with a higher priority than the target priority and a view list with an equal priority to the target priority in at least one view list, and then used to quickly determine the target display area.
[0078] In some embodiments of the present disclosure, when the at least one first view element includes a view element with a priority level equal to the target priority and a view element with a priority level higher than the target priority, after the controller executes the acquisition of area information of the area occupied by the at least one first view element in the interface, it is further configured to: when there is no area in the interface that matches the size information and does not overlap with the area information of any first view element, acquire the area information of the area occupied by at least one second view element in the interface, the at least one second view element being a view element with a priority level higher than the target priority among the at least one first view element; and determine a display area in the interface that matches the size information and does not overlap with the area information of any second view element as the target display area.
[0079] Among them, the at least one first view element includes view elements with a priority equal to the target priority and view elements with a priority higher than the target priority, indicating that the target priority is not the highest priority among the priorities to which the at least one view element belongs, and there is a view element with a priority higher than the target priority among the at least one view element.
[0080] Among them, there is no area in the interface that matches the size information and does not overlap with the area information of any first view element, indicating that the interface does not include an area where the target floating window can be displayed without blocking the first view element, that is, the area in the interface that can display the target floating window must block the target priority view element.
[0081] Among them, the at least one second view element is a view element of the at least one first view element that has a higher priority than the target priority, that is, the at least one second view element is all view elements of the at least one view element that have a higher priority than the target priority. It can also be said that the at least one second view element is all view elements of the at least one view element except view elements whose priority is equal to the target priority and view elements whose priority is lower than the target priority.
[0082] Among them, the display area in the interface that matches the size information and does not overlap with the area information of any second view element is determined as the target display area, indicating that the area in the interface that does not block any second view element and can display the target floating window is determined as the target display area.
[0083] In an embodiment of the present application, when there is no area matching the size information (the area required to display the target floating window) except the area where the view elements with higher priority than the target priority are located and the area where the view elements with equal priority to the target priority are located, the area except the area where the view elements with higher priority than the target priority are located is searched, and the area matching the size information is searched as the target display area, so that under the premise that the view elements with target priority must be blocked, a suitable area is found to display the target floating window, which can avoid blocking the view elements with higher priority than the target priority, can facilitate users to view and operate the view elements with higher priority than the target priority, and can improve user experience.
[0084] In some embodiments of the present disclosure, when the at least one first view element only includes view elements with equal target priority, after the controller executes acquisition of area information of the area occupied by the at least one first view element in the interface, it is further configured to: when there is no area in the interface that matches the size information and does not overlap with any first view element, determine the area in the interface that matches the size information and has the smallest occupied area of the view elements with the target priority as the target display area.
[0085] The at least one first view element only includes view elements with a priority level equal to the target priority level, indicating that the target priority level is the highest priority level among the priorities to which the at least one view element belongs.
[0086] Among them, there is no area in the interface that matches the size information and does not overlap with the area information of any first view element, indicating that the area in the interface that can display the target floating window must block the view element with the highest priority (i.e., the target priority). Therefore, the area in the interface that matches the size information and has the smallest occupied area of the view element of the target priority is determined as the target display area, that is, the area in the interface that has the smallest blocked area for the view element of the target priority and can display the target floating window is determined as the target display area. In this way, it can be ensured that the view element of the target priority is blocked to a minimum, reducing the impact on the user's viewing and operation of the blocked view element of the target priority, and improving the user experience.
[0087] In the embodiment of the present application, the priority level to which at least one view element belongs may include two or more priorities, which may be specifically determined based on actual conditions and is not limited here.
[0088] In some embodiments of the present disclosure, when the priority of at least one view element includes more than two priorities, if there is a view element with a first priority in at least one view element, the controller is further configured to: obtain the area information of the area occupied by at least one fourth view element in the interface before executing the acquisition of the area information of the area occupied by at least one first view element in the interface, and the at least one fourth view element is a view element other than the view element with a lower priority than the first priority in the at least one view element; determine the display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any fourth view element as the target display area. The controller executes the acquisition of the area information of the area occupied by at least one first view element in the interface, and is specifically configured to: when there is no display area in the interface that matches the size information and does not overlap with the area information of any fourth view element, obtain the area information of the area occupied by at least one first view element in the interface. The specific information can be determined according to actual conditions and is not limited here.
[0089] Exemplarily, when the priority level of at least one view element includes three priorities, namely, a third priority level, a second priority level and a first priority level (the third priority level is higher than the second priority level, and the second priority level is higher than the first priority level), and the target priority level is the second priority level, the at least one view list is three view lists (respectively, a third view list corresponding to the third priority level, a second view list corresponding to the second priority level, and a first view list corresponding to the first priority level), the controller is specifically configured to: in response to a trigger operation for triggering display of the target floating window, obtain the area information of the at least one view element from the three view lists; determine, based on the area information of the at least one view element, at least one first area in the interface that does not include any view element; and when there is a second area matching the size information in the at least one first display area, determine the second area as the target display area.
[0090] It can be understood that the second area is the first area that does not include any view elements in the interface, and the second area does not include view elements in the interface that cannot be blocked. Therefore, the second area is used as the target display area to display the target floating window, which has minimal impact on at least one first view material in the interface, does not affect the user's viewing and operation of at least one first view material, and can improve the user experience.
[0091] Among them, if there is an area matching the size information in at least one first area, then the area matching the size information is the second area; if there are multiple areas matching the size information in at least one first area, then any one of the multiple areas matching the size information is the second area, or the area among the multiple areas matching the size information that does not include other view elements without set priority is the second area, which can be determined based on actual conditions and is not limited here.
[0092] In some embodiments of the present application, after the controller determines, based on the area information of the at least one view element, that at least one first area in the interface does not include any view element, the controller is further configured to: obtain the area information of the at least one first view element from the third view list and the second view list if there is no second area matching the size information in the at least one first display area; determine, based on the area information of the at least one first view element, at least one third area in the interface that does not include any first view element; and determine the fourth area as the target display area if there is a fourth area matching the size information in the at least one third display area.
[0093] It can be understood that there is no area matching the size information in at least one first area, that is, there is no area in the interface that can be used to display the target floating window and does not include any view element in at least one view element. Therefore, it is necessary to consider whether there is an area (that is, at least one third area) that can be used to display the target floating window in the area where the view element occupying the first priority is located. If there is a fourth area in at least one third area that can be used to display the target floating window, the fourth area is used as the target display area for displaying the target floating window, which will not affect the user's viewing or operation of the third-priority view elements and the second-priority view elements. When displaying the target floating window, the impact on the view elements in the interface can be reduced to a certain extent, which can improve the user experience.
[0094] Among them, if there is an area matching the size information in at least one third area, then the area matching the size information is the fourth area; if there are multiple areas matching the size information in at least one third area, then any one of the multiple areas matching the size information is the fourth area, or the area with the smallest occupied area of the corresponding first-priority view element among the multiple areas matching the size information is the fourth area (in this way, the impact on the first-priority view element can be further reduced), which can be determined specifically based on actual conditions and is not limited here.
[0095] In some embodiments of the present application, after the controller determines, based on the area information of the at least one first view element, that at least one third area in the interface does not include any first view element, the controller is further configured to: obtain the area information of at least one second view element from the third view list if there is no area matching the size information in the at least one third area; determine, based on the area information of the at least one second view element, at least one fifth area in the interface does not include any second view element; and determine the sixth area as the target display area if there is a sixth area matching the size information in the at least one fifth area.
[0096] It can be understood that there is no area matching the size information in at least one third area, that is, there is no area in the interface that can be used to display the target floating window and does not include any first view elements. Therefore, it is necessary to consider whether there is an area (that is, at least one fifth area) that can be used to display the target floating window in the area where the view element occupying the second priority is located. If there is a sixth area in at least one fifth area that can be used to display the target floating window, the sixth area is used as the target display area for displaying the target floating window, which will not affect the user's viewing or operation of the third priority view elements. When displaying the target floating window, it can reduce the impact on the view elements in the interface to a certain extent, and improve the user experience.
[0097] Among them, if there is an area matching the size information in at least one fifth area, then the area matching the size information is the sixth area; if there are multiple areas matching the size information in at least one fifth area, then any one of the multiple areas matching the size information is the sixth area, or the area among the multiple areas matching the size information with the smallest occupied area corresponding to the second-priority view element is the sixth area (in this way, the impact on the second-priority view element can be further reduced), which can be determined specifically based on actual conditions and is not limited here.
[0098] In some embodiments of the present application, the controller is specifically configured to: when there is no area matching the size information in the at least one fifth area, determine the seventh area in the interface matching the size information as the target display area.
[0099] It can be understood that at least one of the fifth areas does not have an area that matches the size information, that is, there is no area in the interface that can be used to display the target floating window and does not include the third-priority view element, that is, the area in the interface that can be used to display the target floating window must include the third-priority view element. Therefore, it is necessary to consider whether there is an area that can be used to display the target floating window in the area where the third-priority view element is located, and use the seventh area in the interface that matches the size information to display the target floating window.
[0100] In some embodiments of the present application, the seventh area may be any display area in the interface that matches the size information.
[0101] In some embodiments of the present application, the seventh area may be the area with the smallest occupied area of the corresponding third-priority view element in the display area that matches the size information in the interface. This can reduce the impact on the third-priority view elements and minimize the viewing or operation of the third-priority view elements. When the target floating window is displayed, the impact on the view elements in the interface can be reduced to a certain extent, thereby improving the user experience.
[0102] In some embodiments of the present application, when there is no area matching the size information in the at least one fifth area, the size information of the target floating window can be appropriately adjusted to shrink the target floating window so as to determine the target display area with the least impact on the view element with the highest priority (third priority) in the interface.
[0103] In some embodiments of the present application, if the important view elements in the application are by default view elements with a priority higher than or equal to the target priority (the target priority can be the lowest priority, the middle priority, or the highest priority), then at least one first view element (all view elements except view elements with a priority lower than the target priority) can be determined directly based on the priority of at least one view element, and then the area information of the at least one first view element can be obtained to determine the target display area.
[0104] In some embodiments of the present application, the at least one view element includes a first application view element of a first application, the target floating window is a floating window of a second application, and the controller includes a first control module of the first application, a second control module of the second application, and a target service module; the controller executes determination of the priority of the at least one view element and the area information of the at least one view element, and is specifically configured as follows: the first control module determines the priority of the first application view element according to the priority configuration rule corresponding to the first application; the first control module determines the area information of the first application view element; a control module sends the priority, identifier and area information of the first application view element to the target service module; the controller executes saving the identifier and the area information of the at least one view element to the view list of the corresponding priority according to the priority of the at least one view element, and obtains at least one view list, and is specifically configured as follows: the target service module saves the at least one view element to the view list of the corresponding priority according to the priority of the at least one view element The identifier of the element and the area information are saved in a view list of corresponding priority according to the priority of the at least one view element to obtain the at least one view list; the controller executes obtaining the area information of the at least one first view element from the at least one view list, and is specifically configured as: the second control module obtains the area information of the at least one first view element in the at least one view list from the target service module; the controller executes determining the display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as: the second control module determines the display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area; the controller executes displaying the target floating window in the target display area, and is specifically configured as: the second control module displays the target floating window in the target display area.
[0105] In some embodiments of the present application, some new interfaces can be added to implement the above-mentioned scheme, such as a new priority configuration interface (View.addUnCoverFlag(int prority)) for realizing the function of determining the priority of the first application view element and the region information of the first application view element according to the priority configuration rule corresponding to the first application; a new anti-occlusion region adding interface (addNewUnCoverRegion) for realizing sending the priority, identification and region information of the first application view element to the target service module; and a new anti-occlusion region query interface (getUncoverdRegion(intpriority)) for realizing obtaining the region information of at least one first view element in the target view list from the target service module.
[0106] In the embodiment of the present application, the first application is an application adapted to the above-mentioned priority configuration interface and the interface for adding a new anti-blocking area, and the second application is an application adapted to the above-mentioned interface for querying the anti-blocking area. In this way, it is possible to avoid, to a certain extent, the display of the floating window from blocking more important view elements, so that the user can quickly view or operate the more important view elements, which can improve the user experience.
[0107] Example 1, wherein determining the priority of at least one view element in the interface and the area information of the area occupied by the at least one view element in the interface includes: taking the Android system as an example, providing a window priority configuration interface View.addUnCoverFlag(int prority) (hereinafter referred to as the setting interface) for an application to configure the priority of a view element. In the Android interface, all displayed view elements are extended from the view object, such as Figure 4 In the example, the area with a bold solid line is the list view element (Listview), the area with a non-bold solid line is the button view element (button), and the area with a dotted line is the input box view element (Editview). Therefore, we can modify the view base class through View.addUnCoverFlag(int prority). Figure 4 Settings application) If you want some of your interfaces not to be blocked, you can configure the priority of different view elements in the interface (you can configure the priority of different view elements in the interface according to the user's usage habits of the interface), for example Figure 4 The priority of the view elements in the bold solid line frame is higher than that of the view elements in the non-bold solid line frame, and the priority of the view elements in the non-bold solid line frame is higher than that of the view elements in the dotted line frame. That is, you want the view elements in the bold solid line frame to be least likely to be blocked, the view elements in the non-bold solid line frame are second, and the view elements in the dotted line frame are last. At this time, the application can use the reflection interface to call View.addUnCoverFlag (int prority) to configure the priority of these three view elements. The configuration is as follows:
[0108] mListView.addUnCoverFlag(PRIO_LOW);
[0109] mBackButtonView.addUnCoverFlag(PRIO_MEDIUM);
[0110] mEditView.addUnCoverFlag(PRIO_HIGH);
[0111] mConnectButtonView.addUnCoverFlag(PRIO_HIGH);
[0112] mCancelButtonView.addUnCoverFlag(PRIO_HIGH).
[0113] Example 2, following the above Example 1, this application uses the system service (WindowManagerService, WMS) to manage multiple view lists, taking the case where there are three multiple view lists as an example. After WMS is started, three priority (Map) lists are first created, namely Map_high, Map_medium, and Map_low, which respectively store the identifiers and area information of view elements of three different levels, and the storage method is "key-value" format: "key" is the identifier of the view element (corresponding to the view object id), and "value" is the area information of the view element (that is, the Rect of the view object). When the application calls View.addUnCoverFlag to configure the priority, the size information (size) and position information of the current view are first queried to generate the corresponding area information (hereinafter referred to as the Rect object), and then the current view element identifier (view), the view element area information (Rect) and the view element priority (int priority) are sent to WMS through the internal interface addNewUnCoverRegion of windowManager.
[0114] After receiving the addNewUnCoverRegion interface callback, WMS stores the identifier and region information of the view element of the corresponding priority in the Map table of the corresponding priority in a key-value manner according to the priority of the view element.
[0115] Because all application interfaces can call the above interface to configure the non-obstruction priority of view elements, it is possible that multiple interfaces of multiple applications or multiple interfaces of an application may call the above interface at the same time to configure the non-obstruction priority of view elements (such as split-screen display of different applications, or split-screen display of the same application).
[0116] Therefore, querying the anti-occlusion area is not limited to the interface of a single application, but the current comprehensive state of the entire interface. Therefore, the query interface cannot be done in the application process like the setting interface. Here, a query interface getUncoverdRegion(int priority) is added in WMS. The WMS service is part of the system service systemServer. Third-party applications can obtain the interface object of the service through getWindowManager and use related interfaces.
[0117] When the application calls the interface getUncoverdRegion(int priority) to query, if the application calls windowManager.getUncoverdRegion(PRIO_HIGH), the system will return the area with a bold solid line frame; if the application calls windowManager.getUncoverdRegion(PRIO_MEDIUM), the system will return the area with a bold solid line frame and the area without a bold solid line frame; if the application calls windowManager.getUncoverdRegion(PRIO_LOW), the system will return the area with a bold solid line frame, the area without a bold solid line frame, and the area with a dotted line frame. The return value format is a list that includes the view element identifier and area information. The list contains all the view elements that belong to the unobstructed area. When the application calls the WMS interface getUncoverdRegion, WMS selects a suitable Map table from the three levels of Map tables according to the priority level of the query, and combines the view element identifiers and area information in the selected suitable Map table into a list table and returns it to the application.
[0118] In the embodiment of the present application, at least one view list includes three view lists as an example for description. The specific process of at least one view list including two view lists, four view lists, and more than four view lists can be determined by referring to the specific process of at least one view list including three view lists, which will not be described in detail here.
[0119] Example 3, following Example 2 above, Figure 6As shown, the PRIO_MEDIUM level returns a list consisting of the area information of two areas without bold solid lines and the area information of four areas with bold solid lines. When the third-party application first queries through the PRIO_LOW level, the most complete set is returned. However, in the most complete set, there may be a situation where the floating window of the application has no place to be placed. At this time, if you want to avoid all view elements with priority and still display the complete target floating window, it is impossible because there is not enough space in the remaining area. Therefore, the application can adjust the query up one level at this time, query through the PRIO_MEDIUM level, and ignore the occupation of the area with dotted lines. If the target floating window cannot be fully displayed, continue to adjust it up, query through the PRIO_HIGH level, ignore the occupation of the area with dotted lines and the area without bold solid lines. At this time, you can find that the target floating window has enough area to be displayed, as long as it does not block the area with bold solid lines, such as Figure 7 shown.
[0120] If the PRIO_HIGH level has been queried and there is still not enough space, the application can still calculate the display area with the least impact through the Region returned by the new interface, so as to reduce the impact on the view element with the highest priority.
[0121] In some embodiments of the present application, the at least one view element includes a third application view element of a third application, the target floating window is a floating window of a second application, and the controller includes a second control module and a target service module of the second application; the controller executes determination of the priority of the at least one view element, and the area information of the at least one view element, and is specifically configured as follows: the target service module determines the priority of the third application view element according to the correspondence between the type of view element and the priority; the target service module determines the area information of the third application view element; the controller executes saving the identification and the area information of the at least one view element to a view list of corresponding priority according to the priority of the at least one view element, and obtains at least one view list, and is specifically configured as follows: the target service module saves the identification and the area information of the at least one view element to the view list of corresponding priority according to the priority of the at least one view element The priority is saved in the view list of the corresponding priority to obtain the at least one view list; the controller executes obtaining the area information of the at least one first view element from the at least one view list, and is specifically configured as: the second control module obtains the area information of the at least one first view element in the at least one view list from the target service module; the controller executes determining the display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as: the second control module determines the display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area; the controller executes displaying the target floating window in the target display area, and is specifically configured as: the second control module displays the target floating window in the target display area.
[0122] In the embodiment of the present application, for a third application (third-party application) that is not compatible with the above-mentioned priority configuration interface and the interface for adding a new anti-occlusion area, and a second application that is compatible with the above-mentioned query anti-occlusion area interface, the priority configuration interface can be called by the target service module to determine the priority of the third application view element and the area information of the third application view element according to the correspondence between the type and priority of the view element. In this way, it can avoid, to a certain extent, the display of the floating window from blocking more important view elements, so that the user can quickly view or operate the more important view elements, which can improve the user experience.
[0123] It can be understood that since the third application cannot determine the priority and area information of the anti-occlusion control in the current third application interface, the target service module cannot determine the priority, identification and area information of the anti-occlusion control in the third application interface. Therefore, the priority of the view element is determined according to the type of the view element through the target service module. Specifically, according to the type of view element, such as Button, ImageView, TextView, EditText and other types, the corresponding priority is determined. The priorities corresponding to different types of view elements can be pre-set, for example: HIGH level corresponds to Button, EditText and other types, NORMAL level corresponds to ListView, ImageView and other types, LOW level corresponds to TextView and other types.
[0124] In some embodiments of the present application, the level of the view element can be further updated according to the focus state of the view element (such as focused and unfocused). For example, a View that changes from an unfocused state to a focused state is updated from a priority determined according to the type of View to a HIGH level, a View that is initially in a focused state is at a HIGH level by default, and a View that changes from a focused state to an unfocused state (loses the focused state) is updated from a HIGH level to a priority determined according to the type of View.
[0125] Therefore, in an embodiment of the present application, the priority of the view element is determined based on the change in the visible state of the view element and the change in the focused state of the view element, and the view list in which the view element is located is updated.
[0126] In some embodiments of the present application, in some embodiments of the present disclosure, the at least one view element includes a third application view element of a third application, and the controller includes a target service module; the controller executes determining the priority of the at least one view element, and the area information of the at least one view element, and is specifically configured as: the target service module determines the priority of the third application view element according to the correspondence between the type of view element and the priority; the target service module determines the area information of the third application view element; the controller executes saving the identification of the at least one view element and the area information to a view list of corresponding priority according to the priority of the at least one view element, and obtains at least one view list, and is specifically configured as: the target service module saves the identification of the at least one view element and the area information to a view list of corresponding priority according to the priority of the at least one view element. The controller obtains the area information of the at least one first view element from the at least one view list, and is specifically configured as follows: the target service module obtains the area information of the at least one first view element from the at least one view list; the controller determines the display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as follows: the target service module determines the display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area; the controller displays the target floating window in the target display area, and is specifically configured as follows: the target service module displays the target floating window in the target display area.
[0127] In the embodiment of the present application, for a third application (third-party application) that is not compatible with the above-mentioned priority configuration interface and the interface for adding a new anti-occlusion zone, and an application (third-party application) including a target floating window that is not compatible with the above-mentioned query anti-occlusion zone interface, the priority of the third application view element and the area information of the third application view element can be determined according to the correspondence between the type and priority of the view element through the target service module calling the priority configuration interface, and the area information of the at least one first view element in the target view list can be obtained through the target service module calling the query anti-occlusion zone interface. In this way, it can be avoided to a certain extent that the display of the floating window obscures more important view elements, and then the user can quickly view or operate the more important view elements, which can improve the user experience.
[0128] In some embodiments of the present application, when the target service module (WMS) adds a target floating window, the type of the target floating window is queried. When the target floating window is of type TYPE_APPLICATION_OVERLAY, it means that the target floating window is a floating window of a third-party application.
[0129] In some embodiments of the present application, when it is confirmed that the target floating window is a floating window of a third-party application, it is queried whether the target floating window can obtain focus. If it can obtain focus (native flag), the processing is terminated. In addition to blocking the application behind it, this type of window will also seize the operation focus. The user is actually unable to operate the rear interface, so even if it is blocked, it will not have any impact.
[0130] In some embodiments of the present application, if the target floating window cannot obtain focus, it belongs to a target type window. Here, it can be determined whether to perform anti-occlusion processing based on actual conditions. For example, anti-occlusion processing can be performed on some floating windows of applications with preset package names, or anti-occlusion processing can be performed on applications of third-party input methods; no anti-occlusion processing will be performed on floating windows that do not meet the preset conditions.
[0131] In some embodiments of the present application, after determining that a target floating window is to be displayed, the target service module determines an area for displaying the target floating window based on the priority and area information of the currently displayed view element, as well as the size information and area information of the target floating window, and displays the target floating window in the area.
[0132] In some embodiments of the present application, it is also possible to set the anti-occlusion processing of view elements of a specific priority only, such as when the target priority is a certain specific priority.
[0133] In some embodiments of the present application, the at least one view element includes a first application view element of a first application, and the controller includes a first control module and a target service module of the first application; the controller executes determination of the priority of the at least one view element and the area information of the at least one view element, and is specifically configured as follows: the first control module determines the priority of the first application view element according to the priority configuration rule corresponding to the first application; the first control module determines the area information of the first application view element; the first control module sends the priority, identifier and area information of the first application view element to the target service module; the controller executes saving the identifier and the area information of the at least one view element to the view list of the corresponding priority according to the priority of the at least one view element, and obtains at least one view list, and is specifically configured as follows: the target service module saves the identifier and the area information of the at least one view element to the view list of the corresponding priority. , according to the priority of the at least one view element, save it to the view list of the corresponding priority to obtain the at least one view list; the controller executes obtaining the area information of the at least one first view element from the at least one view list, and is specifically configured as: the target service module obtains the area information of the at least one first view element from the at least one view list; the controller executes determining the display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as: the target service module determines the display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area; the controller executes displaying the target floating window in the target display area, and is specifically configured as: the target service module displays the target floating window in the target display area.
[0134] In the embodiment of the present application, for the first application that is adapted to the above-mentioned priority configuration interface and the interface for adding a new anti-occlusion area, and the application (third-party application) including the target floating window that is not adapted to the above-mentioned query anti-occlusion area interface, the priority of the first application view element can be determined according to the priority configuration rule corresponding to the first application through the first control module calling the priority configuration interface, and the area information of the first application view element can be determined, and the priority, identification and area information of the first application view element can be sent to the target service module through the first control module calling the interface for adding a new anti-occlusion area; the area information of the at least one first view element in the target view list can be obtained through the target service module calling the query anti-occlusion area interface. In this way, it can be avoided that the display of the floating window obstructs more important view elements to a certain extent, and then the user can quickly view or operate the more important view elements, which can improve the user experience.
[0135] In some embodiments of the present application, the applications corresponding to the interface may all be first applications (applications that adapt to the above-mentioned priority configuration interface and the interface for adding a new anti-obstruction area), or may all be third applications (third-party applications that do not adapt to the above-mentioned priority configuration interface and the interface for adding a new anti-obstruction area), or may be partly first applications and partly third applications, which may be determined based on actual conditions and are not limited here. Correspondingly, the application corresponding to the target floating window may be a second application (a second application that adapts to the above-mentioned interface for querying the anti-obstruction area), or may be a third-party application (an application that does not adapt to the above-mentioned interface for querying the anti-obstruction area), which may be determined based on actual conditions and are not limited here.
[0136] In some embodiments of the present application, the controller executes the identification of the at least one view element and the area information, and saves them into a view list of corresponding priority according to the priority of the at least one view element. After obtaining the at least one view list, the controller is further configured to: perform target processing in response to a target trigger operation on the view element; wherein the view element is any one of the at least one view element, and the target processing includes any of the following items: when the target trigger operation is used to adjust the area occupied by the view element (the user may manually adjust the area occupied by the view element, or the application may automatically adjust the area occupied by the view element), update the area information of the view element in the corresponding view list to the adjusted area information of the view element; When the target trigger operation is used to adjust the priority of the view element (the user can manually adjust the priority of the view element, or the application can automatically adjust the priority of the view element), the identifier of the view element and the area information are updated to the view list corresponding to the adjusted priority, and the identifier and the area information of the view element in the view list corresponding to the adjustment are deleted; when the target trigger operation is used to cancel the display of the view element, the identifier and the area information of the view element in the corresponding view list are deleted; or, when the target trigger operation is used to add a third view element to the interface, the identifier of the third view element and the area information of the third view element are saved in the view list corresponding to the priority of the third view element.
[0137] The target triggering operation may be an operation of a user or an operation automatically triggered by an application, which is not limited here.
[0138] Example 4, following Example 2 above, when the interface of the application changes or exits, causing the view element with set priority to disappear or become invisible, the view element class uses the WMS interface removeUnCoverRegion to remove the identifier and region information of the view element in the view list of the corresponding level. When the view element becomes visible next time, the identifier and region information of the view element are re-added to the corresponding view list through the addNewUnCoverRegion interface. When the size of the application's view element changes, the identifier and region information of the changed view element can be directly added to the corresponding WMS Map table through addNewUnCoverRegion, directly replacing the original identifier and region information of the view element. When the priority of the application's view element changes, first removeUnCoverRegion to remove the record in the corresponding WMS Map (the view list corresponding to the original priority), and then addNewUnCoverRegion to add a new record to the view list corresponding to the new priority.
[0139] In the embodiment of the present application, as long as it is a target floating window, if you want to avoid view elements that the user does not want to be blocked in some interfaces, you can use the above method to query the area information of the corresponding view elements and find a suitable target display area for display according to the size of the target floating window.
[0140] See also Figure 8 In some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer"), and the kernel layer.
[0141] In some embodiments, at least one application is running in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. provided by the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.
[0142] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.
[0143] like Figure 8 As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (ActivityManager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to the application package currently installed on the device; a notification manager (NotificationManager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers, and desktop components on the user interface.
[0144] In some embodiments, the activity manager is used to manage the life cycle of each application and the common navigation back function, such as controlling the exit, opening, and back of the application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the interface, capturing the interface, and controlling the display window changes (for example, reducing the display window, shaking the display, distorting the display, etc.).
[0145] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.
[0146] In some embodiments, the kernel layer is a layer between hardware and software. Figure 8 As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.
[0147] In order to explain this scheme in more detail, the following will be combined in an exemplary manner Figures 9 and 10 To explain, it is understandable that Figures 9 and 10The steps involved may include more steps or fewer steps in actual implementation, and the order of these steps may also be different, subject to the ability to implement the floating window display method provided in the embodiment of the present application. The floating window display method is applied to a display device controlled by a control device, and the execution subject of the floating window display method may be a display device, or a functional module or functional entity in the display device that can implement the floating window display method, which is not limited here. Moreover, the specific description of the floating window display method provided in the embodiment of the present application can refer to the relevant description of the above-mentioned display device, and the same or similar technical effects can be achieved, which will not be repeated here.
[0148] Fig. 9 This is a flowchart of the steps of implementing a floating window display method according to one or more embodiments of the present application. The floating window display method may include S901 to S903.
[0149] S901. In response to a triggering operation of triggering a display target floating window, based on a priority of at least one view element in an interface, obtain area information of an area occupied by at least one first view element in the interface.
[0150] Among them, the at least one first view element is a view element among the at least one view element except the view element with a priority lower than the target priority; the priority of the view element is used to indicate the level of preventing the corresponding view element from being blocked by the floating window.
[0151] S902: Determine a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as a target display area.
[0152] S903: Display the target floating window in the target display area.
[0153] In some embodiments of the present disclosure, the above S902 can be specifically implemented through the following S902a.
[0154] S902a. When there are multiple display areas in the interface that match the size information and do not overlap with the area information of any first view element, the display area with the smallest occupied area by the view element among the multiple display areas is determined as the target display area.
[0155] In some embodiments of the present disclosure, when the at least one first view element includes view elements with a priority equal to the target priority and view elements with a priority higher than the target priority, after S901, the floating window display method provided in the embodiments of the present application may further include the following S904 and S905.
[0156] S904: When there is no area in the interface that matches the size information and does not overlap with the area information of any first view element, obtain area information of an area occupied by at least one second view element in the interface.
[0157] The at least one second view element is a view element with a higher priority than the target among the at least one first view element.
[0158] S905: Determine a display area in the interface that matches the size information and does not overlap with the area information of any second view element as the target display area.
[0159] In some embodiments of the present disclosure, when the at least one first view element includes only view elements with a target priority level, after S901, the floating window display method provided in the embodiments of the present application may further include the following S906.
[0160] S906. When there is no area in the interface that matches the size information and does not overlap with any first view element, determine the area in the interface that matches the size information and has the smallest occupied area of the view element of the target priority as the target display area.
[0161] In some embodiments of the present disclosure, Fig. 9 ,like Fig.10 As shown, before S901, the floating window display method provided in the embodiment of the present application may further include the following S907 and S908, and the above S901 may be specifically implemented through the following S901a.
[0162] S907: Determine the priority of the at least one view element and the region information of the at least one view element.
[0163] S908: Save the identifier of the at least one view element and the region information into a view list of corresponding priority according to the priority of the at least one view element, to obtain at least one view list.
[0164] S901a. Obtain the region information of the at least one first view element from the at least one view list.
[0165] In some embodiments of the present disclosure, when a view list is used to store identifiers of view elements of the same priority and the region information, the above S901a can be specifically implemented through the following S901a1.
[0166] S901a1. Acquire the region information of the at least one first view element from a view list having a higher priority than the target priority and a view list having a priority equal to the target priority.
[0167] In some embodiments of the present disclosure, after S908, the floating window display method provided in the embodiments of the present application may further include the following S909.
[0168] S909: In response to a target triggering operation on any of the view elements, execute target processing.
[0169] The target processing includes any of the following:
[0170] In a case where the target trigger operation is used to adjust the area occupied by the arbitrary view element, updating the area information of the arbitrary view element in the corresponding view list to the adjusted area information of the arbitrary view element;
[0171] In the case where the target trigger operation is used to adjust the priority of the arbitrary view element, the identifier of the arbitrary view element and the region information are updated to the view list corresponding to the adjusted priority, and the identifier of the arbitrary view element and the region information in the view list corresponding to the priority before the adjustment are deleted;
[0172] When the target trigger operation is used to cancel the display of the arbitrary view element, the identifier of the arbitrary view element and the area information in the corresponding view list are deleted.
[0173] In some embodiments of the present disclosure, after S908, the floating window display method provided in the embodiments of the present application may further include the following S910.
[0174] S910. When the target trigger operation is used to add a third view element to the interface, save the identifier of the third view element and the area information of the third view element to a view list corresponding to the priority of the third view element.
[0175] In some embodiments of the present disclosure, the at least one view element includes a first application view element of a first application, the target floating window is a floating window of a second application, and the display device includes a first control module of the first application, a second control module of the second application, and a target service module; the above S907 can be specifically implemented through the following S907a to S907c; the above S908 can be specifically implemented through the following S908a; the above S901 can be specifically implemented through the following S901b; the above S902 can be specifically implemented through the following S902b; the above S903 can be specifically implemented through the following S903a.
[0176] S907a. The first control module determines the priority of the first application view element according to the priority configuration rule corresponding to the first application.
[0177] S907b: The first control module determines the area information of the first application view element.
[0178] S907c: The first control module sends the priority, identifier and area information of the first application view element to the target service module.
[0179] S908a: The target service module saves the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list.
[0180] S901b: The second control module obtains the region information of the at least one first view element in the at least one view list from the target service module.
[0181] S902b: The second control module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as a target display area.
[0182] S903a: The second control module displays the target floating window in the target display area.
[0183] In some embodiments of the present disclosure, the at least one view element includes a third application view element of a third application, the target floating window is a floating window of a second application, and the display device includes a second control module and a target service module of the second application; the above S907 can be specifically implemented through the following S907d to S907e; the above S908 can be specifically implemented through the following S908b; the above S901 can be specifically implemented through the following S901c; the above S902 can be specifically implemented through the following S902c; the above S903 can be specifically implemented through the following S903b.
[0184] S907d: The target service module determines the priority of the third application view element according to the correspondence between the type of the view element and the priority.
[0185] S907e: The target service module determines the area information of the third application view element.
[0186] S908a: The target service module saves the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list.
[0187] S901b: The second control module obtains the region information of the at least one first view element in the at least one view list from the target service module.
[0188] S902b: The second control module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area.
[0189] S903a: The second control module displays the target floating window in the target display area.
[0190] In some embodiments of the present disclosure, the at least one view element includes a third application view element of a third application, and the display device includes a target service module; the above S907 can be specifically implemented through the following S907d to S907e; the above S908 can be specifically implemented through the following S908a; the above S901 can be specifically implemented through the following S901c; the above S902 can be specifically implemented through the following S902c; the above S903 can be specifically implemented through the following S903b.
[0191] S907d: The target service module determines the priority of the third application view element according to the correspondence between the type of the view element and the priority.
[0192] S907e: The target service module determines the area information of the third application view element.
[0193] S908a: The target service module saves the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list.
[0194] S901c: The target service module obtains the area information of the at least one first view element from the at least one view list.
[0195] S902c: The target service module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area.
[0196] S903b: The target service module displays the target floating window in the target display area.
[0197] In some embodiments of the present disclosure, the at least one view element includes a first application view element of a first application, and the display device includes a first control module and a target service module of the first application; the above S907 can be specifically implemented through the following S907a to S907c; the above S908 can be specifically implemented through the following S908a; the above S901 can be specifically implemented through the following S901c; the above S902 can be specifically implemented through the following S902c; the above S903 can be specifically implemented through the following S903b.
[0198] S907a. The first control module determines the priority of the first application view element according to the priority configuration rule corresponding to the first application.
[0199] S907b: The first control module determines the area information of the first application view element.
[0200] S907c: The first control module sends the priority, identifier and area information of the first application view element to the target service module.
[0201] S908a: The target service module saves the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list.
[0202] S901c: The target service module obtains the area information of the at least one first view element from the at least one view list.
[0203] S902c: The target service module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area.
[0204] S903b: The target service module displays the target floating window in the target display area.
[0205] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the various processes of the above-mentioned floating window display method and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0206] The computer readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0207] The present invention provides a computer program product, comprising: when the computer program product is run on a computer, the computer is enabled to implement the above-mentioned floating window display method.
[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0209] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: include: A display configured to: display a user interface; The controller is configured as: In response to a triggering operation of triggering display of a target floating window, based on the priority of at least one view element in the interface, obtaining area information of an area occupied by at least one first view element in the interface, wherein the at least one first view element is a view element other than a view element with a lower priority than the target view element in the at least one view element; the priority of the view element is used to indicate a level of preventing the corresponding view element from being blocked by the floating window; Determine a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as a target display area; The target floating window is displayed in the target display area.
2. The display device according to claim 1, characterized in that The controller determines a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as follows: When there are multiple display areas in the interface that match the size information and do not overlap with the area information of any of the first view elements, the display area with the smallest occupied area of the view element among the multiple display areas is determined as the target display area.
3. The display device according to claim 1, characterized in that In a case where the at least one first view element includes a view element having a priority level equal to the target priority level and a view element having a priority level higher than the target priority level, after the controller executes acquiring the area information of the area occupied by the at least one first view element in the interface, the controller is further configured to: When there is no area in the interface that matches the size information and does not overlap with the area information of any first view element, acquiring area information of an area occupied by at least one second view element in the interface, the at least one second view element being a view element with a higher priority than the target among the at least one first view element; A display area in the interface that matches the size information and does not overlap with the area information of any second view element is determined as the target display area.
4. The display device according to claim 1, characterized in that In a case where the at least one first view element includes only view elements with a target priority, after the controller acquires the area information of the area occupied by the at least one first view element in the interface, the controller is further configured to: When there is no area in the interface that matches the size information and does not overlap with any of the first view elements, the area in the interface that matches the size information and has the smallest occupied area of the view elements of the target priority is determined as the target display area.
5. The display device according to any one of claims 1 to 4, characterized in that: Before the controller executes the step of acquiring the area information of the area occupied by at least one first view element in the interface, the controller is further configured to: determining a priority of the at least one view element and the region information of the at least one view element; The identifier of the at least one view element and the region information are saved in a view list of corresponding priority according to the priority of the at least one view element to obtain at least one view list; The controller executes acquiring area information of an area occupied by at least one first view element in the interface, and is specifically configured to: The region information of the at least one first view element is obtained from the at least one view list.
6. The display device according to claim 5, characterized in that In a case where one of the view lists is used to store identifiers and the region information of view elements of the same priority, the controller executes acquiring the region information of the at least one first view element from the at least one view list, and is specifically configured as follows: The region information of the at least one first view element is obtained from a view list having a priority higher than the target priority and a view list having a priority equal to the target priority.
7. The display device according to claim 6, characterized in that The controller executes saving the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element, and after obtaining at least one view list, is further configured to: In response to a target triggering operation on any of the view elements, performing target processing; The target processing includes any of the following: In a case where the target trigger operation is used to adjust the area occupied by the arbitrary view element, updating the area information of the arbitrary view element in the corresponding view list to the adjusted area information of the arbitrary view element; In a case where the target trigger operation is used to adjust the priority of the arbitrary view element, updating the identifier and the region information of the arbitrary view element to a view list corresponding to the adjusted priority, and deleting the identifier and the region information of the arbitrary view element in the view list corresponding to the priority before the adjustment; In a case where the target trigger operation is used to cancel display of the arbitrary view element, deleting the identifier and the area information of the arbitrary view element in the corresponding view list; or, When the target trigger operation is used to add a third view element to the interface, the identifier of the third view element and the area information of the third view element are saved in a view list corresponding to the priority of the third view element.
8. The display device according to claim 5, characterized in that The at least one view element includes a first application view element of a first application, the target floating window is a floating window of a second application, and the controller includes a first control module of the first application, a second control module of the second application, and a target service module; The controller determines the priority of the at least one view element and the region information of the at least one view element, and is specifically configured to: The first control module determines the priority of the first application view element according to the priority configuration rule corresponding to the first application; The first control module determines the area information of the first application view element; The first control module sends the priority, identifier and area information of the first application view element to the target service module; The controller executes saving the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element to obtain at least one view list, and is specifically configured as follows: The target service module saves the identifier of the at least one view element and the region information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list; The controller executes acquiring the region information of the at least one first view element from the at least one view list, and is specifically configured to: The second control module acquires the region information of the at least one first view element in the at least one view list from the target service module; The controller determines a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as follows: The second control module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as a target display area; The controller is configured to display the target floating window in the target display area: The second control module displays the target floating window in the target display area.
9. The display device according to claim 5, characterized in that The at least one view element includes a third application view element of a third application, the target floating window is a floating window of a second application, and the controller includes a second control module and a target service module of the second application; The controller determines the priority of the at least one view element and the region information of the at least one view element, and is specifically configured to: The target service module determines the priority of the third application view element according to the correspondence between the type of the view element and the priority; The target service module determines the area information of the third application view element; The controller executes saving the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element to obtain at least one view list, and is specifically configured as follows: The target service module saves the identifier of the at least one view element and the region information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list; The controller executes acquiring the region information of the at least one first view element from the at least one view list, and is specifically configured to: The second control module acquires the region information of the at least one first view element in the at least one view list from the target service module; The controller determines a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as follows: The second control module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area; The controller is configured to display the target floating window in the target display area: The second control module displays the target floating window in the target display area.
10. The display device according to claim 5, characterized in that The at least one view element includes a third application view element of a third application, and the controller includes a target service module; The controller determines the priority of the at least one view element and the region information of the at least one view element, and is specifically configured to: The target service module determines the priority of the third application view element according to the correspondence between the type of the view element and the priority; The target service module determines the area information of the third application view element; The controller executes saving the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element to obtain at least one view list, and is specifically configured as follows: The target service module saves the identifier of the at least one view element and the region information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list; The controller executes acquiring the region information of the at least one first view element from the at least one view list, and is specifically configured to: The target service module acquires the area information of the at least one first view element from the at least one view list; The controller determines a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as follows: The target service module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area; The controller is configured to display the target floating window in the target display area: The target service module displays the target floating window in the target display area.
11. The display device according to claim 5, characterized in that The at least one view element comprises a first application view element of a first application, and the controller comprises a first control module and a target service module of the first application; The controller determines the priority of the at least one view element and the region information of the at least one view element, and is specifically configured to: The first control module determines the priority of the first application view element according to the priority configuration rule corresponding to the first application; The first control module determines the area information of the first application view element; The first control module sends the priority, identifier and area information of the first application view element to the target service module; The controller executes saving the identifier of the at least one view element and the area information into a view list of corresponding priority according to the priority of the at least one view element to obtain at least one view list, and is specifically configured as follows: The target service module saves the identifier of the at least one view element and the region information into a view list of corresponding priority according to the priority of the at least one view element, to obtain the at least one view list; The controller executes acquiring the region information of the at least one first view element from the at least one view list, and is specifically configured to: The target service module acquires the area information of the at least one first view element from the at least one view list; The controller determines a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as the target display area, and is specifically configured as follows: The target service module determines a display area in the interface that matches the size information and does not overlap with the area information of any first view element as the target display area; The controller is configured to display the target floating window in the target display area: The target service module displays the target floating window in the target display area.
12. A floating window display method, characterized in that: Applied to display devices, including: In response to a triggering operation of triggering display of a target floating window, based on the priority of at least one view element in the interface, obtaining area information of an area occupied by at least one first view element in the interface, wherein the at least one first view element is a view element other than a view element with a lower priority than the target view element in the at least one view element; the priority of the view element is used to indicate a level of preventing the corresponding view element from being blocked by the floating window; Determine a display area in the interface that matches the size information of the target floating window and does not overlap with the area information of any first view element as a target display area; The target floating window is displayed in the target display area.
Citation Information
Cited By
Interface display method of augmented reality window and operation device of operation machine
CN120929165A
Display device and floating window display method
WO2026051916A1