CN114780089A - Method, device, equipment and medium for adding floating window during page switching - Google Patents

Method, device, equipment and medium for adding floating window during page switching Download PDF

Info

Publication number
CN114780089A
CN114780089A CN202210209859.8A CN202210209859A CN114780089A CN 114780089 A CN114780089 A CN 114780089A CN 202210209859 A CN202210209859 A CN 202210209859A CN 114780089 A CN114780089 A CN 114780089A
Authority
CN
China
Prior art keywords
floating window
target
view
page
target floating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210209859.8A
Other languages
Chinese (zh)
Inventor
罗吉童
龚振杰
许磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202210209859.8A priority Critical patent/CN114780089A/en
Publication of CN114780089A publication Critical patent/CN114780089A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure provides a floating window adding method during page switching, wherein the method comprises the following steps: 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 a target floating window in an 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; and adding 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. In the embodiment of the disclosure, the initial proxy view may proxy the drawing function of the target floating window view in the first page, and draw the 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.

Description

Method, device, equipment and medium for adding floating window during page switching
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for adding a floating window during page switching.
Background
In a terminal device (such as a mobile phone), some shortcut operations, such as quickly opening an application interface, can be provided for a user by displaying a floating window.
In general, the floating window may include a floating window on a common client page and a floating window on a debugging page (or a page in the development process, or simply a development page) opened by an application developer. For the second type, the floating window is a floating window that can be used without granting the system display right. However, when the page is switched, the floating window in the switched page appears after temporarily disappearing, so that the page flicker feeling is generated, and the debugging work of a developer is influenced.
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.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is to be understood that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art to which the disclosure pertains without the benefit of the inventive faculty, and that additional related drawings may be derived therefrom.
FIG. 1 is a schematic diagram illustrating the addition of a floating window during page switching in the related art;
fig. 2 shows a flowchart of a floating window adding method during page switching according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a principle of adding a floating window during page switching according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating an effect of a floating window provided by an embodiment of the present disclosure;
fig. 5 is a schematic diagram illustrating a floating window adding apparatus during page switching according to an embodiment of the present disclosure;
fig. 6 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.
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.

Claims (10)

1. A floating window adding method during page switching is characterized by comprising the following steps:
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;
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.
2. The method of claim 1, wherein creating an initial proxy view in a root node view corresponding to the second page comprises:
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.
3. The method of claim 1, further comprising:
responding to the obtained updated drawing information aiming at the target floating window;
redrawing the target floating window in the target proxy view based on the updated drawing information.
4. The method according to claim 1, wherein the adding the target floating window view corresponding to the target floating window into the target agent view comprises:
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.
5. The method of claim 4, further comprising:
responding to a 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 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.
6. The method of claim 1, wherein after adding the target hover window view corresponding to the target hover window to the target proxy view, the method further comprises:
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 a moved target proxy view, and moving the target floating window view into the moved target proxy view.
7. The method according to claim 1, wherein 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.
8. The utility model provides a suspension window when page switches adds device which characterized in that includes:
the system comprises a creating module, a judging module and a display module, wherein the creating module is used for creating 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;
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 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.
9. A computer device, comprising: 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 a computer device is running, the machine readable instructions when executed by the processor performing the steps of the floating window adding method at page switching of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the floating window adding method upon page switching according to any one of claims 1 to 7.
CN202210209859.8A 2022-03-03 2022-03-03 Method, device, equipment and medium for adding floating window during page switching Pending CN114780089A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210209859.8A CN114780089A (en) 2022-03-03 2022-03-03 Method, device, equipment and medium for adding floating window during page switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210209859.8A CN114780089A (en) 2022-03-03 2022-03-03 Method, device, equipment and medium for adding floating window during page switching

Publications (1)

Publication Number Publication Date
CN114780089A true CN114780089A (en) 2022-07-22

Family

ID=82423641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210209859.8A Pending CN114780089A (en) 2022-03-03 2022-03-03 Method, device, equipment and medium for adding floating window during page switching

Country Status (1)

Country Link
CN (1) CN114780089A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115729660A (en) * 2022-11-08 2023-03-03 荣耀终端有限公司 Interface switching method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115729660A (en) * 2022-11-08 2023-03-03 荣耀终端有限公司 Interface switching method and related device

Similar Documents

Publication Publication Date Title
TWI808393B (en) Page processing method, device, apparatus and storage medium
CN109101157B (en) Sidebar icon setting method and device, terminal and storage medium
CN110020323B (en) Page switching method and system for hybrid application, computer equipment and storage medium
CN109782977B (en) View processing method, electronic device and storage medium
CN112947969B (en) Page off-screen rendering method, device, equipment and readable medium
US10402470B2 (en) Effecting multi-step operations in an application in response to direct manipulation of a selected object
CN112748843B (en) Page switching method and device, computer equipment and storage medium
US10452231B2 (en) Usability improvements for visual interfaces
RU2768526C2 (en) Real handwriting presence for real-time collaboration
Fielding Beginning responsive web design with HTML5 and CSS3
US20160216929A1 (en) Processing application interface
CN114115681B (en) Page generation method and device, electronic equipment and medium
CN111744181B (en) Method and device for displaying information in game, game client and medium
CN114780089A (en) Method, device, equipment and medium for adding floating window during page switching
CN107544723B (en) Application program interaction method, device and system
CN114741071A (en) Application construction method and device
CN111603757B (en) Processing method, device and equipment for equipment in game
CN111897607A (en) Application interface loading and interaction method, device and storage medium
CN113849713A (en) Search result display method and device, computer equipment and storage medium
CN108021366A (en) Interface animation realization method, device, electronic equipment, storage medium
CN115268884B (en) Mobile terminal visual page configuration and rendering method based on aPaaS platform
US20160147741A1 (en) Techniques for providing a user interface incorporating sign language
CN111782333B (en) Interface display method and device in game, storage medium and terminal equipment
CN116974678B (en) Page-based view controller jump method, device and storage medium
US9733783B1 (en) Controlling a user interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.