Disclosure of Invention
The embodiment of the disclosure at least provides a floating window adding method, device, equipment and medium during page switching.
In a first aspect, an embodiment of the present disclosure provides a floating window adding method during page switching, including:
responding to a trigger operation of jumping from a first page containing a target floating window to a second page, and 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 on which the target floating window is displayed;
adding a target floating window view corresponding to the target floating window into the target agent view so that the target floating window supports a preset interaction function; the target floating window view is used for responding to the interactive operation aiming at the target floating window.
In an optional implementation manner, the creating an initial proxy view in a root node view corresponding to the second page includes:
acquiring position information of the target floating window in a root node view corresponding to the first page;
based on the location information, creating the initial proxy view at a corresponding location in a root node view corresponding to the second page.
In an optional embodiment, the method further comprises:
responding to the acquisition of updated drawing information for the target floating window;
redrawing the target floating window in the target proxy view based on the updated drawing information.
In an optional embodiment, the adding the target floating window view corresponding to the target floating window to the target agent view includes:
and 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 into the target agent view of the second page.
In an optional embodiment, the method further comprises:
responding to page returning operation triggered by the second page, and judging whether the returned root node view in the first page has the target agent view or not;
and after determining that the target proxy view exists in the root node view in the first page, 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 into the target proxy view of the first page.
In an optional implementation manner, after the target floating window view corresponding to the target floating window is added to the target agent view, the method further includes:
and responding to the moving operation aiming at the target floating window, moving the initial proxy view, redrawing the target floating window in the moved initial proxy view, obtaining the moved target proxy view, and moving the target floating window view into the moved target proxy view.
In an optional embodiment, the drawing information includes at least one of a size of the target floating window, a shape of the target floating window, and a display content in the target floating window.
In a second aspect, an embodiment of the present disclosure further provides a floating window adding apparatus during page switching, including:
the creating module is used for responding to the triggering operation of jumping from a first page containing a target floating window to a second page, and creating an initial proxy view in a root node view corresponding to the second page;
the first drawing module is used for 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 on which the target floating window is displayed;
the adding module is used for adding the target floating window view corresponding to the target floating window into the target agent view so as to enable the target floating window to support a preset interaction function; the target floating window view is used for responding to the interactive operation aiming at the target floating window.
In a third aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
According to the floating window adding method during page switching, the initial proxy view is created in the root node view corresponding to the second page in the process of jumping from the first page to the second page, the original drawing function of the target floating window view in the first page is used as the proxy of the initial proxy view, and the target floating window is drawn in the second page. And after the target floating window (which refers to the content displayed by the floating window) is drawn in the initial proxy view, adding a target floating window view (which does not need to be displayed) corresponding to the target floating window into the target proxy view, so that the preset interaction function of the target floating window can be migrated into a second page, and the debugging work of a developer is not influenced.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a 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 illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
The floating window used on a common terminal device (i.e. a terminal device used by a common user) generally requires the user to grant the display right of the system. After the system is granted with the display authority, the common terminal equipment can display the floating window under the condition of opening the floating window. Generally, a debugging floating window on a debugging terminal device provided with an Android operating system does not need to grant system display permission. When the floating window is opened, a floating window View (floating window View) drawn with the floating window is created in advance in the debugging terminal device, and then the floating window View is added to a root node View of the DecorView of the current page. As shown in fig. 1, in the schematic diagram of adding a floating window during page switching in the related art, the floating window View in which the floating window is located is removed from the decoview of the page a, and then added to the decoview of the page B, so that an effect that the floating window floats above the page is exhibited. However, in this way, the View of the floating window where the floating window is located is removed from the page a, but is not added to the page B at the short interval, which causes the phenomenon that the floating window appears after temporarily disappearing, thereby generating a page flicker feeling and easily affecting the debugging work of developers.
Based on this, the present disclosure provides a floating window adding method during page switching, which creates an initial proxy view in a root node view corresponding to a second page in a process of jumping from the first page to the second page, and uses the initial proxy view to proxy a drawing function originally possessed by a target floating window view in the first page to draw a target floating window in the second page, so that a phenomenon that the target floating window appears after the target floating window disappears for a short time due to the fact that 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 can be avoided. And after the target floating window (which refers to the content presented by the floating window) is drawn in the initial proxy view, adding a target floating window view (which does not need to be presented) corresponding to the target floating window into the target proxy view, so that the preset interaction function of the target floating window can be migrated to the second page, and the debugging work of developers is not influenced.
The defects existing in the above solutions and the proposed solutions are the results obtained after the inventor has made practice and careful study, therefore, the discovery process of the above problems and the solutions proposed by the present disclosure in the following problems should be the contribution of the inventor to the present disclosure in the process of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
First, it is explained that the floating window adding method, apparatus, device and medium in page switching disclosed in the embodiments of the present disclosure are suitable for a scenario in which a developer adds a floating window in a page when designing/debugging the page.
For facilitating understanding of the present embodiment, first, a method for adding a floating window during page switching disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the method for adding a floating window during page switching provided in the embodiments of the present disclosure is generally a computer device with a certain computing capability.
The floating window adding method during page switching provided by the embodiment of the present disclosure is described below by taking an execution subject as a terminal device as an example.
Referring to fig. 2, a flowchart of a floating window adding method during page switching according to an embodiment of the present disclosure is shown, where the method includes S201 to S203, where:
s201: and 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.
Here, the first page and the second page may refer to a design page or a debugging page opened in the application development process, that is, the first page may refer to a first development page, and the second page may refer to a second development page. In the embodiments of the present disclosure, the triggering operation may refer to a triggered operation of jumping from a first page containing the target floating window to a second page. For example, the triggering 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. Illustratively, the triggering operation may further include a clicking operation triggered on a page jump button, where the page jump button refers to a button for jumping from a first page to a second page, and the page jump button may be a real button disposed on the terminal device or a virtual button disposed on the first page. Illustratively, the trigger operation may also include a click operation triggered on a target presentation element on the first page, where the target presentation element may refer to any form of content element presented on the first page, such as an application icon, a picture, a video, a website link, text configured with an in-link (an in-link is used to link to the second page), and so on. In a specific implementation, in response to a trigger operation on the target presentation element, a jump may be made from a first page including the at least one target presentation element to a second page, where the second page may be a page that presents details of the target presentation element, or the like. In other embodiments, the trigger operation may also include other forms of trigger operations, such as shaking the terminal device, voice control operations, and the like. It should be noted here that any other possible triggering operation should be within the scope of the present disclosure.
The first page and the second page both have corresponding root node views. The root node view may include a plurality of hierarchical views, and the root node view and the plurality of hierarchical views may form a view of a tree structure.
As shown in fig. 3, before responding to a trigger operation for jumping from a first page to a second page, a root node view corresponding to the first page may include a target proxy view and a target floating window view. Wherein the target floating window may be drawn on the target proxy view of the first page. The root node view corresponding to the first page can pass through the target proxy view, so that the target floating window is displayed in the first page. The target floating window view may be in response to an interactive operation with respect to the target floating window such that the target floating window supports a preset interactive function. It should be noted that, in fig. 3, the positions of the target agent view and the target floating window view may be the same, that is, the target agent view and the target floating window view may be overlapped, and in order to mark the target floating window view, the positions of the target agent view and the target floating window view are not completely overlapped. And under the condition that the second development interface is a newly opened interface, the root node view corresponding to the second development interface does not contain the target agent view and the target floating window view.
In the case that the execution main body terminal device is a terminal device installed with an Android operating system, the root node views corresponding to the first page and the second page may be DecorView, and the target floating window View may be a floating window View.
As shown in fig. 3, in response to a trigger operation to jump from a first page to a second page, an initial proxy view may be created in a root node view of the second page. The initial proxy view created by the second page may be used to draw the target floating window, and in one embodiment, the initial proxy view may be a proxy view that cannot be used to respond to an interactive operation on the target floating window, i.e., the initial proxy view only proxies the drawing functions of the target floating window view. In an embodiment, the target floating window view may also 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 a preset interactive function, which will be described in detail later.
In order to present the effect that the target floating window is always floating above the page in the process of jumping from the first page to the second page, the position of the target floating window displayed in the second page relative to the root node view corresponding to the second page may be the same as the position of the target floating window displayed in the first page relative to the root node view corresponding to the first page. Therefore, in one embodiment, when the initial proxy view is created, the position information of the target floating window in the root node view corresponding to the first page may be obtained, and then based on the position information, the initial proxy view is created at the corresponding position in the root node view corresponding to the second page.
Here, for example, the position information of the target floating window in the root node view corresponding to the first page may be coordinate information of the root node view corresponding to the target floating window in the first page. The position of the target floating window drawn by the created initial proxy view in the root node view is the same as the position of the target floating window in the root node view in the first page.
It should be noted that, in order to better ensure that the target floating window always floats above the page during the jump from the first page to the second page, the target floating window in the first page may be always displayed before the initial proxy view is created and the target floating window is completely drawn by using the initial proxy view, that is, the target proxy view and the target floating window view in the first page always exist, as shown in fig. 3. Therefore, the phenomenon that the target floating window disappears shortly and then appears due to the fact that 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 can be avoided.
As described above, the initial proxy view created on the second page may be used to draw the target floating window, and the specific drawing process may refer to the step of S202 included in the embodiment of the present disclosure.
S202: and according to the drawing information of the target floating window, drawing the target floating window in the initial proxy view to obtain the target proxy view on which the target floating window is displayed.
In the embodiment of the present disclosure, the drawing information used for drawing the target floating window may be preset by a developer, for example, the developer may develop a drawing code used for drawing the target floating window in advance. In a specific implementation, when the target floating window is drawn in the initial proxy view, the initial proxy view may directly call 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 to draw the target floating window in the first page. In this way, the target floating window displayed on the second page is the same as the target floating window displayed on the first page, so that the effect that the target floating window always floats above the page can be presented.
The drawing information of the target floating window may include 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.
According to the size of the target floating window and/or the shape of the target floating window contained in the drawing information of the target floating window, the target floating window with the same size and shape as those of the target floating window view can be drawn in the initial proxy view. According to the display content in the target floating window contained in the drawing information of the target floating window, the display content contained in the target floating window drawn in the initial proxy view can be the same as the display content contained in the target floating window on the first page.
In other embodiments, the drawing information of the target floating window may further include other drawing information, such as a color of the target floating window, a display mode of the target floating window, a font size of the display content, position information of the display content in the target floating window, and the like. It should be noted that any other possible rendering information should fall within the scope of the present disclosure.
Therefore, after the target floating window is drawn, the target agent view in the second page can be obtained. The target floating window in the second page is the same as the target floating window in the first page. It should be noted that the target floating window in the target proxy view is a floating window that does not support the preset interactive function, because the created initial proxy view and the obtained target proxy view are views with only the drawing function, and the target proxy view cannot make the target floating window support the preset interactive function.
Therefore, next, the target floating window in the target agent view may be enabled to support a preset interaction function by adding the target floating window view to the root node view corresponding to the second page, and specifically, the target floating window view may be added to the target agent view located in the root node view corresponding to the second page. The specific process may refer to step S203 included in the embodiments of the present disclosure.
S203: adding a target floating window view corresponding to the target floating window into the target agent view so that the target floating window supports a preset interaction function; the target floating window view is used for responding to the interactive operation aiming at the target floating window.
In order to ensure that the preset interactive functions supported by the target floating window on the second page and the target floating window on the first page do not affect each other before the first page completely jumps to the second page, in an embodiment, the target floating window view corresponding to the target floating window may be removed from the root node view corresponding to the first page, and the target floating window view may be added to the target proxy view of the second page.
Since the target floating window view corresponding to the target floating window may respond to the interactive operation for the target floating window, adding the target floating window view to the target agent view of the second page may enable the target floating window in the target agent 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. 3, 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 no longer supports the preset interactive function.
In order to enable the preset interactive function supported by the target floating window in the target agent view not to be affected, in an embodiment, the target floating window view corresponding to the target floating window may be added to the same position as the target agent 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 agent view in the root node view corresponding to the second page. In one embodiment, a target floating window view may be added below the target agent view, the target agent view being used for displaying the target floating window, the target floating window view being used for responding to the interactive operation aiming at the target floating window, so that the target floating window displayed in the second page can have no difference in display effect with the target floating window displayed in the first page, and the interactive function has no difference.
After the target floating window view corresponding to the target floating window is added to the target proxy view, the target proxy view may be kept in the root node view of the first page until only the second page is displayed in the terminal device before the terminal device only displays the second page.
In the case where only the second page is displayed in the terminal device, the first page may or may not be removed from the background cache by the system in the terminal device. In the case that the first page is removed, the target agent view in the first page is also removed; in the case where the first page is not removed, the target proxy view in the first page is also not removed. Therefore, in a specific implementation process, the embodiment of the present disclosure may further include the following steps:
and responding to the page return operation triggered by the second page, and judging whether a target proxy view exists in the root node view in the returned first page. Then, after the fact that the target proxy view exists in the root node view in the first page is determined, 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.
Here, the page return operation may refer to an operation of returning to the first page from the second page. For example, the page return operation may be a sliding operation in a direction opposite to the sliding direction corresponding to the triggering operation of jumping from the first page to the second page in the foregoing, for example, the triggering operation of jumping from the first page to the second page is a sliding operation to the right, and the page return operation may be a sliding operation to the left. Illustratively, 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 provided on the terminal device, such as a Home start key that may return to a Home screen, or may be a virtual button provided on a second page. In other embodiments, the page return operation may also include other forms of operations, such as voice control operations, and the like. It should be noted that any other possible page return operation should be within the scope of the present disclosure.
In one mode, the target proxy view existing in the root node view in the first page may be a proxy view created in the root node view in the first page and drawn with the target floating window when the operation of jumping from a third open page (which may be a page different from the first page and the second page) containing the target floating window to the first page is triggered historically.
After it is determined that the root node view in the first page has the target proxy view, it is no longer necessary to repeatedly create the initial proxy view and draw to obtain the target proxy view, where a 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 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 details are not repeated here.
After adding the target hover window view corresponding to the target hover window to the target proxy view, the user may move the target hover window in the second page. In the process of moving the target floating window, the target floating window view and the target agent view both need to be moved, and information such as the direction and distance in which the target floating window view and the target agent view are moved may be the same. Specifically, in one implementation, the embodiment of the present disclosure may further include the following steps: and responding to the moving operation aiming at the target floating window, moving the initial proxy view, redrawing the target floating window in the moved initial proxy view, obtaining the moved target proxy view, and moving the target floating window view into the moved target proxy view.
Here, the second page may be a page in which the target floating window is moved. Illustratively, the moving operation may include a drag operation on the target floating window, or the like. In specific implementation, the movement attribute information corresponding to the movement operation can be acquired in real time in the movement process. The movement attribute information may include information such as a movement distance and a movement direction. And then moving the initial proxy view created in the second page according to the moving attribute information, and redrawing the target floating window in the moved initial proxy view according to the drawing information of the target floating window to obtain the moved target proxy view. And the target floating window view can be moved to the moved target agent view according to the movement attribute information.
In consideration of the fact that the possibility that the user interacts with the target floating window while moving the target floating window in the process of moving the target floating window on the second page is not very high, in the embodiment of the present disclosure, the target floating window may be redrawn, and the target agent view after being moved is obtained, and then the target floating window view is moved to the target agent view after being moved.
In other embodiments, the initial proxy view may be moved in response to a moving operation for the target floating window, the target floating window view is moved into the initial proxy view while the initial proxy view is moved, and then the target floating window is redrawn in the moved initial proxy view, so as to obtain the moved target proxy view.
In consideration 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, the target floating window may not need to be redrawn, and therefore, in an embodiment, the target agent view may also be moved in response to a moving operation for the target floating window, and the target floating window view corresponding to the target floating window may be moved into the moved target agent view.
Based on the same consideration as the above, that is, the user is less likely to interact with the target floating window while moving the target floating window on the second page, in other embodiments, the target floating window view may be moved into the target agent view while moving the target agent view in response to the moving operation for the target floating window.
The above embodiment describes a process of moving the target floating window in the second page after adding the target floating window view corresponding to the target floating window to the target agent view in the second page. The process of the user moving the target hover window in the first page before jumping from the first page to the second page may be similar to the process of moving the target hover window in the second page described above. And under the condition that any development page containing the 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 in the second page, and the description is omitted here.
Considering that the drawing information corresponding to the target floating window may be changed, for example, the developer resets the size, shape, display content, and other information of the target floating window, and at this time, the target floating window is correspondingly adjusted. In one embodiment, the method may further comprise in response to obtaining updated drawing information for the target floating window; then, based on the updated drawing information, the target floating window is redrawn in the target proxy view.
Here, the updated drawing information may be, for example, reset by a developer. The process may occur during the process of only displaying the first page including the target floating window on the terminal device before jumping from the first page to the second page, or may occur during the process of only displaying the second page including the target floating window on the terminal device after jumping from the first page to the second page.
And 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 mode, in both the target agent view in the first page and the target agent view in the second page, the target floating window is drawn by using the drawing information before updating, and after the jump from the first page to the second page is completed, when only the second page is displayed on the terminal device, the target floating window is redrawn in the target agent view of the second page based on the updated drawing information.
Taking a terminal device as a mobile phone as an example, as shown in fig. 4, which is an effect schematic diagram of a floating window provided in the embodiment of the present disclosure, when viewed from left to right, in the first drawing, under the condition that only a main interface is displayed in a mobile phone screen, a target floating window is located in the middle of the mobile phone screen; the second graph shows a main interface and a map interface in the mobile phone screen simultaneously in the process of triggering the sliding operation from right to left, and in this case, the target floating window is positioned in the middle of the mobile phone screen; in the third diagram, under the condition that only the map interface is displayed in the mobile phone screen, the target floating window is still located in the middle of the mobile phone screen. Therefore, the effect that the target suspension window always floats in the middle of the mobile phone screen is presented.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, the embodiment of the present disclosure further provides a floating window adding device during page switching corresponding to the floating window adding method during page switching, and as the principle of solving the problem of the device in the embodiment of the present disclosure is similar to the floating window adding method during page switching in the embodiment of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are omitted.
Referring to fig. 5, a schematic diagram of an architecture of a floating window adding apparatus during page switching according to an embodiment of the present disclosure is shown, where the apparatus includes: a creating module 501, a first drawing module 502 and an adding module 503; wherein,
a creating module 501, configured to create an initial proxy view in a root node view corresponding to a second page in response to a trigger operation of jumping from a first page containing a target floating window to the second page;
a first drawing module 502, 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 on which the target floating window is displayed;
an adding module 503, configured to add the target floating window view corresponding to the target floating window into the target agent view, so that the target floating window supports a preset interaction function; the target floating window view is used for responding to the interactive operation aiming at the target floating window.
In an alternative embodiment, the creating module 501 is specifically configured to:
acquiring position information of the target floating window in a root node view corresponding to the first page;
based on the location information, the initial proxy view is created at a corresponding location in a root node view corresponding to the second page.
In an alternative embodiment, the apparatus further comprises:
the response module is used for responding to the updated drawing information of the target floating window;
and the second drawing module is used for redrawing the target floating window in the target agent view based on the updated drawing information.
In an optional implementation manner, the adding module 503 is specifically configured to:
and 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 into the target agent view of the second page.
In an alternative embodiment, the apparatus further comprises:
the judging module is used for responding to page returning operation triggered by the second page and judging whether the returned root node view in the first page has the target proxy view or not;
and the moving module is used for 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 into the target proxy view of the first page after the target proxy view is determined to exist in the root node view of the first page.
In an alternative embodiment, the apparatus further comprises:
and the moving module is used for responding to the moving operation of the target floating window, moving the initial proxy view, redrawing the target floating window in the moved initial proxy view, obtaining the moved target proxy view, and moving the target floating window view into the moved target proxy view.
In an optional embodiment, the drawing information includes at least one of a size of the target floating window, a shape of the target floating window, and a display content in the target floating window.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same technical concept, the embodiment of the disclosure also provides computer equipment. Referring to fig. 6, a schematic structural diagram of a computer device 600 provided in the embodiment of the present disclosure includes a processor 601, a memory 602, and a bus 603. The memory 602 is used for storing execution instructions and includes a memory 6021 and an external memory 6022; the memory 6021 is also called an internal memory and is used for temporarily storing the operation data in the processor 601 and the data exchanged with the external memory 6022 such as a hard disk, the processor 601 exchanges data with the external memory 6022 through the memory 6021, and when the computer device 600 operates, the processor 601 and the memory 602 communicate with each other through the bus 603, so that the processor 601 executes the following instructions:
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;
according to the drawing information of the target floating window, drawing the target floating window in the initial proxy view to obtain a target proxy view on which the target floating window is displayed;
adding a target floating window view corresponding to the target floating window into the target agent view so that the target floating window supports a preset interaction function; the target floating window view is used for responding to the interactive operation aiming at the target floating window.
The embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the floating window adding method during page switching described in the foregoing method embodiments are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
An embodiment of the present disclosure further provides a computer program product, where the computer program product bears a program code, and an instruction included in the program code may be used to execute the step of the floating window adding method during page switching in the foregoing method embodiment.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK) or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units into only one type of logical function may be implemented in other ways, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in software functional units and sold or used as a stand-alone product, may be stored in a non-transitory computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present disclosure, which are essential or part of the technical solutions contributing to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.