Page display control method, system, equipment, medium and product
By establishing a binding relationship between the page management module and the component management module, the page components in the page area are managed granularly, and the problem of reducing management efficiency caused by the increase in page complexity is solved, and more efficient page component management is achieved.
Patent Information
- Application Number
- CN202411945518.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-25
AI Technical Summary
As the page complexity increases, the management efficiency of page components gradually decreases, and the existing technology is difficult to effectively solve this problem.
By establishing a binding relationship between the page management module and the component management module, the page components in the page area are respectively managed, and the fine-grained management of page components is realized.
It improves the management efficiency of page components, reduces the working pressure of page management module, and realizes more fine-grained component management.
Smart Images

Figure CN119883470A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software development, and in particular to a page display control method, system, device, medium and product. Background Art
[0002] For pages developed based on the Android system, the normal display of the page is achieved by managing the page components in the page. Among them, the page can include multiple page components, such as pictures, texts, search boxes, links, etc.
[0003] And as the complexity of the page increases, the number and types of page components in the page will continue to increase, but this obviously affects the management efficiency of page components. Therefore, how to improve the management efficiency of page components has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, embodiments of the present invention provide a page display control method, system, device, medium and product to improve the management efficiency of page components.
[0005] In a first aspect, an embodiment of the present invention provides a page display control method, wherein page components in different page areas of the same page are respectively managed by different component management modules, and the method is applied to any component management module that manages page components in any page area, and the method includes:
[0006] In response to the creation of the view of the page, read the layout file of the page from the page management module;
[0007] According to the layout file, load the placeholder view component corresponding to any page area;
[0008] In any of the page areas, loading a page component managed by any of the component management modules;
[0009] According to the binding relationship between the component management module and the page data stored in the page management module, the first page data having a binding relationship with any of the component management modules is read from the page management module, and the first page data is used to be displayed in the page component in any of the page areas.
[0010] In a second aspect, an embodiment of the present invention provides a page display control system, including: a page management module and a plurality of component management modules, wherein the plurality of component management modules respectively manage page components in different page areas of the same page, wherein page data in the page is displayed using the page components in the page;
[0011] The page management module is used to store the layout files of the page, the page data, and the binding relationship between the component management module and the page data;
[0012] Any component management module among the plurality of component management modules is used to read the layout file from the page management module in response to the creation of a view of the page;
[0013] According to the layout file, a placeholder view component corresponding to any page area is loaded, and the page components in any page area are managed by any component management module;
[0014] In any of the page areas, loading a page component managed by any of the component management modules;
[0015] Reading first page data having a binding relationship with any component management module from the page management module;
[0016] The page component in any page area is used to display the first page data.
[0017] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the page display control method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication systems.
[0018] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the page display control method described in the first aspect.
[0019] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor can implement the page display control method as described in the first aspect above.
[0020] In various embodiments of the present invention, the page to be displayed may include multiple elements such as page layout, page components, and page data, and the multiple elements may be combined to realize the normal display of the page. Among them, the page components may be managed by a component management module, the page layout and page data may be managed by a page management module, and different component management modules may respectively manage page components in different page areas.
[0021] The page display control method provided by each embodiment of the present invention includes: in response to the creation of the page view, the component management module can read the layout file of the page from the page management module, and load the placeholder view components corresponding to different page areas according to the layout file. After that, the page components in the page area are further loaded in different page areas. Finally, the component management module can also obtain the page data corresponding to different page components from the page management module, so that the page data is displayed in the page component, and the page display is completed at this time.
[0022] In the above method, the display of the page is realized by the collaboration of the page management module and multiple component management modules. The introduction of the component management module can share the work of the page management module, thereby reducing the work pressure of the page management module. Furthermore, there are multiple component management modules, and any component management module is responsible for managing the page components in any page area, which can make the management of page components more fine-grained, thereby improving the management efficiency of page components. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A schematic diagram of the structure of a page display control system provided by an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of a page display control process provided by an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of the structure of another data processing system provided by an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of another page display control process provided by an embodiment of the present invention;
[0028] Figure 5 A schematic diagram of another page display control process provided by an embodiment of the present invention;
[0029] Figure 6 A flow chart of a page display control method provided by an embodiment of the present invention;
[0030] Figure 7 A flowchart of another page display control method provided by an embodiment of the present invention;
[0031] Figure 8 A schematic diagram of the structure of a page display control device provided by an embodiment of the present invention;
[0032] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.
[0035] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0036] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to identifying", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is identified" may be interpreted as "when determining" or "in response to determining" or "when identifying (stated condition or event)" or "in response to identifying (stated condition or event)", depending on the context.
[0037] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0038] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.
[0039] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0040] Figure 1 The embodiment of the present invention provides a page display control system. Figure 1 As shown, the system may specifically include: a page management module and multiple component management modules.
[0041] For a page to be displayed, the page may include multiple elements including page layout, page components, and page data, and the combination of multiple elements can realize the normal display of the page. The page management module may store layout files, page data, and the binding relationship between the component management module and the page data, so as to manage the page layout and page data. At the same time, the page can be divided into multiple page areas, and different component management modules can respectively manage page components in different page areas.
[0042] As described in the background technology, a page may include different types of page components such as pictures and texts. Optionally, different types of page components in any page area may be further managed by different component management modules. For example, image type and text type page components in the same page area may be managed by their own component management modules, respectively.
[0043] Optionally, the page to be displayed can be a mobile application interface, i.e., a page provided by the application, or a web page. Assuming that the page to be displayed is the homepage of the application, the top search bar in the homepage can constitute a page area, the bottom tab bar can also constitute a page area, the content display area in the middle of the page can constitute a page area, and the entry modules of multiple functions in the middle of the page can constitute a page area.
[0044] Optionally, the page to be displayed can be a page built based on Fragment, then the page management module can specifically include Fragment, and the page component can specifically be expressed as at least one view class, namely, view, which can be carried in ViewGroup. Therefore, the page management module is a module that manages from the page level, and the component management module is a module that manages from the page component level, namely, the view level. The component management module can specifically be expressed as a widget. Continuing with the above example, the text type page component can be managed by the component management module titlewidget, and the picture type page component can be managed by the component management module imagewidget.
[0045] Optionally, the binding relationship between the component management module and the page data is also a mapping relationship, which can be stored in a dictionary data structure in the form of a key-value pair, where the identification information of the component management module is the key and the page data is the value. Optionally, the key in the dictionary data structure can specifically represent a string, so the dictionary data structure can be represented as a map.<string,data> , where data is the page data.
[0046] Since each of the multiple component management modules manages the page components in the same manner, any component management module may be taken as an example to illustrate the control process of page display.
[0047] First, any component management module can respond to the view creation of the page, read the layout file of the page from the page management module, and load the placeholder view component corresponding to the area in any page area according to the layout information in the layout file.
[0048] Among them, view creation is a stage included in the life cycle of the page management module, that is, the onViewCreated() stage, which can also be considered as a stage in the life cycle of the page. And the view creation stage is more specifically the root view creation stage. And when the user triggers the page switching operation, the page management module can be in the above-mentioned view creation stage.
[0049] Optionally, the layout file may record the positions of different page areas in the page. Optionally, the layout file may be an XML file written based on the eXtensible Markup Language (XML). Optionally, the layout file may specifically include multiple sub-files corresponding to the page areas one by one, and any component management module may read the sub-file corresponding to any page area from the page management module, so as to use the sub-file to load the placeholder view component corresponding to the any page area.
[0050] Then, any component management module can further load page components in the page area occupied by the placeholder view component. It is easy to understand that the loaded page components are managed by any component management module. Optionally, for the page component represented as a view, the placeholder view component can be represented as a viewstub. And the process of loading the placeholder view component and the page component by any component management module can be combined with Figure 2 Finally, any component management module can read the first page data bound to any component management module from the page management module according to the binding relationship between the component management module and the page data, and the first page data can be displayed using the loaded page component, and the display of any page area is completed at this time.
[0051] Optionally, the component management module can also be pre-registered with the page management component, so that any component management module can directly obtain the first page data corresponding to the page component managed by itself from the page management module. The registration process of the component management module makes the component management module also managed by the page management module.
[0052] Optionally, the page component can be obtained using the onViewInflated() method, and the page data can be obtained using the onBindData() method.
[0053] According to the above description, the display control process of the component management module for the page area may include: first reading the layout file, and sequentially loading the placeholder view component, page component and page data of the page area according to the layout information in the layout file. When multiple component management components each perform the display control of the page area in the above manner, the display of the entire page is completed.
[0054] In this embodiment, in response to the creation of the page view, the component management module can read the layout file of the page from the page management module, and load the placeholder view components corresponding to different page areas according to the layout file. After that, the page components in the page area are further loaded in different page areas. Finally, the component management module can also obtain the page data corresponding to different page components from the page management module, so that the page data is displayed in the page component, and the page display is completed at this time.
[0055] In the above method, the display of the page is realized by the collaboration of the page management module and multiple component management modules. The introduction of the component management module can share the work of the page management module, thereby reducing the work pressure of the page management module. Furthermore, there are multiple component management modules, and any component management module is responsible for managing the page components in any page area, which can make the management of page components more fine-grained, thereby improving the management efficiency of page components.
[0056] Furthermore, when different types of page components in any page area can be managed by different component management modules, the solutions provided by the embodiments of the present invention can achieve finer-grained component management, thereby improving the management efficiency of page components.
[0057] Figure 3 A schematic diagram of another page display control system provided by an embodiment of the present invention. Figure 3 As shown, in Figure 1 Based on the system shown, the system may further include a central management component.
[0058] The central management component can perform some system creation and configuration work before the coordination between the component management module and the page management module. Specifically, the central management component can create multiple component management modules, and can also establish a binding relationship between the component management module and the page data, and can also establish a binding relationship between multiple component management modules and the page management module.
[0059] For the purpose of distinction, the binding relationship between the component management module and the page data may be referred to as a first binding relationship, and the binding relationship between the component management module and the page management module may be referred to as a second binding relationship.
[0060] The first binding relationship can be stored in the page management module. The component management module can read the page data by using the first binding relationship. The component management module can monitor the life cycle of the page management module by using the second binding relationship, that is, monitor the life cycle of the page.
[0061] The use of the second binding relationship is still described below using any component management module as an example:
[0062] When the user triggers the corresponding operation to change the life cycle of the page management module, since there is a second binding relationship between any component management module and the page management module, the life cycle of the page management module will be transparently transmitted to any component management module through the second binding relationship. Then, any component management module can read the layout file from the page management module when it monitors that the page management module is in the view creation stage.
[0063] In this embodiment, before the page management module and the component management module collaboratively control page display, the central management module may perform a series of preprocessing processes, such as the creation of component management modules and binding relationships, to ensure normal execution of subsequent page control.
[0064] Based on the above embodiments, the process of the page management module and any component management module collaboratively controlling the display of any page area in the page may be described in detail below.
[0065] Since the page management component stores the binding relationship between the component management module and the page data, this binding relationship can specifically be a mapping relationship between the identification information of the component management module and the page data, therefore, after obtaining the layout file from the page management module, any component management module can further compare its own identification information in the binding relationship. Optionally, the comparison process can be implemented by the getDataKey() method.
[0066] In one case, if the identification information of any component management module is included in the binding relationship, indicating that any component management module has been registered in the page management component, then any component management module can load the page component managed by any component management module in any page area.
[0067] Furthermore, any component management module can also determine whether the first page data bound to any component management module is stored in the page management module. If the first page data is stored in the page management module, any component management module can read the first page data from the page management module and use the previously loaded page component to display the first page data. At this point, any page area in the page is displayed. If the first page data is not stored in the page management module, any component management module can suspend the page component managed by itself. From the perspective of page display, the suspended page component will not be displayed in the page.
[0068] In another case, if the identification information of any component management module is not included in the binding relationship, it indicates that the second page data corresponding to the page component managed by any component management module is not stored in the page management module, and the second page data can be stored in a higher-level management module, such as activity. Then, any component management module can load and display the page component managed by itself in any page area, and the second page data can be displayed by the page component.
[0069] Based on the contents of the above embodiments, the control flow of page display can also be described as follows:
[0070] The component management module can first use the read layout file to load the placeholder view component corresponding to the page area into the corresponding page area. Afterwards, the component management module can use the first binding relationship between itself and the page data to determine whether to load the page component and whether there is page data corresponding to the page component. When the page data exists, the component management module can realize the normal display of the page by loading the page component and the page data in sequence. When the page data does not exist, the component management module can suspend the loaded page component. And using the scheme provided by the embodiments of the present invention, for the page data that is not stored in the page management component, the component management component can display it with the help of the page component.
[0071] The working process of the system provided by the above embodiments of the present invention can also be combined with Figure 4 understand.
[0072] Optionally, as the page version is continuously updated, page components may be added or deleted, and the page data corresponding to the existing page components may also be updated. For the newly added page components, they can be pre-registered in the corresponding component management module. The newly added page components also need to establish a second binding relationship with the page management module. For the deleted page components, the corresponding page data can be deleted from the page management module, and the page component can be suspended, that is, the page component will not be displayed on the page. For the update of page data, it can be done directly in the page management module, and after the page component is loaded, the updated page data will be displayed in the page component.
[0073] Optionally, the addition of page components can be implemented using the onViewInflated() method, and the updating of page data can be implemented using the onBindData() method.
[0074] The above update process can also be combined with Figure 5 understand.
[0075] Above Figure 1 to Figure 5The illustrated embodiment has described the instance scheduling process from the perspective of the system. On this basis, the control process of the above page display can also be described from the perspective of the method.
[0076] Figure 6 Flow chart of a page display control method provided by an embodiment of the present invention. The method provided by an embodiment of the present invention can be implemented by any component management module. Figure 6 As shown, the method may include the following steps:
[0077] S101, in response to the creation of a view of a page, reading a layout file of the page from a page management module.
[0078] S102: Load the placeholder view component corresponding to any page area according to the layout file.
[0079] S103, in any page area, loading a page component managed by any component management module.
[0080] S104, according to the binding relationship between the component management module and the page data stored in the page management module, read the first page data having a binding relationship with any component management module from the page management module, the first page data is used to be displayed in the page component in any page area.
[0081] based on Figure 1 It can be seen from the description in the illustrated example that, first, any component management module can respond to the creation of a view of a page to read the layout file of the page from the page management module.
[0082] Then, any component management module can load the placeholder view component corresponding to any page area according to the layout file read from the page management module. Among them, the page components in any page area can be managed by any component management module. Optionally, for the page component expressed as a view, the placeholder view component can be expressed as a viewstub. Optionally, the layout file stored in the page management module can specifically include multiple sub-files corresponding to the page areas one by one, then any component management module can read the corresponding sub-files from the page management module, thereby loading the placeholder view component corresponding to any page area.
[0083] Afterwards, any component management module may further load a page component in the page area occupied by the placeholder view component. It is easy to understand that the loaded page component is managed by any component management module. The process of any component management module loading the placeholder view component and the page component may be combined with Figure 2 understand.
[0084] Finally, any component management module can read the first page data having a binding relationship with any component management module from the page management module, and the first page data can be displayed using the loaded page component, and the display of any page area is completed at this time.
[0085] That is, the display control process of any component management module for a page area may include: first reading the layout file, then sequentially loading the placeholder view component, page component, and page data of the page area. And when multiple component management components each perform display control of the page area in the above manner, the display of the entire page is completed.
[0086] In addition, the contents not described in detail in this embodiment can be found in Figure 1 The relevant description in the illustrated embodiment will not be repeated here.
[0087] In this embodiment, in response to the creation of the page view, the component management module can read the layout file of the page from the page management module, and load the placeholder view components corresponding to different page areas according to the layout file. After that, the page components in the page area are further loaded in different page areas. Finally, the component management module can also obtain the page data corresponding to different page components from the page management module, and control the page components to display the corresponding page data, at which time the page display is completed.
[0088] In the above method, the display of the page is realized by the collaboration of the page management module and multiple component management modules. The introduction of the component management module can share the work of the page management module, thereby reducing the work pressure of the page management module. Furthermore, there are multiple component management modules, and any component management module is responsible for managing the page components in any page area, which can make the management of page components more fine-grained, thereby improving the management efficiency of page components.
[0089] Figure 7 Flow chart of another page display control method provided by an embodiment of the present invention. Figure 7 As shown, the method may include the following steps:
[0090] S201, in response to the creation of a view of a page, reading a layout file of the page from a page management module.
[0091] S202: Load the placeholder view component corresponding to any page area according to the layout file.
[0092] The specific execution process of step S201 to step S202 can be found in Figure 6 The relevant description in the illustrated embodiment will not be repeated here.
[0093] S203, through comparison, to determine whether the identification information of any component management module is included in the first binding relationship, then execute steps S204 to S205, otherwise, execute step S206.
[0094] S204, in any page area, loading a page component managed by any component management module, and first page data corresponding to the page component is stored in the page management module.
[0095] S205, reading first page data from the page management module, where the first page data is used to be displayed in a page component in any page area.
[0096] S206, in any page area, loading a page component managed by any component management module, the second page data corresponding to the page component is not stored in the page management module, and the second page data is used to be displayed in the page component in any page area.
[0097] In this embodiment, there can be two kinds of page components in the page. One is a page component managed by the component management module, which is of course also managed by the page management module. For this kind of page component, the page data can be directly obtained from the page management module according to the first binding relationship. The other is not managed by the page management module, but managed by the upper-level module of the page management module, such as activity. For this kind of page component, the second page data corresponding to the page component can be obtained from the activity.
[0098] Finally, different page components in the page can display the corresponding page data, thus ensuring the normal display of the page.
[0099] Optionally, when the identification information of any component management module is included in the first binding relationship, the acquisition of the first page data can be specifically divided into the following cases:
[0100] If the first page data is stored in the page management module, any component management module can read the first page data from the page management module and use the previously loaded page component to display the first page data. At this point, any page area in the page is displayed. If the first page data is not stored in the page management module, any component management module can suspend the page component managed by itself. From the perspective of page display, the suspended page component will not be displayed in the page.
[0101] In addition, this embodiment and the technical effects that can be achieved can be referred to above Figure 2-3 The relevant description in the illustrated embodiment will not be repeated here.
[0102] Optionally, page components can be added or deleted, and the page data corresponding to the existing page components can also be updated. For the newly added page components, they can be pre-registered in the corresponding component management module. The newly added page components also need to establish a second binding relationship with the page management module. For deleted page components, their corresponding page data can be deleted from the page management module, and the page component can be suspended, that is, the page component will not be displayed on the page. For the update of page data, it can be done directly in the page management module, and after the page component is loaded, the updated page data will be displayed in the page component.
[0103] Optionally, the addition of page components can be implemented using the onViewInflated() method, and the updating of page data can be implemented using the onBindData() method.
[0104] The above update process can also be combined with Figure 5 understand.
[0105] The following will describe in detail the page display control device of one or more embodiments of the present invention. Those skilled in the art will appreciate that the device can be configured using commercially available hardware components through the steps taught in this solution.
[0106] Figure 8 Schematic diagram of the structure of a page display control device provided by an embodiment of the present invention. Figure 8 As shown, the device may include:
[0107] The reading module 11 is used to read the layout file of the page from the page management module in response to the creation of the view of the page.
[0108] The first loading module 12 is used to load the placeholder view component corresponding to any page area according to the layout file.
[0109] The second loading module 13 is used to load, in any of the page areas, a page component managed by any of the component management modules.
[0110] The reading module 11 is also used to read the first page data having a binding relationship with any component management module from the page management module according to the binding relationship between the component management module and the page data stored in the page management module, and the first page data is used to be displayed in the page component within any page area.
[0111] The page is constructed based on Fragment, the page management module includes Fragment, and the page component includes at least one View class carried in ViewGroup.
[0112] Optionally, the second loading module 13 is used to compare the identification information of any component management module with the binding relationship;
[0113] If the identification information of any component management module is included in the binding relationship, a page component managed by any component management module is loaded in any page area, and the first page data corresponding to the page component is stored in the page management module.
[0114] Optionally, the second loading module 13 is used to load the page component managed by any component management module in any page area if the identification information of any page management module is not included in the binding relationship, and the second page data corresponding to the page component is not stored in the page management module.
[0115] Optionally, the device further includes: a suspending module 14.
[0116] The reading module 11 is used to determine whether the first page data bound to any component management module is stored in the page management module according to the binding relationship;
[0117] If the first page data is stored in the page management module, the first page data is read.
[0118] The suspending module 14 is used to suspend the page component managed by any component management module if the first page data is not stored in the page management module.
[0119] Figure 8 The device shown can perform Figure 6-7 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figure 6-7 The implementation process and technical effects of this technical solution refer to Figure 6-7 The description in the illustrated embodiment will not be repeated here.
[0120] In addition, in a possible design, the page display control method provided in the above embodiments can be applied in an electronic device. Fig. 9 As shown, the electronic device may include: a processor 21 and a memory 22. The memory 22 is used to store the electronic device to perform the above Figure 6-7 The program of the page display control method provided in the illustrated embodiment, the processor 21 is configured to execute the program stored in the memory 22 .
[0121] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 21, the following steps can be implemented:
[0122] In response to the creation of the view of the page, read the layout file of the page from the page management module;
[0123] According to the layout file, load the placeholder view component corresponding to any page area;
[0124] In any of the page areas, loading a page component managed by any of the component management modules;
[0125] According to the binding relationship between the component management module and the page data stored in the page management module, the first page data having a binding relationship with any of the component management modules is read from the page management module, and the first page data is used to be displayed in the page component in any of the page areas.
[0126] Optionally, the processor 21 is further configured to execute the aforementioned Figure 6-7 All or part of the steps in the illustrated embodiments.
[0127] The structure of the electronic device may further include a communication interface 23 for the electronic device to communicate with other devices or communication systems.
[0128] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figure 6-7 The pages shown display the procedures involved in the control method.
[0129] In addition, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or an instruction. When the computer program or the instruction is executed by a processor, the processor is enabled to implement the above Figure 6-7 The pages shown display the steps or functions of the control method.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A page display control method, characterized in that: The page components in different page areas of the same page are respectively managed by different component management modules. The method is applied to any component management module that manages the page components in any page area. The method includes: In response to the creation of the view of the page, read the layout file of the page from the page management module; According to the layout file, load the placeholder view component corresponding to any page area; In any of the page areas, loading a page component managed by any of the component management modules; According to the binding relationship between the component management module and the page data stored in the page management module, the first page data having a binding relationship with any of the component management modules is read from the page management module, and the first page data is used to be displayed in the page component in any of the page areas.
2. The method according to claim 1, characterized in that: The loading of the page component managed by any component management module in any page area includes: Comparing the identification information of any component management module with the binding relationship; If the identification information of any component management module is included in the binding relationship, a page component managed by any component management module is loaded in any page area, and the first page data corresponding to the page component is stored in the page management module.
3. The method according to claim 2, characterized in that The method further comprises: If the identification information of any page management module is not included in the binding relationship, a page component managed by any component management module is loaded in any page area, and the second page data corresponding to the page component is not stored in the page management module.
4. The method according to claim 2, characterized in that: The step of reading, from the page management module, first page data having a binding relationship with any of the component management modules according to the binding relationship between the component management modules and the page data stored in the page management module comprises: According to the binding relationship, determining whether the page management module stores first page data bound to any of the component management modules; If the first page data is stored in the page management module, the first page data is read; the method further includes: If the page management module does not store the first page data, the page component managed by any component management module is suspended.
5. The method according to any one of claims 1 to 4, characterized in that The page is constructed based on Fragment, the page management module includes Fragment, and the page component includes at least one View class carried in ViewGroup.
6. A page display control system, characterized in that: It includes: a page management module and a plurality of component management modules, wherein the plurality of component management modules respectively manage page components in different page areas of the same page, wherein page data in the page is displayed using the page components in the page; The page management module is used to store the layout files of the page, the page data, and the binding relationship between the component management module and the page data; Any component management module among the plurality of component management modules is used to read the layout file from the page management module in response to the creation of a view of the page; According to the layout file, a placeholder view component corresponding to any page area is loaded, and the page components in any page area are managed by any component management module; In any of the page areas, loading a page component managed by any of the component management modules; Reading first page data having a binding relationship with any component management module from the page management module; The page component in any page area is used to display the first page data.
7. The system according to claim 6, characterized in that The system further comprises: a central management component, configured to create the plurality of component management modules; Binding the multiple component management modules and the page management module; Any one of the component management modules is used to monitor the life cycle of the page management module by utilizing the binding relationship between the component management module and the page management module; If it is monitored that the life cycle of the page management module is in the view creation stage, the layout file is read.
8. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the page display control method as described in any one of claims 1 to 5.
9. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes the page display control method according to any one of claims 1 to 5.
10. A computer program product, characterized in that The computer program product includes a computer program or instructions, so that the computer program or instructions can implement the steps in the page display control method according to any one of claims 1 to 5.