Method, device, equipment and medium for adding floating window when switching pages

By creating an initial proxy view in the root node view of the second page when switching pages, proxying the drawing function of the floating window of the first page and adding it to the target proxy view, the problem of the floating window disappearing temporarily is solved, and the continuous display and interaction function of the floating window when switching pages is realized.

CN114780089BActive Publication Date: 2025-09-26DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210209859.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2025-09-26
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

On terminal devices, the floating window disappears briefly and then reappears when switching pages, causing the page to flicker and affecting the developer's debugging work.

Method used

When the page switches, an initial proxy view is created in the root node view of the second page, and the drawing function of the target floating window in the first page is delegated to the initial proxy view. The target floating window is drawn in the second page, and then the target floating window view is added to the target proxy view to support the interactive function.

Benefits of technology

This prevents the floating window from disappearing briefly and then reappearing, ensuring that the floating window continues to be displayed when switching pages. It supports preset interactive functions and does not affect the developer's debugging work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780089B_ABST
    Figure CN114780089B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for adding a floating window during page switching, wherein the method includes: in response to a trigger operation of jumping from a first page containing a target floating window to a second page, creating an initial proxy view in a root node view corresponding to the second page; drawing the target floating window in the initial proxy view based on the drawing information of the target floating window, thereby obtaining a target proxy view displaying the target floating window; and adding the target floating window view corresponding to the target floating window to the target proxy view, so that the target floating window supports preset interactive functions. In an embodiment of the present disclosure, the initial proxy view can proxy the drawing function of the target floating window view in the first page and draw the target floating window in the second page. This can avoid the phenomenon that the target floating window disappears briefly and then reappears because the target floating window view needs to be removed from the first page before the target floating window is drawn on the second page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, and medium for adding a floating window during page switching. Background Art

[0002] In a terminal device (such as a mobile phone), some quick operations can be provided to the user by displaying a floating window, such as quickly opening an application interface.

[0003] Typically, floating windows can include those on regular client pages and those on debugging pages opened by application developers (or pages during development, or development pages for short). Regarding the latter type, this floating window is a type of floating window that can be used without granting system display permissions. However, when switching pages, the floating window on the switched page may disappear briefly and then reappear, causing a sense of page flickering, affecting the developer's debugging work. Summary of the Invention

[0004] The embodiments of the present disclosure at least provide a method, apparatus, device, and medium for adding a floating window during page switching.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for adding a floating window when switching pages, comprising:

[0006] In response to a triggering operation of jumping from a first page containing a target floating window to a second page, creating an initial proxy view in a root node view corresponding to the second page;

[0007] Drawing the target floating window in the initial proxy view according to the drawing information of the target floating window, to obtain a target proxy view displaying the target floating window;

[0008] The target floating window view corresponding to the target floating window is added to the target proxy view, so that the target floating window supports a preset interactive function; the target floating window view is used to respond to interactive operations on the target floating window.

[0009] In an optional implementation, creating the initial proxy view in the root node view corresponding to the second page includes:

[0010] Obtaining location information of the target floating window in the root node view corresponding to the first page;

[0011] Based on the position information, the initial proxy view is created at a corresponding position in the root node view corresponding to the second page.

[0012] In an optional implementation, the method further includes:

[0013] In response to acquiring updated drawing information for the target floating window;

[0014] Based on the updated drawing information, the target floating window is redrawn in the target proxy view.

[0015] In an optional implementation, adding the target floating window view corresponding to the target floating window to the target proxy view includes:

[0016] The target floating window view corresponding to the target floating window is removed from the root node view corresponding to the first page, and the target floating window view is added to the target proxy view of the second page.

[0017] In an optional implementation, the method further includes:

[0018] In response to a page return operation triggered on the second page, determining whether the target proxy view exists in the root node view of the returned first page;

[0019] After determining that the target proxy view exists in the root node view in the first page, the target floating window view corresponding to the target floating window is removed from the root node view corresponding to the second page, and the target floating window view is added to the target proxy view of the first page.

[0020] In an optional implementation, after adding the target floating window view corresponding to the target floating window to the target proxy view, the method further includes:

[0021] In response to a move operation on the target floating window, the initial proxy view is moved, and the target floating window is redrawn in the moved initial proxy view to obtain the moved target proxy view, and the target floating window view is moved to the moved target proxy view.

[0022] In an optional implementation, the drawing information includes at least one of a size of the target floating window, a shape of the target floating window, and display content in the target floating window.

[0023] In a second aspect, an embodiment of the present disclosure further provides a device for adding a floating window during page switching, comprising:

[0024] A creation module, configured to create an initial proxy view in a root node view corresponding to a second page in response to a triggering operation of jumping from a first page containing a target floating window to a second page;

[0025] a first drawing module, configured to draw the target floating window in the initial proxy view according to the drawing information of the target floating window, to obtain a target proxy view displaying the target floating window;

[0026] An adding module is used to add a target floating window view corresponding to the target floating window to the target proxy view, so that the target floating window supports a preset interactive function; the target floating window view is used to respond to interactive operations on the target floating window.

[0027] In a third aspect, an embodiment of the present disclosure further provides a computer device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are performed.

[0028] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.

[0029] The embodiment of the present disclosure provides a method for adding a floating window when switching pages. In the process of jumping from the first page to the second page, an initial proxy view is created in the root node view corresponding to the second page, and the initial proxy view is used to proxy the drawing function originally possessed by the target floating window view in the first page, and the target floating window is drawn in the second page. In this way, the phenomenon that the target floating window disappears briefly and then reappears due to the need to remove the target floating window view from the first page first and then draw the target floating window on the second page can be avoided. After the target floating window (referring to the content presented by the floating window) is drawn in the initial proxy view, the target floating window view corresponding to the target floating window (functions that do not need to be presented) is added to the target proxy view. In this way, the preset interactive functions of the target floating window can also be migrated to the second page without affecting the debugging work of the developer.

[0030] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.

[0032] Figure 1 A schematic diagram showing the principle of adding a floating window when switching pages in the related art is shown;

[0033] Figure 2 A flow chart of a method for adding a floating window when switching pages provided by an embodiment of the present disclosure is shown;

[0034] Figure 3 A schematic diagram illustrating the principle of adding a floating window when switching pages provided by an embodiment of the present disclosure is shown;

[0035] Figure 4 A schematic diagram showing the effect of a floating window provided by an embodiment of the present disclosure is shown;

[0036] Figure 5 A schematic diagram of a device for adding a floating window during page switching provided by an embodiment of the present disclosure is shown;

[0037] Figure 6 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.

[0039] The floating window used on ordinary terminal devices (i.e., terminal devices for ordinary users) usually requires the user to grant the system display permission. After granting the system display permission, the ordinary terminal device can display the floating window when the floating window is opened. Usually, the debugging floating window on the debugging terminal device installed with the Android operating system does not require the system display permission to be granted. When the floating window is opened, a floating window view (floating window View) with a floating window drawn on it will be created in advance in the above-mentioned debugging terminal device, and then the floating window View will be added to the DecorView root node view of the current page. Figure 1 In the schematic diagram of the related art showing how to add a floating window when switching pages, the floating window View containing the floating window is first removed from the DecorView of page A and then added to the DecorView of page B. This creates the effect of the floating window floating above the page. However, this approach results in a brief interval between the floating window View being removed from page A and being added to page B. This causes the floating window to disappear briefly and then reappear, creating a sense of page flickering, which can easily affect developers' debugging work.

[0040] Based on this, the present disclosure provides a method for adding a floating window when switching pages. In the process of jumping from the first page to the second page, an initial proxy view is created in the root node view corresponding to the second page, and the initial proxy view is used to proxy the drawing function originally possessed by the target floating window view in the first page, and the target floating window is drawn in the second page. In this way, the phenomenon that the target floating window disappears briefly and then reappears due to the need to remove the target floating window view from the first page first and then draw the target floating window on the second page can be avoided. And after the target floating window (referring to the content presented by the floating window) is drawn in the initial proxy view, the target floating window view corresponding to the target floating window (functions that do not need to be presented) is added to the target proxy view. In this way, the preset interactive functions of the target floating window can also be migrated to the second page without affecting the debugging work of developers.

[0041] The defects of the above solutions and the proposed solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0042] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0043] First, it is explained that the method, apparatus, device and medium for adding a floating window during page switching disclosed in the embodiments of the present disclosure are applicable to scenarios where developers add a floating window to a page when designing / debugging a page.

[0044] To facilitate understanding of this embodiment, a method for adding a floating window during page switching disclosed in an embodiment of the present disclosure is first introduced in detail. The executor of the method for adding a floating window during page switching provided in an embodiment of the present disclosure is generally a computer device with certain computing capabilities.

[0045] The following describes the method for adding a floating window when switching pages provided by the embodiment of the present disclosure by taking a terminal device as an example of the execution subject.

[0046] See also Figure 2 FIG. 2 is a flow chart of a method for adding a floating window when switching pages provided by an embodiment of the present disclosure. The method includes S201 to S203, wherein:

[0047] S201: In response to a triggering operation of jumping from a first page containing a target floating window to a second page, an initial proxy view is created in a root node view corresponding to the second page.

[0048] Here, the first page and the second page may refer to the design page or the debugging page opened during the application development process, that is, the first page may refer to the first development page, and the second page may refer to the second development page. In an embodiment of the present disclosure, the trigger operation may refer to the operation of triggering a jump from the first page containing the target floating window to the second page. Exemplarily, the trigger operation may include a sliding operation triggered on the first page, wherein the sliding operation may include a sliding operation in any direction, and the sliding direction triggered on different first pages may be different. Exemplarily, the trigger operation may also include a click operation triggered on a page jump button, wherein the page jump button refers to a button that jumps from the first page to the second page, and the page jump button may be a real button set on the terminal device, or a virtual button set on the first page. Exemplarily, the trigger operation may also include a click operation triggered on a target display element on the first page, wherein the target display element may refer to any form of content element displayed on the first page, such as an application icon, a picture, a video, a URL link, a text with an internal link (the internal link is used to link to the second page), etc. In a specific implementation, in response to a triggering operation on a target display element, a jump can be made from a first page containing at least one target display element to a second page. The second page can be a page displaying detailed content of the target display element. In other embodiments, the triggering operation can also include other forms of triggering operations, such as shaking the terminal device, voice control, etc. It should be noted that any other possible triggering operations should be within the scope of protection claimed in this disclosure.

[0049] The first page and the second page each have a corresponding root node view. The root node view can contain multiple levels of views, and the root node view and the multiple levels of views can form a tree structure view.

[0050] like Figure 3 As shown, before responding to the trigger operation of jumping from the first page to the second page, the root node view corresponding to the first page may include a target proxy view and a target floating window view. Among them, the target floating window can be drawn on the target proxy view of the first page. The root node view corresponding to the first page can display the target floating window on the first page through the target proxy view. The target floating window view can respond to the interactive operation on the target floating window, so that the target floating window supports the preset interactive function. It should be noted here that in Figure 3In the example, the target proxy view and the target floating window view may be positioned at the same position, that is, they may be superimposed. To clearly indicate the target floating window view, the target proxy view and the target floating window view do not completely overlap. If the second development interface is a newly opened interface, the root node view corresponding to the second development interface may not include the target proxy view and the target floating window view.

[0051] In the case where the terminal device executing the embodiment of the present disclosure is a terminal device installed with an Android operating system, the root node view corresponding to the first page and the second page can be DecorView, and the target floating window view can be a floating window View.

[0052] like Figure 3 As shown, in the process of responding to the trigger operation of jumping from the first page to the second page, an initial proxy view can be first created in the root node view of the second page. The initial proxy view created by the second page can be used to draw the target floating window, and in one embodiment, the initial proxy view can be a proxy view that cannot be used to respond to interactive operations on the target floating window, that is, the initial proxy view only proxies the drawing function of the target floating window view. Among them, in one embodiment, the target floating window view can be added to the root node view corresponding to the second page so that the target floating window drawn on the initial proxy view can support the preset interactive functions. This process will be described in detail later.

[0053] In order to create the effect that the target floating window is always floating above the page when jumping from the first page to the second page, the position of the target floating window displayed on the second page relative to the root node view corresponding to the second page can be the same as the position of the target floating window displayed on the first page relative to the root node view corresponding to the first page. Therefore, in one embodiment, when creating the initial proxy view, the position information of the target floating window in the root node view corresponding to the first page can be obtained, and then based on this position information, the initial proxy view is created at the corresponding position in the root node view corresponding to the second page.

[0054] Here, illustratively, the position information of the target floating window in the root node view corresponding to the first page can be the coordinate information of the target floating window in the root node view corresponding to the first page. The position of the target floating window in the root node view drawn using the created initial proxy view is the same as the position of the target floating window in the root node view on the first page.

[0055] It should be noted here that in order to achieve a better effect of the target floating window always floating above the page during the process of jumping from the first page to the second page, the target floating window in the first page can be displayed all the time before the initial proxy view is created and the target floating window is drawn using the initial proxy view. That is, the target proxy view and the target floating window view in the first page always exist, such as Figure 3 In this way, it is possible to avoid the phenomenon that the target floating window disappears briefly and then reappears because the target floating window view needs to be removed from the first page first and then the target floating window is drawn on the second page.

[0056] As mentioned above, the initial proxy view created on the second page can be used to draw the target floating window. For the specific drawing process, please refer to step S202 included in the embodiment of the present disclosure.

[0057] S202: Draw the target floating window in the initial proxy view according to the drawing information of the target floating window, to obtain a target proxy view displaying the target floating window.

[0058] In an embodiment of the present disclosure, the drawing information used to draw the target floating window can be pre-set by the developer. For example, the developer can pre-develop the drawing code used to draw the target floating window. In a specific implementation, when drawing the target floating window in the initial proxy view, the initial proxy view can directly call the drawing information used by the target floating window in the first page. That is, the drawing information used to draw the target floating window in the initial proxy view is the same as the drawing information used by the target floating window in the first page. In this way, the target floating window displayed on the second page can be the same as the target floating window displayed on the first page, thereby presenting the effect that the target floating window is always floating above the page.

[0059] The drawing information of the target floating window may include at least one of the size of the target floating window, the shape of the target floating window, and the display content in the target floating window.

[0060] Based on the size and / or shape of the target floating window included in the target floating window drawing information, a target floating window of the same size and shape as that in the target floating window view can be drawn in the initial proxy view. Based on the display content of the target floating window included in the target floating window drawing information, the display content of the target floating window drawn in the initial proxy view can be made the same as the display content of the target floating window on the first page.

[0061] In other embodiments, the drawing information of the target floating window may further include other drawing information, such as the color of the target floating window, the display mode of the target floating window, the font size of the displayed content, the position of the displayed content in the target floating window, etc. It should be noted that any other possible drawing information should be within the scope of protection claimed in this disclosure.

[0062] Therefore, after the target floating window is drawn, the target proxy view on the second page can be obtained. The target floating window on the second page is the same as the target floating window on the first page. However, it is worth noting that the target floating window in the target proxy view does not support the preset interactive functions. This is because the initial proxy view created and the target proxy view obtained are views with only drawing functions. The target proxy view cannot enable the target floating window to support the preset interactive functions.

[0063] Therefore, next, the target floating window view can be added to the root node view corresponding to the second page so that the target floating window in the target proxy view supports the preset interactive function. Specifically, the target floating window view can be added to the target proxy view located in the root node view corresponding to the second page. For the specific process, please refer to step S203 included in the embodiment of the present disclosure.

[0064] S203: Adding a target floating window view corresponding to the target floating window to the target proxy view, so that the target floating window supports a preset interactive function; the target floating window view is used to respond to interactive operations on the target floating window.

[0065] In order to ensure that the target floating window on the second page and the preset interactive functions supported by the target floating window on the first page will not affect each other before the first page completely jumps to the second page, in one embodiment, the target floating window view corresponding to the target floating window can be removed from the root node view corresponding to the first page, and the target floating window view can be added to the target proxy view of the second page.

[0066] Since the target floating window view corresponding to the target floating window can respond to the interactive operation on the target floating window, adding the target floating window view to the target proxy view of the second page can enable the target floating window in the target proxy view to support the preset interactive function, and after removing the target floating window view corresponding to the target floating window from the root node view corresponding to the first page, as shown in FIG. Figure 3 As shown, the root node view corresponding to the first page no longer includes the target floating window view, and the target floating window in the first page will no longer support the preset interactive function.

[0067] To ensure that the preset interactive functions supported by the target floating window in the target proxy view are not affected, in one embodiment, the target floating window view corresponding to the target floating window can be added to the same position as the target proxy view, that is, the position of the target floating window view in the root node view corresponding to the second page is the same as the position of the target proxy view in the root node view corresponding to the second page. In one embodiment, the target floating window view can be added below the target proxy view, the target proxy view is used to display the target floating window, and the target floating window view is used to respond to interactive operations on the target floating window, so that the target floating window displayed on the second page can have the same display effect and interactive functions as the target floating window displayed on the first page.

[0068] After the target floating window view corresponding to the target floating window is added to the target proxy view, the target proxy view can be retained in the root node view of the first page until only the second page is displayed in the terminal device.

[0069] When only the second page is displayed on the terminal device, the first page may or may not be removed from the background cache by the system in the terminal device. If the first page is removed, the target proxy view in the first page will also be removed; if the first page is not removed, the target proxy view in the first page will not be removed either. Therefore, in the specific implementation process, the embodiment of the present disclosure may further include the following steps:

[0070] In response to a page return operation triggered on the second page, a determination is made as to whether a target proxy view exists in the root node view of the first page to which the target proxy view is returned. Then, upon determining that the target proxy view exists in the root node view of the first page, the target floating window view corresponding to the target floating window is removed from the root node view corresponding to the second page, and the target floating window view is added to the target proxy view of the first page.

[0071] Here, the page return operation may refer to an operation of returning from the second page to the first page. Exemplarily, the page return operation may be a sliding operation in the opposite direction to the sliding direction corresponding to the trigger operation of jumping from the first page to the second page in the previous text. For example, the trigger operation of jumping from the first page to the second page is an operation of sliding to the right, and the page return operation may be an operation of sliding to the left. Exemplarily, the page return operation may include a click operation triggered on a page return button, wherein the page return button may be a real button set on the terminal device, such as the Home start button that can return to the main screen, or a virtual button set on the second page. In other embodiments, the page return operation may also include other forms of operations, such as voice control operations, etc. It should be noted here that any other possible page return operations should be within the scope of protection claimed in this disclosure.

[0072] In one embodiment, the target proxy view existing in the root node view in the first page can be a proxy view created in the root node view in the first page and drawn with the target floating window when the history triggers an operation to jump from a third development page containing the target floating window (the third development page can be a page different from the first page and the second page) to the first page.

[0073] After determining that the target proxy view exists in the root node view in the first page, there is no need to repeatedly create the initial proxy view and draw the target proxy view. The process of removing the target floating window view corresponding to the target floating window from the root node view corresponding to the second page and adding the target floating window view to the target proxy view of the first page is similar to the aforementioned process of removing the target floating window view corresponding to the target floating window from the root node view corresponding to the first page and adding the target floating window view to the target proxy view of the second page, and will not be repeated here.

[0074] After adding the target floating window view corresponding to the target floating window to the target proxy view, the user can move the target floating window on the second page. In the process of moving the target floating window, both the target floating window view and the target proxy view need to be moved, and the information such as the direction and distance of the target floating window view and the target proxy view can be the same. Specifically, in one embodiment, the embodiment of the present disclosure may further include the following steps: in response to the move operation on the target floating window, moving the initial proxy view, and redrawing the target floating window in the moved initial proxy view to obtain the moved target proxy view, and moving the target floating window view to the moved target proxy view.

[0075] Here, it can be in response to a move operation on the target floating window on the second page. Exemplarily, the move operation can include a drag operation on the target floating window. In a specific implementation, the movement attribute information corresponding to the move operation can be obtained in real time during the move process. The movement attribute information can include information such as the movement distance and movement direction. Then, based on the movement attribute information, the initial proxy view created on the second page is moved, and based on the drawing information of the target floating window, the target floating window is redrawn in the moved initial proxy view to obtain the moved target proxy view. Furthermore, based on the aforementioned movement attribute information, the target floating window view can be moved to the moved target proxy view.

[0076] Considering the process of the user moving the target floating window on the second page, it is unlikely that the user will interact with the target floating window while moving the target floating window. Therefore, in the embodiment of the present disclosure, the target floating window may be redrawn to obtain the moved target proxy view before the target floating window view is moved to the moved target proxy view.

[0077] In other embodiments, in response to a move operation on the target floating window, the initial proxy view may be moved, and while the initial proxy view is being moved, the target floating window view may be moved into the initial proxy view, and then the target floating window may be redrawn in the moved initial proxy view to obtain the moved target proxy view.

[0078] Considering that information such as the size, shape, and display content of the target floating window may not change during the process of moving the target floating window, there is no need to redraw the target floating window. Therefore, in one embodiment, the target proxy view can also be moved in response to the moving operation on the target floating window, and the target floating window view corresponding to the target floating window can be moved to the target proxy view after the move.

[0079] Based on the same considerations as mentioned above, that is, in the process of the user moving the target floating window on the second page, it is unlikely that the user will interact with the target floating window while moving the target floating window. In other embodiments, it is also possible to respond to the moving operation on the target floating window and move the target floating window view to the target proxy view while moving the target proxy view.

[0080] The above embodiment describes the process of moving the target floating window on the second page after adding the target floating window view corresponding to the target floating window to the target proxy view on the second page. Before jumping from the first page to the second page, the process of the user moving the target floating window on the first page can be similar to the process of moving the target floating window on the second page. In addition, when any development page containing a target floating window is displayed on the terminal device, the process of moving the target floating window is similar to the process of moving the target floating window on the second page, and will not be repeated here.

[0081] Considering that the drawing information corresponding to the target floating window may change, for example, if the developer reconfigures the size, shape, display content, and other information of the target floating window, the target floating window should be adjusted accordingly. In one embodiment, in response to obtaining the updated drawing information for the target floating window, the target floating window can be redrawn in the target proxy view based on the updated drawing information.

[0082] Here, the updated drawing information may be, for example, reset by the developer. This process may occur before jumping from the first page to the second page, when only the first page containing the target floating window is displayed on the terminal device, or after jumping from the first page to the second page, when only the second page containing the target floating window is displayed on the terminal device.

[0083] In the process of jumping from the first page to the second page, if the developer resets the drawing information corresponding to the target floating window, in one method, the target proxy view in the first page and the target proxy view in the second page both use the drawing information before the update to draw the target floating window. After completing the jump from the first page to the second page, when only the second page is displayed on the terminal device, the target floating window is redrawn in the target proxy view of the second page based on the updated drawing information.

[0084] Take the mobile phone as an example, Figure 4 The figure shows a schematic diagram of the effect of a floating window provided by an embodiment of the present disclosure. From left to right, in the first figure, when only the main interface is displayed on the mobile phone screen, the target floating window is located in the middle of the mobile phone screen; in the second figure, when the sliding operation from right to left is triggered, the main interface and the map interface are displayed on the mobile phone screen at the same time. In this case, the target floating window is still located in the middle of the mobile phone screen; in the third figure, when only the map interface is displayed on the mobile phone screen, the target floating window is still located in the middle of the mobile phone screen. Thus, the effect of the target floating window always floating in the middle of the mobile phone screen is presented.

[0085] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0086] Based on the same inventive concept, the embodiment of the present disclosure also provides a floating window adding device during page switching corresponding to the floating window adding method during page switching. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned floating window adding method during page switching in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0087] Reference Figure 5 FIG. 1 is a schematic diagram of the architecture of a device for adding a floating window when switching pages provided by an embodiment of the present disclosure. The device includes: a creation module 501, a first drawing module 502, and an adding module 503; wherein,

[0088] A creation module 501 is configured to create an initial proxy view in a root node view corresponding to a second page in response to a triggering operation of jumping from a first page containing a target floating window to the second page;

[0089] A first drawing module 502 is configured to draw the target floating window in the initial proxy view according to the drawing information of the target floating window, so as to obtain a target proxy view displaying the target floating window;

[0090] Adding module 503 is used to add the target floating window view corresponding to the target floating window to the target proxy view, so that the target floating window supports the preset interactive function; the target floating window view is used to respond to the interactive operation for the target floating window.

[0091] In an optional implementation, the creation module 501 is specifically configured to:

[0092] Obtaining location information of the target floating window in the root node view corresponding to the first page;

[0093] Based on the position information, the initial proxy view is created at a corresponding position in the root node view corresponding to the second page.

[0094] In an optional embodiment, the device further includes:

[0095] A response module, configured to respond to obtaining updated drawing information for the target floating window;

[0096] A second drawing module is configured to redraw the target floating window in the target proxy view based on the updated drawing information.

[0097] In an optional implementation, a module 503 is added, specifically configured to:

[0098] The target floating window view corresponding to the target floating window is removed from the root node view corresponding to the first page, and the target floating window view is added to the target proxy view of the second page.

[0099] In an optional embodiment, the device further includes:

[0100] a determination module, configured to, in response to a page return operation triggered on the second page, determine whether the target proxy view exists in the root node view of the returned first page;

[0101] A moving module is used to remove the target floating window view corresponding to the target floating window from the root node view corresponding to the second page after determining that the target proxy view exists in the root node view in the first page, and add the target floating window view to the target proxy view of the first page.

[0102] In an optional embodiment, the device further includes:

[0103] A moving module is used to move the initial proxy view in response to a move operation on the target floating window, redraw the target floating window in the initial proxy view after the move, obtain the moved target proxy view, and move the target floating window view to the moved target proxy view.

[0104] In an optional implementation, the drawing information includes at least one of a size of the target floating window, a shape of the target floating window, and display content in the target floating window.

[0105] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference can be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0106] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 66 is a schematic diagram of the structure of a computer device 600 provided in an embodiment of the present disclosure, including a processor 601, a memory 602, and a bus 603. The memory 602 is used to store execution instructions and includes a memory 6021 and an external memory 6022. The memory 6021 is also referred to as internal memory and is used to temporarily store operation data in the processor 601 and data exchanged with an external memory 6022 such as a hard disk. The processor 601 exchanges data with the external memory 6022 through the memory 6021. When the computer device 600 is running, the processor 601 communicates with the memory 602 via the bus 603, so that the processor 601 executes the following instructions:

[0107] In response to a triggering operation of jumping from a first page containing a target floating window to a second page, creating an initial proxy view in a root node view corresponding to the second page;

[0108] Drawing the target floating window in the initial proxy view according to the drawing information of the target floating window, to obtain a target proxy view displaying the target floating window;

[0109] The target floating window view corresponding to the target floating window is added to the target proxy view, so that the target floating window supports a preset interactive function; the target floating window view is used to respond to interactive operations on the target floating window.

[0110] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program executes the steps of the method for adding a floating window during page switching described in the above method embodiment. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0111] The embodiments of the present disclosure also provide a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the method for adding a floating window when switching pages described in the above method embodiment. For details, please refer to the above method embodiment and will not be repeated here.

[0112] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0114] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0115] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0116] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0117] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A method for adding a floating window when switching pages, characterized in that: include: In response to a triggering operation of jumping from a first page containing a target floating window to a second page, creating an initial proxy view in a root node view corresponding to the second page; Drawing the target floating window in the initial proxy view according to the drawing information of the target floating window, to obtain a target proxy view displaying the target floating window; Adding a target floating window view corresponding to the target floating window to the target proxy view, so that the target floating window supports a preset interactive function; The target floating window view is used to respond to interactive operations on the target floating window, The step of adding the target floating window view corresponding to the target floating window to the target proxy view includes: The target floating window view corresponding to the target floating window is removed from the root node view corresponding to the first page, and the target floating window view is added to the target proxy view of the second page.

2. The method according to claim 1, characterized in that The creating an initial proxy view in the root node view corresponding to the second page includes: Obtaining location information of the target floating window in the root node view corresponding to the first page; Based on the position information, the initial proxy view is created at a corresponding position in the root node view corresponding to the second page.

3. The method according to claim 1, characterized in that The method further comprises: In response to acquiring updated drawing information for the target floating window; Based on the updated drawing information, the target floating window is redrawn in the target proxy view.

4. The method according to claim 1, wherein The method further comprises: In response to a page return operation triggered on the second page, determining whether the target proxy view exists in the root node view of the returned first page; After determining that the target proxy view exists in the root node view in the first page, the target floating window view corresponding to the target floating window is removed from the root node view corresponding to the second page, and the target floating window view is added to the target proxy view of the first page.

5. The method according to claim 1, wherein After adding the target floating window view corresponding to the target floating window to the target proxy view, the method further includes: In response to a move operation on the target floating window, the initial proxy view is moved, and the target floating window is redrawn in the moved initial proxy view to obtain the moved target proxy view, and the target floating window view is moved to the moved target proxy view.

6. The method according to claim 1, characterized in that The drawing information includes at least one of a size of the target floating window, a shape of the target floating window, and display content in the target floating window.

7. A device for adding a floating window when switching pages, characterized in that: include: A creation module, configured to create an initial proxy view in a root node view corresponding to a second page in response to a triggering operation of jumping from a first page containing a target floating window to a second page; a first drawing module, configured to draw the target floating window in the initial proxy view according to the drawing information of the target floating window, to obtain a target proxy view displaying the target floating window; An adding module, configured to add a target floating window view corresponding to the target floating window to the target proxy view, so that the target floating window supports a preset interactive function; The target floating window view is used to respond to interactive operations on the target floating window, The step of adding the target floating window view corresponding to the target floating window to the target proxy view includes: The target floating window view corresponding to the target floating window is removed from the root node view corresponding to the first page, and the target floating window view is added to the target proxy view of the second page.

8. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate via the bus. When the machine-readable instructions are executed by the processor, the steps of the method for adding a floating window when switching pages as described in any one of claims 1 to 6 are performed.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for adding a floating window during page switching according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Display method of floating window view and related device

    CN109933401A

  • Floating window control method and device, computer equipment and readable storage medium

    CN113254140A