CN113076161B - Page display method, device, storage medium and equipment - Google Patents

Page display method, device, storage medium and equipment Download PDF

Info

Publication number
CN113076161B
CN113076161B CN202110378262.1A CN202110378262A CN113076161B CN 113076161 B CN113076161 B CN 113076161B CN 202110378262 A CN202110378262 A CN 202110378262A CN 113076161 B CN113076161 B CN 113076161B
Authority
CN
China
Prior art keywords
viewgroup
view
page
target
state data
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.)
Active
Application number
CN202110378262.1A
Other languages
Chinese (zh)
Other versions
CN113076161A (en
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.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya 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 Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN202110378262.1A priority Critical patent/CN113076161B/en
Publication of CN113076161A publication Critical patent/CN113076161A/en
Application granted granted Critical
Publication of CN113076161B publication Critical patent/CN113076161B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Abstract

The present disclosure provides a page display method, a device, a storage medium, and a device, in the method, a first View group is used to accommodate a specified View of Fragment management in a current page, a moving operation of a View of Fragment management from a second View group of the current page to a target View group of a target page is completed through the first View group, and the process does not trigger a life cycle of fragments; in addition, by storing the running state data of the first ViewGroup, the stored data can be used for quickly restoring the running state of the specified View of the Fragment management when the target page is displayed.

Description

Page display method, device, storage medium and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page display method, a device, a storage medium, and a computer apparatus.
Background
The Fragment is a component in Android, is used for displaying interface content, and can accept operations such as clicking, dragging and the like of a user and operations performed by the user. In the related art, when fragments need to move positions, fragments are destroyed and rebuilt, so that resources depending on the life cycle of the fragments are re-registered during switching, and if state recovery is not performed, UI state loss is easy to occur, and poor experience is caused to users.
Disclosure of Invention
In order to overcome the problems in the related art, the present specification provides a page display method, apparatus, storage medium, and device.
According to a first aspect of embodiments of the present disclosure, a page display method is provided, where a current page is a page constructed based on fragments, the fragments manage at least one specified View, the specified View is wrapped in a first View group, the first View group is wrapped in a second View group of the current page, and the first View group and the second View group are managed by activities on which the fragments depend; the method comprises the following steps:
if the triggering operation of a user on the appointed View in the current page is detected, acquiring the running state data of the appointed View, and storing the running state data of a first ViewGroup, wherein the running state data of the first ViewGroup comprises the running state data of the appointed View;
if the target page including the appointed View and the target ViewGroup is detected to be displayed in a switching mode from the current page, the first ViewGroup is added into the target ViewGroup;
and when the target page is displayed, rendering the first ViewGroup by using the stored running state data of the first ViewGroup.
In some examples, adding the first viewsroup to the target viewsroup includes:
and setting the first ViewGroup as a sub View of the target ViewGroup in the layout file of the target page.
In some examples, the specified View shows at least any one of the following:
input box, selection box, multimedia player.
In some examples, the first ViewGroup binds a preset container layout, the preset container layout indicating that the first ViewGroup has an adaptive position and size.
In some examples, the first ViewGroup has a globally unique ViewID.
In some examples, the target page includes:
and the current page is a page after the horizontal and vertical screen switching.
In some examples, after storing the operation state data of the first view group, the method includes:
and after a preset time threshold, clearing the stored running state data of the first ViewGroup.
According to a second aspect of embodiments of the present specification, there is provided a page display device, the device comprising:
the storage module is used for acquiring the operation state data of the appointed View if the triggering operation of the user on the appointed View in the current page is detected, and storing the operation state data of a first ViewGroup, wherein the operation state data of the first ViewGroup comprises the operation state data of the appointed View; the method comprises the steps that a current page is a page constructed based on fragments, the fragments manage at least one appointed View, the appointed View is packaged in a first ViewGroup, the first ViewGroup is packaged in a second ViewGroup of the current page, and the first ViewGroup and the second ViewGroup are managed by activities on which the fragments depend;
the switching module is used for adding the first ViewGroup into the target ViewGroup if the target page comprising the specified View and the target ViewGroup is detected to be displayed from the current page in a switching way;
and the display module is used for rendering the first ViewGroup by utilizing the stored running state data of the first ViewGroup when the target page is displayed.
According to a third aspect of the embodiments of the present description, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the methods of the embodiments of the present description.
According to a fourth aspect of embodiments of the present description, there is provided a computer program comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements any of the methods of the embodiments of the present description when the program is executed.
The technical scheme provided by the embodiment of the specification can comprise the following beneficial effects:
in the embodiment of the specification, a method, a device, a storage medium and equipment for displaying a page are disclosed, in the method, a first ViewGroup is utilized to accommodate a specified View of Fragment management in a current page, a moving operation of the View of the Fragment management from a second ViewGroup of the current page to a target ViewGroup of the target page is completed through the first ViewGroup, and the process does not trigger the life cycle of the Fragment; in addition, by storing the running state data of the first ViewGroup, the stored data can be used for quickly restoring the running state of the specified View of the Fragment management when the target page is displayed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and together with the description, serve to explain the principles of the specification.
FIG. 1 is a flow chart of a page display method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a current page switch display target page shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a flow of a current page switch display target page shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 4 is a hardware configuration diagram of a computer device in which the page display device according to the embodiment of the present disclosure is located;
fig. 5 is a block diagram of a page display device according to an exemplary embodiment of the present specification.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present description as detailed in the accompanying claims.
The terminology used in the description presented herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
Fragments can be translated into fragments or fragments, and are a component in the Android system. In the software development process of the Android system, the switching of the user interface is basically realized by using the switching of an Activity component, and the fragments are part of the Activity, so that a multi-window interface can be created by combining a plurality of fragments into one Activity, and one Fragment can be reused in a plurality of activities, that is, the fragments enable the Activity to be designed in a modularized manner.
In the related art, when fragments need to move positions, fragments are destroyed and rebuilt, so that resources depending on the life cycle of fragments are re-registered during switching, and if state recovery is not done, UI state loss is easy to occur, and poor experience is caused to users. For example, most Android terminal devices automatically switch horizontal and vertical screens according to the gesture of the user handheld device, so that the user cannot avoid the situation that text content in a dialog box of a page in a vertical screen state is lost because the device is automatically switched to the horizontal screen state, and in this case, the user needs to input again, and the experience is very bad. Based on this, the embodiments of the present specification provide a page display method to solve the above-described problems.
Next, embodiments of the present specification will be described in detail.
As shown in fig. 1, fig. 1 is a flowchart of a page display method according to an exemplary embodiment of the present disclosure, where a current page is a page constructed based on fragments, the fragments managing at least one specified View, the specified View being wrapped in a first View group, the first View group being shown in a second View group of the current page, the first View group and the second View group being managed by activities on which the fragments depend, the method comprising:
in step 101, if a trigger operation of a user to a specified View in a current page is detected, acquiring operation state data of the specified View, and storing operation state data of a first View group, wherein the operation state data of the first View group comprises the operation state data of the specified View;
102, if it is detected that a target page including the specified View and the target View group needs to be displayed in a switching manner from the current page, adding the first View group to the target View group;
and in step 103, when the target page is displayed, rendering the first ViewGroup by using the stored running state data of the first ViewGroup.
The embodiment of the specification relates to concepts of View, viewGroup and the like, wherein View is a base class of all controls in an Android system, and an Android UI interface is formed by combining View and derivative classes thereof. The type, color, content, etc. of the View determines the type, color, content, etc. of the interface element presented in the user interface, for example, the corresponding interface element of the View of the text View (TextView) is text, and when the content of the View is the word "hello", the content of the interface element presented in the user interface is also the word "hello". The ViewGroup is derived from View and is a container that accommodates View and its derived classes, i.e., viewGroup can accommodate at least one View and/or at least one other ViewGroup. In addition, for a large control including an internal widget, the internal widget is a child widget of the large control, and the large control is a parent widget of the internal widget, for example, if a hierarchical structure of a UI layout is that View group1 accommodates View group2 and View group2 accommodates View3, in the UI layout, view group1 is a parent container of View group2 and View group2 is a child View of View group 2; similarly, viewGroup2 is the parent container for View3, and View3 is the child View for ViewGroup 2.
The page display method of the specification can be applied to a scene of constructing a page based on fragments in an Android system, for example, the page display method can be applied to an Android application program of constructing an App page based on fragments, and the Android application program can comprise a communication application program, a shopping application program, a video application program and the like.
It will be appreciated that the nature of fragments is a View management class with a lifecycle that fragments can assemble one or more views for presentation, and that fragments' lifecycle facilitates management of resources. In the embodiment of the present disclosure, the View managed by the Fragment is a specified View, and in some examples, the specified View may be a View that accepts a trigger operation of a user and changes a current running state based on the trigger operation. Alternatively, the specified View may exhibit at least any of the following: input box, selection box, multimedia player. It will be appreciated that the input boxes include dialog boxes, search boxes, and the like, in which a user may enter text or textual information; the selection boxes comprise radio selection boxes and check boxes, and a user can perform clicking operation in the selection boxes; the multimedia player includes an audio player, a video player, and the like, and a user can perform a selection operation with respect to a loading file, a progress bar, and the like in the multimedia player. Of course, the content shown in the above specified views may be combined, for example, one Fragment may manage two specified views, where one of the content shown in the specified View is a video player for playing video, and the other content shown in the specified View is an input box for providing comments input by the user. Of course, the specific combination manner may be selected according to the requirements of the actual scenario, which is not limited in this specification.
In the embodiment of the present specification, the first View group is utilized to accommodate the specified views of the Fragment management. The storing of the operation state data of the first viewsroup mentioned in step 101 may refer to: and storing the running state data of the first ViewGroup into the memory. The operation state data here is data recording the current operation state of View, including data generated based on a trigger operation by the user. It will be appreciated that, since the first View group is a container for accommodating the specified views, the operation state data of the first View group stored in the memory includes the operation state data of the specified views accommodated in the first View group in addition to attribute data of the type, color, etc. of the first View group itself.
The target page mentioned in step 102 is a page containing a specified View and a target View group, and since the specified View is a View managed by the Fragment, that is, the scene mentioned in this step in which the target page needs to be displayed by switching from the current page, actually means a scene in which the Fragment needs to be changed. It can be appreciated that there are many scenarios in Android applications that require modification of the Fragment location, such as the case where an Activity is destroyed and rebuilt because of a configuration change or insufficient memory is killed by the system, or the case where an application starts another Activity and reuses fragments managed by the current Activity. In the related art, the movement operation of fragments is generally completed using the interface of the Fragment itself (Fragment API). However, fragments are limited to View movement and trigger a lifecycle by the ID of the container on which they depend, so the interface of the Fragment itself requires that the container on which they depend have a fixed ID. Based on this usage restriction, if fragments are moved from one container to another, since the ID of the container on which the fragments depend changes, an interface using the fragments itself will report an error at this time, and destruction reconstruction of the fragments will be necessarily triggered, so that a UI state loss situation easily occurs. In the scheme of the embodiment, a fixed ViewID container, namely a first ViewGroup is utilized to accommodate fragments, the movement operation of the fragments from a second ViewGroup to a target ViewGroup is completed through the container, and the container on which the fragments depend is not changed in the process, so that the use limit of the frames is avoided; and by storing the running state data of the container, the stored data can be utilized to render the container when the target page is displayed, so that the running state of the View in the Fragment can be quickly recovered.
It should be noted that, the target viewsroup mentioned in step 102 may be a viewsroup preset in the target page, which may be a root node in the UI layout of the target page, or may be other nodes except the root node. The addition of the first ViewGroup to the target ViewGroup mentioned in this step may refer to: in the layout file of the target page, the first ViewGroup is set as a sub View of the target ViewGroup.
In some examples, the target page may be a page obtained after the current page is switched by the landscape screen. It can be understood that in practical applications, most Android terminal devices automatically switch horizontal and vertical screens according to the gesture of the user handheld device, so that the user cannot avoid the situation that text content in a dialog box of a page in a vertical screen state is lost because the device is automatically switched to the horizontal screen state, which is very bad for user experience. In this embodiment, that is, when the landscape screen is switched, the target view group of the target page may accommodate the first view group, so when the target page is displayed, the stored running state data of the first view group may be used to render the first view group, so as to restore the running state of the first view group, that is, the text content input in the dialog box of the portrait screen page by the user may be recorded in the running state data of the first view group and stored in the memory, and when the target page is automatically switched to the landscape screen state, the terminal may add the first view group to the target view group of the landscape screen page, and render the first view group by using the stored running state data of the first view group, so that the landscape screen page displays the original dialog box, and the text content input before the user is still stored in the dialog box. Thus, the experience of the user can be greatly improved.
In addition, since the second ViewGroup and the target ViewGroup belong to containers in different pages, the positions and the sizes of the containers may be different, and in this case, when the first ViewGroup is added to the target ViewGroup, too large difference may occur, which affects the beautiful appearance of the page. Based on this, in some examples, a first ViewGroup binds a preset container layout that indicates that the first ViewGroup has an adaptive location and size. The preset container layout here refers to an xml-defined container layout for declaring the xml attribute of the first viewsroup. It will be appreciated that a page may be rendered when displayed according to the xml attribute of View, e.g., an android: layout_width that defines what width is available for the View on the screen and an android: layout_height that defines what height is available for the View on the screen. Since the container layout to which the first ViewGroup is bound indicates that the first ViewGroup has an adaptive position and size, when the first ViewGroup is added to the target ViewGroup, the position and size of the first ViewGroup can be adaptive to the position and size of the target ViewGroup, for example, the width of the first ViewGroup can be 80% of the width of the target ViewGroup, and the height of the first ViewGroup can be 80% of the height of the target ViewGroup, so that the addition of the first ViewGroup to the target ViewGroup does not affect the beauty of the target page.
ViewID is a label referenced by a control in a layout file in the Android system, and the ViewID can be called to acquire an entity of the corresponding control. When a page is displayed, generating a ViewTree according to a layout file of the page, rendering according to the ViewTree, wherein the ViewTree indicates attributes, father-son relationships and the like of View objects corresponding to ViewIDs, if the IDs of a certain View and a certain ViewGroup are the same, the rendering sequence may be wrong, and the triggering operation of a user on the View is intercepted and responded by the ViewGroup. Thus, in some examples, the first ViewGroup has a globally unique ID. That is, the ID of the first ViewGroup is different with respect to the IDs of other View or ViewGroup present in the layout file of the current page. It can be appreciated that if there are multiple fragments in the current page, different containers can be used to accommodate the fragments in a one-to-one correspondence, and the containers accommodating the different fragments have different IDs, so that the whole layout tree can be prevented from finding the same ID during switching to cause dislocation. In particular, how to set the globally unique ID may be set in a manner known in the related art, which is not limited herein.
Also, to save memory resources, in some examples, after storing the running state data of the first viewsroup, the method includes: and after a preset time threshold, clearing the stored running state data of the first ViewGroup. That is, when the triggering operation of the specified View in the current page of the user degree is detected each time, the running state data of the first View group may be stored in a preset time threshold, if the need of switching to display the target page from the current page is detected in this period, the running state of the specified View may be recovered by using the stored data, and after the preset time threshold, the user may consider that the user does not have a need to keep the running state of the specified View, and then the stored data is cleared, so as to avoid occupation of the memory. The preset time threshold may be set according to the type of the specified View, for example, if the content displayed by the specified View is a selection box, the preset time threshold may be set to a smaller value, such as 10s; if the content shown in the View is a multimedia player, the preset time threshold may be set to a larger value, such as 5min. Of course, it may be set according to the requirements of other scenes, which is not limited in this specification.
For convenience in describing the page display method of the present specification in more detail, a specific embodiment will be described as follows:
as shown in fig. 2, fig. 2 is a schematic diagram of a current page switch display target page according to an exemplary embodiment of the present disclosure, where the current page (the page shown in the left diagram in fig. 2) is a page of an Android application, and the page is a page constructed based on fragments, and the fragments manage two specified views, namely View1 (reference numeral 21 in the figure) and View2 (reference numeral 22 in the figure), where the content shown in View1 is a video player, and the content shown in View2 is an input box for providing a user to input a comment "barrage".
In the related art, when View1 and View2 are moved from one parent container to another parent container, for example, when a landscape screen is switched, the destruction reconstruction of fragments is triggered, so that resources such as related objects depending on the life cycle of the fragments are re-registered during the switching, and thus the original running states of View1 and View2 are easily lost, the video player displayed by View1 returns to the initial state, and text content input by a user in an input box displayed by View2 is lost.
In this embodiment, view1 and View2 are wrapped with ViewGroup1 (23 in the figure), viewGroup1 being shown in ViewGroup2 (24 in the figure) of the current page. When the triggering operation of the user for the View1 and/or the View2 is detected, the operation state data of the View group1 is stored, wherein the operation state data of the View group1 comprises the operation state data of the View1 and the View 2. When the horizontal screen and the vertical screen are switched, the ViewGroup1 is set as a sub View of ViewGroup3 (reference numeral 25 in the figure) in a target page (the page shown in the right diagram in FIG. 2), so that when the target page is displayed, the stored running state data of the ViewGroup1 is utilized to render the running state data of the ViewGroup1, and finally, in the displayed target page, the video player displayed by the View1 still keeps the original running state, and the text content input by a user is still kept in the input frame displayed by the View 2.
In addition, viewGroup1 binds an xml-defined container layout that indicates that ViewGroup1 has an adaptive location and size. Thus, when ViewGroup1 moves from ViewGroup2 to ViewGroup3, the position and size of ViewGroup1 changes according to the position and size of ViewGroup 3. It should be noted that other views are also included in the current page and the target page, which are not shown in fig. 2.
The switching process of this embodiment may be referred to as a schematic diagram of fig. 3. As can be seen from the figure, the whole process is to indirectly realize the movement of the Fragment-managed View by using a fixed ID ViewGroup, and the movement of the Fragment-managed View does not need to depend on the operation of the Fragment interface, and does not cause the life cycle callback of the Fragment. Therefore, the movement of fragments can be completed better, and the use experience of a user is improved.
Corresponding to the embodiments of the foregoing method, the present specification also provides embodiments of the page display device and the terminal to which the page display device is applied.
Embodiments of the page display apparatus of the present specification may be applied to a computer device, such as a server or a terminal device. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory through a processor of the file processing where the device is located. In terms of hardware, as shown in fig. 4, a hardware structure diagram of a computer device where the page display device in the embodiment of the present disclosure is located is shown in fig. 4, and in addition to the processor 410, the memory 430, the network interface 420, and the nonvolatile memory 440 shown in fig. 4, a server or an electronic device where the device 431 is located in the embodiment may further include other hardware according to an actual function of the computer device, which will not be described herein.
Accordingly, the present specification embodiment also provides a computer storage medium having a program stored therein, which when executed by a processor, implements the method in any of the above embodiments.
Embodiments of the present description may take the form of a computer program product embodied on one or more storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-usable storage media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by the computing device.
As shown in fig. 5, fig. 5 is a block diagram of a page display device according to an exemplary embodiment of the present specification, the device including:
the storage module 51 is configured to, if a trigger operation of a user on a specified View in a current page is detected, acquire operation state data of the specified View, and store operation state data of a first View group, where the operation state data of the first View group includes the operation state data of the specified View; the method comprises the steps that a current page is a page constructed based on fragments, the fragments manage at least one appointed View, the appointed View is packaged in a first ViewGroup, the first ViewGroup is packaged in a second ViewGroup of the current page, and the first ViewGroup and the second ViewGroup are managed by activities on which the fragments depend;
the switching module 52 is configured to, if it is detected that a target page including the specified View and the target View group needs to be displayed by switching from the current page, add the first View group to the target View group;
and the display module 53 is configured to render the first viewsroup with the stored running state data of the first viewsroup when the target page is displayed.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It is to be understood that the present description is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (9)

1. The page display method is characterized in that a current page is a page constructed based on fragments, the fragments manage at least one appointed View, the appointed View is packaged in a first ViewGroup, the first ViewGroup is packaged in a second ViewGroup of the current page, and the first ViewGroup and the second ViewGroup are managed by activities on which the fragments depend; the method comprises the following steps:
if the triggering operation of a user on the appointed View in the current page is detected, acquiring the running state data of the appointed View, and storing the running state data of a first ViewGroup, wherein the running state data of the first ViewGroup comprises the running state data of the appointed View;
if it is detected that the target page including the specified View and the target View group needs to be displayed in a switching manner from the current page, adding the first View group to the target View group includes: setting the first ViewGroup as a sub View of the target ViewGroup in a layout file of the target page;
and when the target page is displayed, rendering the first ViewGroup by using the stored running state data of the first ViewGroup.
2. The method of claim 1, wherein the specified View shows at least any one of:
input box, selection box, multimedia player.
3. The method of claim 1, wherein the first viewsroup binds a preset container layout indicating that the first viewsroup has an adaptive position and size.
4. The method of claim 1, wherein the first viewsroup has a globally unique ViewID.
5. The method of claim 1, wherein the target page comprises:
and the current page is a page after the horizontal and vertical screen switching.
6. The method of claim 1, wherein after storing the operational status data of the first viewsroup, comprising:
and after a preset time threshold, clearing the stored running state data of the first ViewGroup.
7. A page display device, the device comprising:
the storage module is used for acquiring the operation state data of the appointed View if the triggering operation of the user on the appointed View in the current page is detected, and storing the operation state data of a first ViewGroup, wherein the operation state data of the first ViewGroup comprises the operation state data of the appointed View; the method comprises the steps that a current page is a page constructed based on fragments, the fragments manage at least one appointed View, the appointed View is packaged in a first ViewGroup, the first ViewGroup is packaged in a second ViewGroup of the current page, and the first ViewGroup and the second ViewGroup are managed by activities on which the fragments depend;
the switching module is configured to, if it is detected that a target page including the specified View and the target View group needs to be displayed by switching from the current page, add the first View group to the target View group, where the switching module includes: setting the first ViewGroup as a sub View of the target ViewGroup in a layout file of the target page;
and the display module is used for rendering the first ViewGroup by utilizing the stored running state data of the first ViewGroup when the target page is displayed.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 when the program is executed by the processor.
9. A computer readable storage medium, characterized in that a computer program is stored thereon, which program, when being executed by a processor, implements the method of any of claims 1-6.
CN202110378262.1A 2021-04-08 2021-04-08 Page display method, device, storage medium and equipment Active CN113076161B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110378262.1A CN113076161B (en) 2021-04-08 2021-04-08 Page display method, device, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110378262.1A CN113076161B (en) 2021-04-08 2021-04-08 Page display method, device, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN113076161A CN113076161A (en) 2021-07-06
CN113076161B true CN113076161B (en) 2023-11-14

Family

ID=76615608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110378262.1A Active CN113076161B (en) 2021-04-08 2021-04-08 Page display method, device, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113076161B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445500A (en) * 2016-08-29 2017-02-22 北京元心科技有限公司 Method, system and terminal equipment for providing user interface
CN109791594A (en) * 2016-08-12 2019-05-21 Altr解决方案公司 Data are segmented in order to persistently be stored in multiple immutable data structures
CN110717123A (en) * 2019-09-30 2020-01-21 北京字节跳动网络技术有限公司 Page response method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8285785B2 (en) * 2004-11-19 2012-10-09 Nokia Corporation Method, apparatus and computer program product providing graphical user interface that facilitates management of multiple simultaneous communication sessions

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109791594A (en) * 2016-08-12 2019-05-21 Altr解决方案公司 Data are segmented in order to persistently be stored in multiple immutable data structures
CN106445500A (en) * 2016-08-29 2017-02-22 北京元心科技有限公司 Method, system and terminal equipment for providing user interface
CN110717123A (en) * 2019-09-30 2020-01-21 北京字节跳动网络技术有限公司 Page response method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Activity,Fragment,自定义View状态的保存和恢复;lxn_李小牛;《https://blog.csdn.net/small_lee/article/details/79249298》;20180203;第1-13页 *
Android平台软件开发方法综述;郝强;《软件工程 》;20200805;第13-15页 *
一种无人机地面站移动客户端的设计与实现;李政;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20180415;第C031-190页 *

Also Published As

Publication number Publication date
CN113076161A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
CN110489116B (en) Page rendering method and device and computer storage medium
CN105100869A (en) Bullet curtain displaying method and device
CN111488259B (en) Recording method for webpage and playback method for recorded file
CN108228253A (en) A kind of APP construction methods and system
CN103020025A (en) Techniques for the automatic animation of document content
US20210105314A1 (en) Associating browser with application
CN107977137A (en) Object methods of exhibiting, device and the equipment of five application page
CN105072461A (en) Data processing method and device
CN112363794A (en) Rendering method of front-end list type component and electronic equipment
CN117178557A (en) Method and apparatus for timing and event triggered updating in a scene
CN110532495A (en) A kind of methods of exhibiting and device of webpage information
CN105630792A (en) Information display method and device as well as information push method and device
CN110362547A (en) Coding, parsing, storage method and the device of journal file
CN109582305B (en) Encoding method and device for mobile application page elements and electronic equipment
CN112306486B (en) Interface generation method and device, server and storage medium
CN114254228A (en) Web application processing method and related device for dynamically binding data
CN113076161B (en) Page display method, device, storage medium and equipment
CN103677979A (en) Interactive method and device for application software and plugin
CN111381745B (en) Page switching method, device and equipment
CN115712794A (en) Page management method and device, processor and electronic equipment
CN114842117A (en) Data processing method, electronic device and storage medium
CN110837367B (en) User interface processing method and device and electronic equipment
CN107589978B (en) Method and device for refreshing page in Flash
US11797719B2 (en) Dynamic preview generation in a product lifecycle management environment
CN112711445A (en) Application program management method and system

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
GR01 Patent grant
GR01 Patent grant