Multi-page view synthesis method and device, electronic equipment and storage medium

By introducing fragmentation as an intermediary for view management in Android application development, the limitations of traditional active view management methods during complex view levels and dynamic view adjustments are solved, and more flexible and efficient view management is achieved, improving user experience.

CN120029708APending Publication Date: 2025-05-23HUBEI CENTURY NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510139306.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In traditional Android application development, the active view management method has limitations in handling complex view levels and dynamic view adjustments, resulting in inflexible view management and inefficient management, which affects the user experience.

Method used

By introducing fragments as an intermediary for view management, add transparent fragments to newly created activities and use them to interact with the View Manager to achieve synthesis of multi-level dynamic views.

Benefits of technology

Improves the flexibility and efficiency of view management, and thus improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029708A_ABST
    Figure CN120029708A_ABST
Patent Text Reader

Abstract

The invention provides a multi-page view synthesis method and device, electronic equipment and a storage medium. The method comprises the steps that a view manager monitors an activity; in response to the monitored creation of the new activity, creating a transparent fragment and adding the fragment into the new activity, and recording a one-to-one correspondence relationship between the activity identifier of the new activity and the fragment identifier of the added fragment; when a page view synthesis request is received, searching corresponding fragment identifiers according to activity identifiers in the page view synthesis request, and sending adjustment parameters corresponding to the activity identifiers to fragments corresponding to the searched fragment identifiers; and adjusting the page view of the activity corresponding to the fragment by the fragment according to the received adjustment parameter, and outputting the page view. According to the method, the fragments are introduced to serve as intermediaries of view management, so that the flexibility and efficiency of view management can be improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for synthesizing multiple page views. Background Art

[0002] In Android application development, Activity is the basic unit of user interaction. However, the traditional activity view management method has limitations when dealing with complex view hierarchies and dynamic view adjustments, resulting in inflexible view management and low management efficiency, which in turn affects the user experience. Summary of the invention

[0003] In view of this, the present application provides a multi-page view synthesis method, device, electronic device and storage medium, which can improve the flexibility and efficiency of view management and thus improve the user experience by introducing fragments as the intermediary of view management.

[0004] To solve the above technical problems, the technical solution of this application is implemented as follows: In one embodiment, a method for synthesizing multiple page views is provided, the method comprising: The view manager listens to events; In response to monitoring the creation of a new activity, create a transparent fragment and add it to the new activity, and record a one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment; When receiving a page view synthesis request, find a corresponding fragment identifier according to the activity identifier in the page view synthesis request, and send adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifiers respectively; so that the fragments adjust the page view of the activity corresponding to the fragments according to the received adjustment parameters and output it; The page view synthesis request carries page view synthesis information; the page view synthesis information includes: a plurality of activity identifiers, and an adjustment parameter corresponding to each activity identifier.

[0005] The page view synthesis request is sent when a synthesis button associated with the activity is touched, or when a method or class corresponding to the activity is created.

[0006] Wherein, the method further comprises: The activity identifier carried in the page view synthesis request and the adjustment parameters corresponding to the activity identifier are pre-configured for the activity.

[0007] The method further comprises: when the page view synthesis request is received, before the corresponding fragment identifier is found according to the activity identifier in the page view synthesis request, the method further comprises: The view manager determines whether the page view synthesis information has been stored. If so, the activity identifier for which page view adjustment needs to be performed and the adjustment parameters corresponding to the activity identifier are determined according to the stored page view synthesis information and the page view synthesis information carried in the page view synthesis request; the corresponding fragment identifier is found according to the determined activity identifier, and the adjustment parameters corresponding to the activity identifier are respectively sent to the fragments corresponding to the found fragment identifiers; otherwise, the corresponding fragment identifier is found according to the activity identifier in the page view synthesis request, and the adjustment parameters corresponding to the activity identifier are respectively sent to the fragments corresponding to the found fragment identifiers; and the newly received page view synthesis information is recorded; When the fragment receives the adjustment parameters, it determines whether to store the adjustment parameters. If so, it adjusts the page view in combination with the received adjustment parameters and the stored adjustment parameters, outputs the adjusted page view, and stores the newly received adjustment parameters; otherwise, it adjusts the page view according to the received adjustment parameters, outputs the adjusted page view, and stores the newly received adjustment parameters.

[0008] Wherein, the method further comprises: The active fragment at the top of the stack responds to the touch screen and obtains the touch event; If the active fragment at the top of the stack determines that the touch event occurs in the scaled transparent area, the touch event is reported to the view manager; The view manager recursively queries and distributes to the fragments corresponding to the next layer of activities according to the reported trigger event until a non-transparent area is found or the event processing is completed; If the active fragment at the top of the stack determines that the touch event occurs in a non-transparent area, the touch event is processed.

[0009] Wherein, the method further comprises: When the view manager receives the request to cancel page view synthesis, it searches for page view synthesis information including the activity identifier according to the request to cancel page view synthesis, and searches for a corresponding fragment identifier according to the activity identifier in the searched page view synthesis information; The view manager sends a page view synthesis cancellation instruction to each of the fragments corresponding to the found fragment identifiers, and deletes the stored page view synthesis information; When the fragment receives the instruction to cancel the page view synthesis, it restores the adjusted page view of the corresponding activity and deletes the stored adjustment parameters.

[0010] Wherein, the method further comprises: When the view manager monitors that an activity is destroyed, it searches for the recorded corresponding relationship related to the activity identifier of the activity and deletes it.

[0011] In another embodiment, a multi-page view synthesis device is provided, the device comprising: A view manager is used to monitor activities; in response to monitoring the creation of a new activity, create a transparent fragment and add it to the new activity, and record the one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment; when receiving a page view synthesis request, find the corresponding fragment identifier according to the activity identifier in the page view synthesis request, and send adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifiers respectively; enable the fragments to adjust the page view of the activity corresponding to the fragment according to the received adjustment parameters and output it; wherein the page view synthesis request carries page view synthesis information; the page view synthesis information includes: multiple activity identifiers, and adjustment parameters corresponding to each activity identifier.

[0012] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a multi-page view synthesis method when executing the program.

[0013] In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, a method for synthesizing multiple page views is implemented.

[0014] As can be seen from the above technical solution, in the above embodiment, by adding transparent fragments to the newly created activity and using the fragments as the intermediary of view management to interact with the view manager, the synthesis of multi-level dynamic views is realized. By introducing fragments as the intermediary of view management, this method can improve the flexibility and efficiency of view management, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 This is a schematic diagram of a multi-page view synthesis process in an embodiment of the present application; Figure 2This is another schematic diagram of a multi-page view synthesis process in an embodiment of the present application; FIG3 (a) is a schematic diagram of the first page view synthesis in the first scenario in an embodiment of the present application; FIG3 (b) is a schematic diagram of the second page view synthesis in the first scenario in the embodiment of the present application. FIG; FIG4 (a) is a schematic diagram of the first page view synthesis in the second scenario in an embodiment of the present application; FIG4( b ) is a schematic diagram of the second page view synthesis in the second scenario in an embodiment of the present application; Figure 5 This is a schematic diagram of the event processing flow in the embodiment of the present application; Figure 6 This is a schematic diagram of the process of canceling page view synthesis in an embodiment of the present application; Figure 7 This is a schematic diagram of the structure of a multi-page view synthesis device in an embodiment of the present application; Figure 8 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0018] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe the order or precedence of the objects. It should be understood that the data used in this way can be interchanged where appropriate, so that the implementation of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0019] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0020] In Android application development, Activity is the basic unit of user interaction. However, the traditional activity view management method has limitations when dealing with complex view hierarchies and dynamic view adjustments, resulting in inflexible view management and low management efficiency, which in turn affects the user experience.

[0021] Based on the above problems, a multi-page view synthesis method is provided in an embodiment of the present application, which is applied to a multi-page view synthesis device, and the device includes: a view manager, an activity, and a fragment. The method realizes the synthesis of multi-level dynamic views by adding transparent fragments to the newly created activity and using the fragments as the intermediary of view management. By introducing fragments as the intermediary of view management, the method can improve the flexibility and efficiency of view management, thereby improving the user experience.

[0022] In the embodiment of the present application, it is necessary to configure the page view synthesis information for the activity in advance, and the page view synthesis information includes: the activity identifier and the adjustment parameters corresponding to the activity identifier. That is, if the page view for this activity triggers the page view synthesis, the page view synthesis information configured for the activity can be obtained, and the obtained page view synthesis information can be carried in the sent page view synthesis request.

[0023] The activity identifier indicates which activity's corresponding page view needs to be synthesized, and the adjustment parameters corresponding to each activity identifier indicate how the page view corresponding to the activity needs to be adjusted, the displayed area, etc. The number of activity identifiers indicates how many page views corresponding to the activities need to be synthesized.

[0024] The adjustment parameters include cropping and scaling mode, display area, transition animation, etc.; if cropping is specified in the cropping and scaling mode, it means retaining the specified size and position of the corresponding active page view, and the other parts are not displayed in the composite page view. If scaling is specified, the corresponding page view is reduced or enlarged to the specified size; the display area is used to indicate the position of the page view after parameter adjustment; the transition animation is used to indicate the content displayed on the composite view during the process of adjusting each page view to the display. This implementation is to improve the user experience.

[0025] The following is a detailed description of the multi-page view synthesis process in the embodiment of the present application in conjunction with the accompanying drawings.

[0026] See also Figure 1 , Figure 1 This is a schematic diagram of a multi-page view synthesis process in an embodiment of the present application. The specific steps are: Step 101, the view manager monitors activities.

[0027] Step 102: In response to monitoring the creation of a new activity, the view manager creates a transparent fragment and adds it to the new activity, and records a one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment.

[0028] The page view synthesis request is sent when the synthesis button associated with the activity is touched, or when the method or class corresponding to the activity is created. The activity identifier carried in the page view synthesis request and the adjustment parameters corresponding to the activity identifier are pre-configured for the activity.

[0029] The page view synthesis request received by the view manager may be sent by any of the multiple subjects. For example, a synthesis button may be displayed on the page view of the corresponding activity, and the user may touch the synthesis button to trigger the synthesis request, which may then send the page view synthesis request. Alternatively, it may be the default configuration for the activity, that is, once the activity creates a method or class, it may be sent through a method or class that can communicate with the view manager. The difference between the two types of implementation methods is that the synthesis button method allows the user to decide whether to trigger the request, while the default method will trigger the request automatically.

[0030] The page view synthesis request carries multiple activity identifiers and adjustment parameters corresponding to each activity identifier.

[0031] Step 103, when the view manager receives a page view synthesis request, it searches for the corresponding fragment identifier according to the activity identifier in the page view synthesis request, and sends adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifiers respectively; the fragments adjust the page view of the activity corresponding to the fragments according to the received adjustment parameters, and output it.

[0032] When any fragment receives the adjustment parameters sent by the view manager, it adjusts the page view of the corresponding activity according to the adjustment parameters, and outputs the adjusted page view in the corresponding display area according to the adjustment parameters. If there is a transition animation in the adjustment parameters, the transition animation is played on the page during the adjustment process.

[0033] In the embodiment of the present application, transparent fragments are added to the newly created activity, and the fragments are used as the intermediary of view management. When the activity corresponding to the fragment is to participate in the synthesis of the page view, the fragment receives the adjustment parameters sent by the view manager to adjust the page view and output it to realize the synthesis of multi-level dynamic views. By introducing fragments as the intermediary of view management, the method can improve the flexibility and efficiency of view management, thereby improving the user experience.

[0034] See also Figure 2 , Figure 2 This is another schematic diagram of a multi-page view synthesis process in an embodiment of the present application. The specific steps are: Step 201, the view manager monitors activities.

[0035] Step 202: In response to monitoring the creation of a new activity, the view manager creates a transparent fragment and adds it to the new activity, and records a one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment.

[0036] The page view synthesis request in this step is sent when the synthesis button associated with the activity is touched, or when the method or class corresponding to the activity is created. The activity identifier carried in the page view synthesis request and the adjustment parameters corresponding to the activity identifier are pre-configured for the activity.

[0037] The page view synthesis request received by the view manager may be sent by any of the multiple subjects. For example, a synthesis button may be displayed on the page view of the corresponding activity, and the user may touch the synthesis button to trigger the synthesis request, which may then send the page view synthesis request. Alternatively, it may be the default configuration for the activity, that is, once the activity creates a method or class, it may be sent through a method or class that can communicate with the view manager. The difference between the two types of implementation methods is that the synthesis button method allows the user to decide whether to trigger the request, while the default method will trigger the request automatically.

[0038] The page view synthesis request carries multiple activity identifiers and adjustment parameters corresponding to each activity identifier.

[0039] For the activity corresponding to the page view for which page view synthesis is performed, step 202 must be executed first. However, for activities other than the activity corresponding to the page view for which page view synthesis is performed, transparent fragments are added when the activity is created, which has nothing to do with the page view synthesis request.

[0040] Step 203 , when the view manager receives the page view synthesis request, it determines whether the page view synthesis information has been stored, if so, executes step 204 ; otherwise, executes step 206 .

[0041] Step 204: determine the activity identifier that needs to be adjusted for the page view and the adjustment parameters corresponding to the activity identifier according to the stored page view synthesis information and the page view synthesis information carried in the page view synthesis request; and store the newly received page view synthesis information.

[0042] If the page view synthesis information is stored locally, it is necessary to check whether the activity identifiers in the stored page view synthesis information are all in the newly received page view synthesis information. If so, determine that the activity identifier carried in the newly received page view synthesis request is the activity identifier for the page view adjustment; otherwise, the activity identifier that does not exist in the newly received page view synthesis information is determined as the activity identifier for the page view adjustment together with the activity identifier in the newly received page view synthesis information; and the adjustment parameter corresponding to the activity identifier that does not exist in the newly received page view synthesis information is to not display the page view at all, and to reduce it to 0 under the premise of the original view.

[0043] The first scenario: if the activity identifiers included in the stored page synthesis information include A and B, and the activity identifiers included in the newly received page synthesis information include A, B, and C, then it is determined that the activity identifiers that need to be adjusted for the page view are A, B, and C; and the corresponding adjustment parameters are the adjustment parameters corresponding to the newly received activity identifiers A, B, and C; The second scenario: if the activity identifiers included in the stored page synthesis information include X and Y, and the activity identifiers included in the newly received page synthesis information include Y and Z, then it is determined that the activity identifiers that need to adjust the page view are X, Y, and Z; the adjustment parameters corresponding to Y and Z are the adjustment parameters in the newly received activity identifier, and the adjustment parameter corresponding to X is scaling to not display the page view.

[0044] Step 205 , find the corresponding fragment identifier according to the determined activity identifier, and send the adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifiers. Execute step 208 .

[0045] Step 206: Find the corresponding fragment identifier according to the activity identifier in the page view synthesis request, and store the page view synthesis request in the page view synthesis request.

[0046] The corresponding fragment identifier can be found according to the activity identifier in the page view synthesis request through the one-to-one correspondence between the recorded activity identifier and the fragment identifier.

[0047] Step 207: Send adjustment parameters corresponding to the activity identifiers to the fragments corresponding to the found fragment identifiers respectively.

[0048] Step 208 , when the fragment receives the adjustment parameter, it determines whether to store the adjustment parameter, if yes, execute step 209 ; otherwise, execute step 210 .

[0049] The fragment needs to comprehensively determine the maximum area and position required, compare it with the current view parameters, and based on the comparison results, decide whether the view area needs to be adjusted to leave display space for other page views.

[0050] Step 209: adjust the page view by combining the received adjustment parameters with the stored adjustment parameters, output the adjusted page view, and store the newly received adjustment parameters. This process ends.

[0051] Based on the first scenario above: when the fragment A corresponding to the activity identifier A receives the adjustment parameters, the adjustment of the page view A corresponding to the activity A is to restore the displayed page view to the original view according to the stored adjustment parameters, and then adjust and output it according to the new adjustment parameters; When the fragment B corresponding to the activity identifier B receives the adjustment parameters, the page view B corresponding to the activity B is adjusted by restoring the displayed page view to the original view according to the stored adjustment parameters, and then adjusting and outputting it according to the new adjustment parameters; Fragment C corresponding to activity identifier C is directly adjusted according to the newly received adjustment parameters because there was no adjustment before.

[0052] See FIG. 3( a ), which is a schematic diagram of the first page view synthesis in the first scenario in an embodiment of the present application.

[0053] FIG3 (a) is a schematic diagram of a composite display of page views including page view A corresponding to activity A and page view B corresponding to activity B. The adjustment parameters here are not specifically limited, and this is only a schematic diagram of a display effect.

[0054] See Figure 3 (b), which is a schematic diagram of the second page view synthesis in the first scenario in the embodiment of the present application. Figure 3 (b) is a schematic diagram of the page view synthesis display including page view A corresponding to activity A, page view B corresponding to activity B, and page view C corresponding to activity C. The adjustment parameters here are not specifically limited, and this is just a schematic diagram of the display effect.

[0055] Based on the second scenario above: When the fragment X corresponding to the activity identifier X receives the adjustment parameter, the page view X corresponding to the activity X is adjusted by restoring the displayed page view to the original view according to the stored adjustment parameter, and then adjusting and outputting it according to the new adjustment parameter; When the fragment Y corresponding to the activity identifier Y receives the adjustment parameter, the page view Y corresponding to the activity Y is adjusted by restoring the displayed page view to the original view according to the stored adjustment parameter, and then adjusting and outputting it according to the new adjustment parameter; The fragment Z corresponding to the activity identifier Z is directly adjusted according to the newly received adjustment parameters because there was no adjustment before.

[0056] See FIG. 4 (a), which is a schematic diagram of the first page view synthesis in the second scenario in the embodiment of the present application. FIG. 4 (a) is a schematic diagram of the synthesis display of page views including page view X corresponding to activity X and page view Y corresponding to activity Y. The adjustment parameters here are not specifically limited, and this is just a schematic diagram of the display effect.

[0057] See Figure 4 (b), which is a schematic diagram of the second page view synthesis in the second scenario in the embodiment of the present application. Figure 4 (b) is a schematic diagram of the synthesis display of page views including page view Z corresponding to activity Z and page view Y corresponding to activity Y. The adjustment parameters here are not specifically limited, and this is just a schematic diagram of the display effect.

[0058] Step 210: adjust the page view according to the received adjustment parameters, output the adjusted page view, and store the newly received adjustment parameters.

[0059] The page view of the corresponding activity is adjusted according to the adjustment parameters, and the adjusted page view is output in the corresponding display area according to the adjustment parameters. If there is a transition animation in the adjustment parameters, the transition animation is played on the page during the adjustment process.

[0060] The fragment is made to adjust the page view of the activity corresponding to the fragment according to the received adjustment parameters, and output it.

[0061] In the embodiment of the present application, transparent fragments are added to the newly created activity, and the fragments are used as the intermediary of view management. When the activity corresponding to the fragment is to participate in the synthesis of the page view, the fragment receives the adjustment parameters sent by the view manager to adjust the page view and output it to realize the synthesis of multi-level dynamic views; for the page view corresponding to an activity, more than one page view synthesis may be performed, and the synthesis of the page view is completed dynamically through the management of the view manager and the execution of the fragments. By introducing fragments as the intermediary of view management, this method can improve the flexibility and efficiency of view management, thereby improving the user experience.

[0062] In the embodiment of the present application, due to the introduction of fragments, the distribution mechanism will also have different processing. Figure 5 , Figure 5 This is a schematic diagram of the event processing flow in the embodiment of this application. The specific steps are: Step 501: The active fragment at the top of the stack obtains a touch event in response to a touch on the touch screen.

[0063] For a touch screen, a user triggers a touch event directly by touching the view, and the first to feel the touch event is the active fragment at the top of the stack in the currently presented synthetic page view.

[0064] Step 502: If the active fragment at the top of the stack determines that the touch event occurs in the scaled transparent area, the touch event is reported to the view manager.

[0065] The active fragment at the top of the stack determines the touch position. If the determined touch event occurs in the non-transparent area corresponding to the fragment, it is directly processed; if the determined touch event occurs in the transparent area corresponding to the fragment, the trigger event is reported to the view manager.

[0066] Step 503: The view manager recursively searches and distributes to the fragments corresponding to the next layer of activities according to the reported trigger event until a non-transparent area is found or the event processing is completed. This process ends.

[0067] Step 504: If the active fragment at the top of the stack determines that the touch event occurs in a non-transparent area, the touch event is processed.

[0068] After fragments are introduced in the embodiment of the present application, touch operations can also be performed on the page view synthesized by multiple page views, and the processing of touch events can be quickly realized through the interaction between the fragments and the view manager.

[0069] In the embodiment of the present application, the page view can be synthesized or cancelled, which is specifically implemented as follows: See also Figure 6 , Figure 6 This is a schematic diagram of the process of canceling page view synthesis in the embodiment of this application. The specific steps are: Step 601: the view manager receives a request to cancel page view synthesis, searches for page view synthesis information including the activity identifier according to the request to cancel page view synthesis, and searches for a corresponding fragment identifier according to the activity identifier in the searched page view synthesis information.

[0070] A request to cancel page view composition is sent when the cancel button associated with an activity is touched, or when the method or class corresponding to the activity is destroyed.

[0071] Step 602: the view manager sends a page view synthesis cancellation instruction to each fragment corresponding to the found fragment identifier, and deletes the stored page view synthesis information.

[0072] Step 603 , when the fragment receives the instruction to cancel the page view synthesis, it restores the adjusted page view of the corresponding activity and deletes the stored adjustment parameters.

[0073] In the embodiment of the present application, upon receiving any page view synthesis request initiated by any activity, the view manager will cancel all page view synthesis including the activity identifier.

[0074] When an activity is destroyed, in the embodiment of the present application, the fragments added for the activity also need to be destroyed. The specific implementation is: When the view manager monitors that an activity is destroyed, it searches for the recorded corresponding relationship related to the activity identifier of the activity and deletes the corresponding relationship; If there is page view synthesis information including the activity identifier, fragments corresponding to other activity identifiers will be notified to cancel the page view synthesis.

[0075] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0076] Based on the same inventive concept, the present application also provides a multi-page view synthesis device. Figure 7 , Figure 7 This is a schematic diagram of the structure of a multi-page view synthesis device in an embodiment of the present application. The device includes: The view manager 701 is used to monitor activities; in response to monitoring the creation of a new activity, create a transparent fragment and add it to the new activity, and record the one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment; when receiving a page view synthesis request, find the corresponding fragment identifier according to the activity identifier in the page view synthesis request, and send adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifiers respectively; enable the fragments to adjust the page view of the activity corresponding to the fragment according to the received adjustment parameters and output it; wherein the page view synthesis request carries page view synthesis information; the page view synthesis information includes: multiple activity identifiers, and adjustment parameters corresponding to each activity identifier.

[0077] In another embodiment, the page view composition request is sent when a composition button associated with the activity is touched, or when a method or class corresponding to the activity is created.

[0078] In another embodiment, the activity identifier carried in the page view synthesis request and the adjustment parameters corresponding to the activity identifier are pre-configured for the activity.

[0079] In another embodiment, the device further comprises: fragment 702; The view manager 701 is used to further determine whether the page view synthesis information has been stored. If so, determine the activity identifier that needs to be adjusted for the page view and the adjustment parameters corresponding to the activity identifier according to the stored page view synthesis information and the page view synthesis information carried in the page view synthesis request; find the corresponding fragment identifier according to the determined activity identifier, and send the adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifier respectively; otherwise, find the corresponding fragment identifier according to the activity identifier in the page view synthesis request, and send the adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifier respectively; and record the newly received page view synthesis information; Fragment 702 is used to determine whether to store the adjustment parameters when the adjustment parameters are received. If so, adjust the page view in combination with the received adjustment parameters and the stored adjustment parameters, output the adjusted page view, and store the newly received adjustment parameters; otherwise, adjust the page view according to the received adjustment parameters, output the adjusted page view, and store the newly received adjustment parameters.

[0080] In another embodiment, The active fragment 702 at the top of the stack is further used to obtain a touch event in response to a touch on the touch screen; if the active fragment at the top of the stack determines that the touch event occurs in the scaled transparent area, the touch event is reported to the view manager 701; if the touch event is determined to occur in a non-transparent area, the touch event is processed; The view manager 701 is further used to recursively query and distribute to the fragments corresponding to the next layer of activities according to the reported triggering event, until the non-transparent area is found or the event processing is completed; In another embodiment, The view manager 701 is further configured to, upon receiving a request to cancel page view synthesis, find page view synthesis information including the activity identifier according to the activity identifier carried in the request to cancel page view synthesis, and find a corresponding fragment identifier according to the activity identifier in the found page view synthesis information; send a cancel page view synthesis instruction to each fragment corresponding to the found fragment identifier, and delete the stored page view synthesis information; Fragment 702 is further used to restore the adjusted page view of the corresponding activity and delete the stored adjustment parameters when receiving a cancel page view synthesis instruction.

[0081] In another embodiment, The view manager 701 is further used to monitor that when an activity is destroyed, find the corresponding relationship recorded with the activity identifier of the activity and delete it.

[0082] The units in the above-mentioned embodiments may be integrated into one body or deployed separately; they may be combined into one unit or further divided into multiple sub-units.

[0083] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the multi-page view synthesis method when executing the program.

[0084] In another embodiment, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, a method for synthesizing multiple page views is implemented.

[0085] Figure 8 Schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. Figure 8 As shown, the electronic device may include: a processor (Processor) 810, a communication interface (Communications Interface) 820, a memory (Memory) 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the following method: The view manager listens to events; In response to monitoring the creation of a new activity, create a transparent fragment and add it to the new activity, and record a one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment; When receiving a page view synthesis request, find the corresponding fragment ID according to the activity ID in the page view synthesis request, and send adjustment parameters corresponding to the activity ID to the fragments corresponding to the found fragment IDs respectively; make the fragments adjust the page view of the activity corresponding to the fragments according to the received adjustment parameters, and output; The page view synthesis request carries page view synthesis information; the page view synthesis information includes: multiple activity identifiers, and adjustment parameters corresponding to each activity identifier.

[0086] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0087] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0089] The flow chart and block diagram in the accompanying drawings of the present application show the possible architecture, function and operation of the system, method and computer program product according to the various embodiments disclosed in the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in the order of the standards in different figures. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims disclosed in this application may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments and / or claims of this application may be combined and / or combined in a variety of ways, and all of these combinations and / or combinations fall within the scope disclosed in this application.

[0091] Specific embodiments are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas, and is not used to limit the present application. For those skilled in the art, changes can be made in the specific implementation methods and application scopes according to the ideas, spirits and principles of the present invention, and any modifications, equivalent substitutions, improvements, etc. made therein should be included in the scope of protection of this application.

Claims

1. A method for synthesizing multiple page views, characterized in that: The method comprises: The view manager listens to events; In response to monitoring the creation of a new activity, create a transparent fragment and add it to the new activity, and record a one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment; When receiving a page view synthesis request, find a corresponding fragment identifier according to the activity identifier in the page view synthesis request, and send adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifiers respectively; so that the fragments adjust the page view of the activity corresponding to the fragments according to the received adjustment parameters and output it; The page view synthesis request carries page view synthesis information; the page view synthesis information includes: a plurality of activity identifiers, and an adjustment parameter corresponding to each activity identifier.

2. The method according to claim 1, characterized in that The page view synthesis request is sent when a synthesis button associated with the activity is touched, or when a method or class corresponding to the activity is created.

3. The method according to claim 1, characterized in that The method further comprises: The activity identifier carried in the page view synthesis request and the adjustment parameters corresponding to the activity identifier are pre-configured for the activity.

4. The method according to claim 1, characterized in that The method further comprises: when the page view synthesis request is received, before the corresponding fragment identifier is found according to the activity identifier in the page view synthesis request, the method further comprises: The view manager determines whether the page view synthesis information has been stored. If so, the activity identifier for which page view adjustment needs to be performed and the adjustment parameters corresponding to the activity identifier are determined according to the stored page view synthesis information and the page view synthesis information carried in the page view synthesis request; the corresponding fragment identifier is found according to the determined activity identifier, and the adjustment parameters corresponding to the activity identifier are respectively sent to the fragments corresponding to the found fragment identifiers; otherwise, the corresponding fragment identifier is found according to the activity identifier in the page view synthesis request, and the adjustment parameters corresponding to the activity identifier are respectively sent to the fragments corresponding to the found fragment identifiers; and the newly received page view synthesis information is recorded; When the fragment receives the adjustment parameters, it determines whether to store the adjustment parameters. If so, it adjusts the page view in combination with the received adjustment parameters and the stored adjustment parameters, outputs the adjusted page view, and stores the newly received adjustment parameters; otherwise, it adjusts the page view according to the received adjustment parameters, outputs the adjusted page view, and stores the newly received adjustment parameters.

5. The method according to claim 1, characterized in that The method further comprises: The active fragment at the top of the stack responds to the touch screen and obtains the touch event; If the active fragment at the top of the stack determines that the touch event occurs in the scaled transparent area, the touch event is reported to the view manager; The view manager recursively queries and distributes to the fragments corresponding to the next layer of activities according to the reported trigger event until a non-transparent area is found or the event processing is completed; If the active fragment at the top of the stack determines that the touch event occurs in a non-transparent area, the touch event is processed.

6. The method according to claim 1, characterized in that The method further comprises: When the view manager receives the request to cancel page view synthesis, it searches for page view synthesis information including the activity identifier according to the request to cancel page view synthesis, and searches for a corresponding fragment identifier according to the activity identifier in the searched page view synthesis information; The view manager sends a page view synthesis cancellation instruction to each of the fragments corresponding to the found fragment identifiers, and deletes the stored page view synthesis information; When the fragment receives the instruction to cancel the page view synthesis, it restores the adjusted page view of the corresponding activity and deletes the stored adjustment parameters.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the view manager monitors that an activity is destroyed, it searches for the recorded corresponding relationship related to the activity identifier of the activity and deletes it.

8. A multi-page view synthesis device, characterized in that: The device comprises: A view manager is used to monitor activities; in response to monitoring the creation of a new activity, create a transparent fragment and add it to the new activity, and record the one-to-one correspondence between the activity identifier of the new activity and the fragment identifier of the added fragment; when receiving a page view synthesis request, find the corresponding fragment identifier according to the activity identifier in the page view synthesis request, and send adjustment parameters corresponding to the activity identifier to the fragments corresponding to the found fragment identifiers respectively; enable the fragments to adjust the page view of the activity corresponding to the fragment according to the received adjustment parameters and output it; wherein the page view synthesis request carries page view synthesis information; the page view synthesis information includes: multiple activity identifiers, and adjustment parameters corresponding to each activity identifier.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.