CN109426532B - Method and device for linking pages in android system and electronic equipment - Google Patents

Method and device for linking pages in android system and electronic equipment Download PDF

Info

Publication number
CN109426532B
CN109426532B CN201710724627.5A CN201710724627A CN109426532B CN 109426532 B CN109426532 B CN 109426532B CN 201710724627 A CN201710724627 A CN 201710724627A CN 109426532 B CN109426532 B CN 109426532B
Authority
CN
China
Prior art keywords
user interface
page
new page
interface elements
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710724627.5A
Other languages
Chinese (zh)
Other versions
CN109426532A (en
Inventor
王虎
汪大伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710724627.5A priority Critical patent/CN109426532B/en
Publication of CN109426532A publication Critical patent/CN109426532A/en
Application granted granted Critical
Publication of CN109426532B publication Critical patent/CN109426532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Abstract

The disclosure relates to a method and a device for joining pages in an android system. The method for joining the pages in the android system comprises the following steps: in the starting process of a new page, generating an initial state description set according to state information of user interface elements in an old page, wherein the state information is used for indicating the existence forms of the user interface elements in the page; generating a termination state description set according to the state information of the user interface elements in the new page; constructing a connection initial state corresponding to the new page according to the initial state description set and the termination state description set, and creating a connection animation set according to the transition from the connection initial state to the connection termination state; and performing joint animation display for the new page from a joint initial state to a joint termination state according to the joint animation set. By adopting the method and the device, the smoothness of page connection can be effectively improved, and the phenomena of blockage and even black screen in the electronic equipment are avoided.

Description

Method and device for linking pages in android system and electronic equipment
Technical Field
The disclosure relates to the technical field of computer application, and in particular relates to a method and a device for linking pages in an android system, and electronic equipment.
Background
With the rapid development of computer application technology, users can install more and more application programs in an operating system (such as an android system) deployed in an electronic device to realize various functions.
A User Interface (UI) is a window through which an application program interacts with a User, and is displayed in a touch screen configured in the electronic device in a page form. And the user controls the application program to complete corresponding functions through triggering operation in different pages.
For an application, the more powerful the application performs, the more services it involves. When the application program switches the service, the new page is started, so that the service switching is completed by skipping from the old page to the new page, and the corresponding function is further realized.
However, during the starting process of the new page, the phenomenon of jamming and even black screen in the electronic equipment is often caused by the direct jumping of the new page and the old page.
Disclosure of Invention
In order to solve the technical problem, an object of the present disclosure is to provide a method and an apparatus for joining pages in an android system, and an electronic device.
Wherein, the technical scheme who this disclosure adopted does:
a method for joining pages in an android system comprises the following steps: in the starting process of a new page, generating an initial state description set according to state information of user interface elements in an old page, wherein the state information is used for indicating the existence forms of the user interface elements in the page; generating a termination state description set according to the state information of the user interface elements in the new page; constructing a connection initial state corresponding to the new page according to the initial state description set and the termination state description set, and creating a connection animation set according to the transition from the connection initial state to the connection termination state; and performing joint animation display for the new page from a joint initial state to a joint termination state according to the joint animation set.
An apparatus for joining pages in an android system, comprising: the initial state description set generating module is used for generating an initial state description set according to the state information of the user interface elements in the old page in the starting process of the new page, wherein the state information is used for indicating the existence forms of the user interface elements in the page; the termination state description set generation module is used for generating a termination state description set according to the state information of the user interface elements in the new page; the initial state linking construction module is used for constructing an initial state linking corresponding to the new page according to the initial state description set and the terminal state description set, and creating a linking animation set according to the transition from the initial state linking to the terminal state linking; and the animation display module is used for performing joint animation display on the new page from a joint initial state to a joint termination state according to the joint animation set.
An electronic device, comprising: the android system page linking method comprises a processor and a memory, wherein computer readable instructions are stored on the memory and are executed by the processor to realize the page linking method in the android system.
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a method of joining pages in an android system as described above.
Compared with the prior art, the method has the following beneficial effects:
and in the process of starting the new page, the service switching in the application program is completed by transitioning from the initial state to the terminal state of the new page.
Specifically, an initial state description set is generated according to state information of user interface elements in an old page, an end state description set is generated according to state information of the user interface elements in a new page, a connected initial state and a connected animation set are created according to the initial state description set and the end state description set, and connected animation display of transition from the connected initial state to the connected end state is conducted on the new page according to the connected animation set.
Therefore, in the starting process of the new page, the old page is not directly jumped to the new page, but the transition is formed between the new page and the old page through the initial state of the corresponding connection of the new page, so that the smoothness of the connection of the pages is improved, and the phenomena of blockage and even black screen in the electronic equipment are effectively solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a block diagram illustrating a hardware configuration of an electronic device according to an exemplary embodiment.
FIG. 2 is a flowchart illustrating a method for joining pages in an android system, according to an example embodiment.
Fig. 3 is a schematic view of a user interface according to a corresponding embodiment of fig. 2.
FIG. 4 is a flow chart of one embodiment of step 230 of the corresponding embodiment of FIG. 2.
FIG. 5 is a flow diagram of one embodiment of step 250 of the corresponding embodiment of FIG. 2.
FIG. 6 is a flow diagram of one embodiment of step 251 in the corresponding embodiment of FIG. 5.
FIG. 7 is a flowchart illustrating a method for joining pages in another android system, according to an example embodiment.
FIG. 8 is a diagram illustrating page engagement within the same process in an application scenario.
Fig. 9 to 11 are schematic diagrams of page links across processes in an application scenario.
Fig. 12 is a timing diagram of a page join process in an android system to which the present disclosure relates.
Fig. 13 is a timing diagram of a page launch process in an android system to which the present disclosure relates.
FIG. 14 is a block diagram illustrating an apparatus for joining pages in an android system, according to an example embodiment.
Fig. 15 is a block diagram illustrating an apparatus for joining pages in another android system, according to an example embodiment.
FIG. 16 is a block diagram for one embodiment of the terminated state description set generation module 750 in a corresponding embodiment of FIG. 14.
FIG. 17 is a block diagram for one embodiment of an engage initial state build module 770 in a corresponding embodiment of FIG. 14.
Fig. 18 is a block diagram of an embodiment of the element grouping unit 771 in the corresponding embodiment of fig. 17.
FIG. 19 is a block diagram illustrating an apparatus for joining pages in another android system, according to an example embodiment.
While specific embodiments of the disclosure have been shown and described in detail in the drawings and foregoing description, such drawings and description are not intended to limit the scope of the disclosed concepts in any way, but rather to explain the concepts of the disclosure to those skilled in the art by reference to the particular embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
As described above, in the starting process of a new page of an android system, the electronic device often has the phenomenon of jamming or even a black screen due to direct jumping of the new and old pages, and how to smoothly join the new and old pages still needs to be solved.
It can be understood that the simplest method is to keep the existence form of the user interface elements in the new page and the old page completely consistent, so that in the process of joining the new page and the old page, only the window animation of page jump needs to be shielded, and the new page is quickly covered on the old page enough, so that the smooth joining of the new page and the old page can be realized.
However, in practical applications, the existence forms of the user interface elements in the old and new pages are variable, and even the visual effects are different for the users, for example, some user interface elements exist only in the old page but not in the new page, and the timing of the new and old page links is not constant, which makes the smooth linking of the old and new pages more complicated in practical applications.
Therefore, the method for joining the pages in the android system is especially provided by the disclosure, and the method is applied to electronic equipment, can effectively improve the fluency of joining the pages, and can realize smooth joining of new and old pages.
Referring to fig. 1, fig. 1 is a block diagram illustrating an electronic device according to an example embodiment. The electronic device 100 may be a smartphone, a tablet computer, or other android-system-deployable electronic device, which is not limited herein.
It should be noted that the electronic device 100 is only an example adapted to the present disclosure, and should not be considered as providing any limitation to the scope of the present disclosure. The electronic device 100 also should not be construed as necessarily dependent on or having one or more components of the exemplary electronic device 100 shown in fig. 1.
As shown in fig. 1, the electronic device 100 includes a memory 101, a memory controller 103, one or more processors 105 (only one shown in fig. 1), a peripheral interface 107, a radio frequency module 109, a positioning module 111, a camera module 113, an audio module 115, a touch screen 117, and a key module 119. These components communicate with each other via one or more communication buses/signal lines 121.
The memory 101 may be used to store software programs and modules, such as program instructions and modules corresponding to the method and apparatus for joining a page in the exemplary embodiment of the present disclosure, and the processor 105 executes various functions and data processing by executing the program instructions stored in the memory 101, that is, implements the method for joining a page.
Memory 101, as a carrier of resource storage, may be a random access medium, such as high speed random access memory, non-volatile memory, such as one or more magnetic storage devices, flash memory, or other solid state memory. The storage means may be a transient storage or a permanent storage.
The peripheral interface 107 may include at least one wired or wireless network interface, at least one serial-to-parallel conversion interface, at least one input/output interface, at least one USB interface, and the like, for coupling various external input/output devices to the memory 101 and the processor 105 to realize communication with various external input/output devices.
The rf module 109 is configured to receive and transmit electromagnetic waves, and achieve interconversion between the electromagnetic waves and electrical signals, so as to communicate with other devices through a communication network. Communication networks include cellular telephone networks, wireless local area networks, or metropolitan area networks, which may use various communication standards, protocols, and technologies.
The positioning module 111 is used for acquiring the current geographic position of the electronic device 100. Examples of the positioning module 111 include, but are not limited to, a global positioning satellite system (GPS), a wireless local area network-based positioning technology, or a mobile communication network-based positioning technology.
The camera module 113 is attached to a camera and is used for taking pictures or videos. The shot pictures or videos can be stored in the memory 101 and also can be sent to an upper computer through the radio frequency module 109.
Audio module 115 provides an audio interface to a user, which may include one or more microphone interfaces, one or more speaker interfaces, and one or more headphone interfaces. And performing audio data interaction with other equipment through the audio interface. The audio data may be stored in the memory 101 and may also be transmitted through the radio frequency module 109.
The touch screen 117 provides an input-output interface between the electronic device 100 and a user. Specifically, the user may perform an input operation, such as a gesture operation of clicking, touching, sliding, and the like, through the touch screen 117, so that the electronic device responds to the input operation. The electronic device 100 displays and outputs output contents formed by any one or combination of text, pictures or videos to the user through the touch screen 117.
The key module 119 includes at least one key for providing an interface for a user to input to the electronic device 100, and the user can cause the electronic device 100 to perform different functions by pressing different keys. For example, the sound adjustment key may allow a user to effect an adjustment of the volume of sound played by the electronic device 100.
It will be appreciated that the configuration shown in FIG. 1 is merely illustrative and that electronic device 100 may include more or fewer components than shown in FIG. 1 or different components than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, in an exemplary embodiment, a method for joining a page in an android system is applied to the electronic device 100 shown in fig. 1, where the method for joining a page in an android system may be executed by the electronic device 100, and may include the following steps:
step 210, in the process of starting a new page, an initial state description set is generated according to the state information of the user interface elements in the old page.
First, it should be noted that the user interface elements refer to elements such as numbers, letters, characters, patterns, etc. existing in the user interface. Because the user interface is displayed in the form of a page in the touch screen configured in the electronic device, for this reason, the user interface element also exists in the page.
Further, the user interface elements may exist in the same presence form in different pages, or may exist in the same page in different presence forms. In other words, the same page may contain several different user interface elements, while different pages may contain the same user interface elements. Based on this, the state information is then used to indicate the presence of the user interface element in the page.
Wherein the status information includes but is not limited to: the element identification corresponding to the user interface element, the position of the user interface element in the page, the position relationship of the user interface element with other user interface elements in the page, the type of the user interface element, the content of the user interface element, and the like.
For example, as shown in fig. 3, the electronic device 100 is configured with a currently displayed page 300 of the touch screen 117 as a user interface, and the page includes two user interface elements 310 and 330. Element identification a is used to uniquely identify user interface element 310 and element identification B is used to uniquely identify user interface element 330.
The type of user interface element 310 is text and the content is "user interface element". The type of user interface element 330 is a text box pattern and the content is "gray filled background". The user interface elements 310, 330 are located in the middle of the page 300, and the user interface element 310 is superimposed on top of the user interface element 330.
Of course, the element identifier may also be in other expression forms, such as numbers, characters, or any combination of the above forms, and the position may be expressed in the form of coordinate values, which is not limited herein.
In order to join the new page and the old page, it is first required to know the display form of the new page and the old page in the touch screen, that is, the existence form of the user interface element in the new page and the old page.
Based on the method, in the process of starting the new page, the state information collection of the user interface elements in the old page can be triggered, so that an initial state description set is generated. In other words, the initial state description set can reflect the display form of the old page in the touch screen, and is beneficial to describing the old page according to the initial state description set subsequently.
Furthermore, the new page starting process is divided according to the life cycle of the page, and at least comprises a pre-starting stage and a starting stage. The pre-starting stage is to trigger the process to start a new page after the process is started. That is, in the pre-boot phase, the current page displayed in the touch screen is still the old page.
Thus, the collection of state information for user interface elements in the old page will occur during the pre-boot phase.
Step 230, generating a termination state description set according to the state information of the user interface element in the new page.
After the existence form of the user interface element in the old page is known, the existence form of the user interface element in the new page is further known.
Specifically, state information of the user interface elements is collected in the new page, so that a termination state description set is generated, and the termination state description set can reflect the display form of the new page in the touch screen, so that the new page can be described according to the termination state description set in the following.
And step 250, constructing a connection initial state corresponding to the new page according to the initial state description set and the termination state description set, and creating a connection animation set according to the transition from the connection initial state to the connection termination state.
First, the state corresponding to the new page refers to the existence form of the new page in the touch screen. It should be understood that the new page may exist in a variety of forms in the touch screen, but the new page may be presented in the touch screen in any of the above-mentioned forms, i.e., the user interface displayed in the touch screen as seen by the user.
Therefore, the corresponding state of the new page comprises a connection initial state and a connection termination state. The initial state of the link refers to an initial existence form of the new page in the touch screen, and the terminal state of the link refers to a final existence form of the new page in the touch screen, that is, a display form of the new page in the touch screen. Therefore, in the process of joining the new page and the old page, the old page is firstly transited to the joining initial state corresponding to the new page, and then is further transited to the joining termination state from the joining initial state.
Because the initial state description set can describe the old page, and the terminal state description set can describe the new page, the initial state of the new page is constructed according to the initial state description set and the terminal state description set, so that the initial state of the new page can reflect the existence form of the user interface elements in the new page and the old page at the same time, and transition between the new page and the old page in the initial state of the new page is facilitated.
Further, in the initial state of linking, the new page contains both the user interface elements existing only in the old page and the user interface elements existing in the new and old pages, and the existing forms of the user interface elements are consistent with the existing forms of the user interface elements in the old page.
What needs to be described next is a join animation set that contains a join animation that transitions from a join initial state to a join terminal state.
Further, the linking animation includes, but is not limited to, fade-out hiding, fade-in displaying, displacement, and color or size fading, among others.
Specifically, the join animation set is created according to a transition from a join initial state to a join terminal state.
For example, if a user interface element exists only in the old page but not in the new page, the initial state of the link contains the user interface element, and the terminated state of the link does not contain the user interface element. At this time, the transition from the initial state to the ending state needs to make the user interface element disappear, and accordingly, the join animation set created according to the transition will contain the join animation in which the user interface element is faded out and hidden.
And step 270, performing joint animation display for the new page according to the joint animation set, wherein the joint animation display is transited from the joint initial state to the joint termination state.
After the join animation set is created, the new page can be displayed according to the join animation in which the initial join state is transited to the final join state, and finally, a user interface which is seen by a user and is displayed in the touch screen is formed.
Still by way of example, a user interface element exists only in the old page and not in the new page, and accordingly, the set of engagement animations will include an engagement animation in which the user interface element is obscured. At this time, the new page is displayed according to the linking animation, so that the user interface element disappears from the new page, that is, the user interface element is not displayed in the user interface.
Through the process, the natural seamless of page connection is realized, namely for a user, the connection of the new page and the old page is coherent and imperceptible in visual experience, and the user does not feel the jump of the new page and the old page, so that the continuity of an interactive mode between an application program and the user is ensured.
In an exemplary embodiment, the method as described above may further include the steps of:
and asynchronously creating the process when the old page is started, and triggering the process to perform resource preloading.
The resources comprise system resources and resources corresponding to the user interface elements.
Limited by the android system, the resources that a single process can allocate to are limited, and if the amount of business of an application program is increased, the resources required by the application program are increased, and accordingly, the application program needs to create a plurality of processes to meet the increased amount of business. Therefore, when the service switching is carried out in the android system, not only a new page can be started, but also cross-process can be involved.
Because the process may not exist during the process crossing, a process needs to be started temporarily first, and the start of a new page can be performed after the process is started. In the process of starting the new page, further loading resources, particularly loading resources corresponding to user interface elements, and displaying the new page after the resources are loaded, thereby completing service switching.
Due to the performance difference of the electronic devices, the process starting speed has a large difference. In addition, if the resources corresponding to the user interface elements include picture resources, a large amount of input and output and decoding are involved, and thus the time overhead of resource loading is also large. It can be understood that if the process is started slowly, the loading process of the new page will further consume more time, so that the phenomenon of jamming and even black screen in the electronic device is more likely to occur.
Therefore, in the embodiment, before the new page is started, a process is created in advance in an asynchronous manner, and the process is triggered to perform resource preloading, so that the time consumption for starting the cross-process is shortened.
Further, due to the problem of resource allocation in the android system, resource preloading may fail, and based on this, the above process will be performed when the old page is started, so as to provide sufficient time to guarantee successful implementation of resource preloading.
Accordingly, prior to step 210, the method as described above may further include the steps of:
and judging whether the process completes the resource preloading.
And if the process finishes the resource preloading or the resource preloading is overtime, triggering the process to execute the new page starting.
Through the cooperation of the embodiment, the process pre-starting and the resource pre-loading are realized before the new page is started, the influence of the time consumption of the cross-process starting on the linking effect of the new page and the old page is effectively improved, and the page linking fluency is favorably improved.
In addition, the method is particularly suitable for middle and low-end electronic equipment, so that the universality of the page connection method is improved.
In an exemplary embodiment, before step 230, the method as described above may further include the steps of:
and judging whether new and old page connection is needed or not by performing page starting check on the new page.
It should be understood that if the existing forms of the user interface elements in the new and old pages are completely consistent, or the service switching is performed in the same process, relatively speaking, the linking effect of the new and old pages is not affected by the time consumption of cross-process starting, and the phenomena of blocking and even black screen are less likely to occur, at this time, the new page can be normally displayed without performing the linking of the new and old pages related to the present disclosure.
Therefore, before the new page is displayed normally, it is necessary to determine whether to join the new page and the old page. If the new page and the old page need to be spliced, the process jumps to step 230. Otherwise, if the new page and the old page do not need to be connected, the process is triggered to control the normal display of the new page.
Specifically, whether the new page and the old page need to be linked or not is judged by carrying out page starting check on the new page.
The page starting check refers to checking whether state information of user interface elements collected in an old page is received or not before a new page is normally displayed, and judging that the new page and the old page need to be connected if the corresponding state information is received.
Under the effect of the embodiment, unnecessary new and old page connection is avoided, the memory occupancy rate of the electronic equipment is favorably reduced, and the processing efficiency of the electronic equipment is favorably improved.
Referring to fig. 4, in an exemplary embodiment, step 230 may include the following steps:
and 231, performing user interface element layout in the new page, and performing temporary non-display processing on the new page and the user interface elements in the new page by modifying preset starting parameters.
At step 233, corresponding state information is obtained for the user interface elements laid out in the new page.
And step 235, storing the obtained state information to form a termination state description set.
After the new and old pages are judged to need to be linked, the fact that the new pages need to be linked before being displayed normally is known. Thus, after the user interface element layout is completed, the new page also needs to be subjected to the temporary non-display processing.
The temporary non-display processing means setting the new page to be temporarily non-displayed, for example, transparent, and temporarily non-displaying the user interface elements laid out in the new page. The temporary non-display process can be completed by modifying the preset starting parameters in the android system.
After the temporary non-display processing is completed, the state information corresponding to the user interface elements laid out in the temporary non-display new page can be collected, and the state information is stored to form a termination state description set.
Referring to FIG. 5, in an exemplary embodiment, step 250 may include the steps of:
and 251, grouping the user interface elements according to the state information in the initial state description set and the termination state description set to obtain a plurality of connection element groups.
As described above, in the initial state of linking, the new page contains both the user interface elements existing only in the old page and the user interface elements existing in the new and old pages at the same time, and the existing forms of the user interface elements are consistent with the existing forms of the user interface elements in the old page.
Based on this, before proceeding with the new and old page links, it is first necessary to know which user interface elements exist only in the old page and which user interface elements exist in the new and old page at the same time.
Since the state information indicates the existence form of the user interface element in the page, it is possible to know whether the user interface element exists in the page through the state information.
After knowing whether a user interface element is present on a page, it is necessary to further distinguish which page the user interface element is present on, e.g., whether the user interface element is present only on the old page, only on the new page, or both pages.
For this purpose, the user interface elements in the new page and the old page are grouped according to the state information to obtain a plurality of connection element groups. The different set of engagement elements indicates the page in which the user interface element exists.
And step 253, adding the user interface elements in the new page according to the user interface elements in the plurality of the connecting element groups.
It will be appreciated that the new page itself contains user interface elements that exist only in the new page, as well as user interface elements that exist in both the old and new pages. Thus, the user interface elements that need to be added are those that exist only in the old page.
Assuming that a set of join elements indicates that the user interface elements contained therein exist only in the old page, the user interface elements in the set of join elements can be added to the new page accordingly.
255, restoring the existing form of the user interface elements in the new page to the existing form of the user interface elements in the old page according to the state information of the user interface elements in the plurality of linkage element groups, and forming a linkage initial state corresponding to the new page.
After the layout of the user interface elements is completed, the existence form of the user interface elements contained in the new page and existing in the old page is the final existence form in the touch screen, namely the connection termination state, and in the connection initial state, the existence forms of the user interface elements are consistent with the existence form of the user interface elements in the old page.
For example, assuming that a set of join elements indicates that the user interface elements included therein are simultaneously present in the new and old pages, the presence of the user interface elements in the set of join elements in the new page is restored to the presence in the old page.
Alternatively, assuming that a join element group indicates that the user interface elements contained therein exist only in the new page or the old page, the existence form of the user interface elements in the join element group in the new page or the old page is maintained.
Step 257, configure a join animation for transitioning from the initial join state to the final join state for each user interface element in each join element group, respectively, to obtain a join animation set.
For example, assuming a set of join elements indicates that the user interface elements contained therein exist only on a new page, the transition from the initial state to the terminated state of the join requires that the user interface element be newly presented, and accordingly, the join animation configured for the user interface elements in the set of join elements is a fade-in display.
Referring to fig. 6, in an exemplary embodiment, step 251 may include the following steps:
step 2511, the element identifier corresponding to the user interface element is extracted from the state information in the initial state description set and the terminal state description set.
As mentioned above, the state information at least includes the element identifiers corresponding to the user interface elements, so that the corresponding element identifiers can be extracted from the state information in the initial state description set and the terminal state description set.
Wherein, the user interface element uniquely identified by the element identifier in the initial state description set exists in the old page, and the user interface element uniquely identified by the element identifier in the final state description set exists in the new page.
Step 2513, match the element id in the initial state description set with the element id in the final state description set to obtain a plurality of matching results.
After the element identifiers in the initial state description set and the terminal state description set are obtained through extraction, which user interface elements are contained in the old page and the new page respectively can be obtained, and therefore the division of the user interface elements is facilitated.
Specifically, if the element identifiers in the two description sets are matched, a first matching result is obtained, and the first matching result indicates that the user interface element corresponding to the matched element identifier exists in the old page and the new page at the same time.
If the element identifications in the two description sets are not matched, further performing mismatching judgment, and if the mismatching is judged to be caused by the fact that the element identifications only exist in the initial state description set, obtaining a second matching result, wherein the second matching result indicates that the user interface elements corresponding to the mismatching element identifications only exist in the old page.
And if the mismatching is judged to be caused by the fact that the element identifications only exist in the termination state description set, obtaining a third matching result, wherein the third matching result indicates that the user interface elements corresponding to the mismatching element identifications only exist in the new page.
Step 2515, according to the matching results, all the user interface elements in the old page and the new page are divided into a plurality of connection element groups.
After a number of results are obtained, user interface element grouping can be performed to obtain a number of engagement element groups.
Specifically, the user interface elements corresponding to the element identifiers of which the matching results are the first matching results are divided into a first connection element group, where the first connection element group includes user interface elements that exist all the time.
And dividing the user interface element corresponding to the element identifier of which the matching result is the second matching result into a second connection element group, wherein the second connection element group comprises the user interface element which is about to disappear.
And dividing the user interface element corresponding to the element identifier with the matching result being the third matching result into a third connection element group, wherein the third connection element group comprises the new user interface element.
Referring to fig. 7, in an exemplary embodiment, after step 270, the method as described above may further include the steps of:
and step 410, generating a connection completion state message after the connection animation is displayed.
And step 430, closing the old page according to the connection completion state message.
And when the display of the connection animation is finished, the starting of the new page is finished, and at the moment, the current page displayed in the touch screen is the new page. That is, the business to be developed by the application is performed based on the new page, and the old page is not used any more, so the old page can be ended.
Specifically, after the display of the animation to be jointed is finished, the jointing completion state message is triggered and generated. The connection completion state message indicates that the new page and the old page are connected, and then the process is triggered to control the closing of the old page according to the indication of the connection completion state message.
Through the process, the resources used by the old page can be released in time, the released resources can be loaded when other subsequent processes are started, and the smooth development of services in the application program is effectively ensured.
FIG. 8 is a diagram illustrating page engagement within the same process in an application scenario. Fig. 9 to 11 are schematic diagrams of page links across processes in an application scenario.
The pages 501 to 502 are page links in the same process, and the pages 502 to 505 are page links across processes.
For example, in page 502 to page 503, user interface element 601 exists in both pages 502, 503, while user interface element 602 exists only in page 502 and user interface element 603 exists only in page 503.
In the pages 503 to 505, the user interface elements 601 and 603 exist in the pages 503 to 505 at the same time, and the user interface element 604 exists in the pages 503 to 505 all the time, but the progress bar represented by the user interface element is gradually changed.
In addition, user interface element 605 disappears on page 505 and user interface element 606 newly appears on page 505.
In the process of page connection, the existence form of the user interface element in each page needs to be known, and the connection animation which is indicated by the created connection animation set and transits from the connection initial state to the connection termination state is displayed in each page, so that the smooth connection of the pages is realized.
The detailed process of page join in-process or across-process can be referred to as shown in fig. 12 and 13. Fig. 12 is a timing chart of a page join process in the android system, and fig. 13 is a timing chart of a page launch process in the android system.
In the whole process, although the user interface is logically positioned in a plurality of different pages, for the user, the current page displayed in the touch screen corresponding to the user interface is coherent, so that the user is coherent and unaware of page connection, and does not feel that the interactive mode is interrupted, thereby realizing natural and seamless page connection.
The following is an embodiment of the apparatus of the present disclosure, which may be used to execute a method for joining pages in an android system related to the present disclosure. For details that are not disclosed in the embodiment of the apparatus of the present disclosure, please refer to an embodiment of a method for joining pages in an android system related to the present disclosure.
Referring to fig. 14, in an exemplary embodiment, an apparatus 700 for joining pages in an android system includes, but is not limited to: initial state description set generation module 710, terminal state description set generation module 730, engagement initial state construction module 750, and animation display module 770.
The initial state description set generating module 710 is configured to generate an initial state description set according to state information of user interface elements in an old page in a new page starting process. The state information is used to indicate the presence of the user interface element in the page.
The terminating state description set generating module 730 is configured to generate a terminating state description set according to the state information of the user interface element in the new page.
The join initial state construction module 750 is configured to construct a join initial state corresponding to the new page according to the initial state description set and the termination state description set, and create a join animation set according to a transition from the join initial state to the join termination state.
The animation display module 770 is configured to perform a join animation display for transitioning the new page from the join initial state to the join end state according to the join animation set.
In an exemplary embodiment, the apparatus 700 as described above further includes, but is not limited to: a resource preloading module.
The resource preloading module is used for asynchronously creating a process when an old page is started and triggering the process to perform resource preloading. The resources include system resources and resources corresponding to the user interface elements.
Accordingly, as shown in fig. 15, the apparatus 700 as described above further includes, but is not limited to: a preload determination module 810 and a new page launch module 830.
The preloading determination module 810 is configured to determine whether the process completes resource preloading.
The new page starting module 830 is configured to trigger the process to execute the new page starting when the process completes the resource preloading or when the resource preloading of the process is overtime.
In an exemplary embodiment, the apparatus 700 as described above further includes, but is not limited to: the page starts the check module.
The page starting checking module is used for carrying out page starting checking on the new page.
When the need for new and old page join is detected, the termination state description set generation module 750 is notified.
Referring to FIG. 16, in an exemplary embodiment, the terminating state description set generation module 750 includes, but is not limited to: a preprocessing unit 751, a state information acquisition unit 753, and a state information storage unit 755.
The preprocessing unit 751 is configured to perform user interface element layout in a new page, and perform temporary non-display processing on the new page and user interface elements therein by modifying preset starting parameters.
The state information acquisition unit 753 is configured to acquire corresponding state information for the user interface element laid out in the new page.
The state information storage unit 755 is used for storing the acquired state information to form a terminating state description set.
Referring to FIG. 17, in an exemplary embodiment, the engagement initial state building block 770 includes, but is not limited to: an element grouping unit 771, an element adding unit 773, an initial state configuration unit 775, and an animation configuration unit 777.
The element grouping unit 771 is configured to group the user interface elements according to the state information in the initial state description set and the final state description set to obtain a plurality of join element groups.
The element adding unit 773 is configured to add user interface elements in the new page according to the user interface elements in the plurality of join element groups.
The initial state configuration unit 775 is configured to restore the existence form of the user interface element in the new page to the existence form of the user interface element in the old page according to the state information of the user interface elements in the plurality of join element groups, and form a join initial state corresponding to the new page.
The animation configuration unit 777 is configured to configure a join animation for transitioning from a join initial state to a join end state for the user interface elements in each join element group, respectively, to obtain a join animation set.
Referring to fig. 18, in an exemplary embodiment, the element grouping unit 771 includes, but is not limited to: an element identification extraction unit 7711, an element identification matching unit 7713, and an element division unit 7715.
The element identifier extracting unit 7711 is configured to extract the element identifier corresponding to the user interface element from the state information in the initial state description set and the terminal state description set.
The element identifier matching unit 7713 is configured to match the element identifiers in the initial state description set with the element identifiers in the final state description set, so as to obtain a plurality of matching results.
The element dividing unit 7715 is configured to divide all user interface elements in the old page and the new page into a plurality of join element groups according to the plurality of matching results.
Referring to fig. 19, in an exemplary embodiment, the apparatus 700 as described above further includes, but is not limited to: a message generation module 910 and a page close module 930.
The message generating module 910 is configured to generate a join completion status message after the display of the animation to be joined is completed.
The page closing module 930 is configured to close the old page according to the join completion status message.
It should be noted that, when the device for joining a page in an android system provided in the above embodiment performs processing of joining a page in an android system, the above-mentioned division of each functional module is merely used as an example, and in practical application, the above-mentioned function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device for joining a page in an android system is divided into different functional modules, so as to complete all or part of the above-described functions.
In addition, the device for joining a page in an android system provided by the above embodiment and the embodiment of the method for joining a page in an android system belong to the same concept, wherein specific ways for each module to execute operations have been described in detail in the method embodiment, and are not described here again.
In an exemplary embodiment, an electronic device includes, but is not limited to, a processor and a memory.
The memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, implement the method for joining pages in the android system in the above embodiments.
In an exemplary embodiment, a computer readable storage medium has a computer program stored thereon, and when executed by a processor, the computer program implements a method for joining pages in an android system as in the above embodiments.
The above description is only a preferred exemplary embodiment of the present disclosure, and not intended to limit the embodiments of the present disclosure, and one of ordinary skill in the art can easily make various changes and modifications according to the main concept and spirit of the present disclosure, so that the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (15)

1. A method for joining pages in an android system is characterized by comprising the following steps:
in the starting process of a new page, generating an initial state description set according to state information of user interface elements in an old page, wherein the state information is used for indicating the existence forms of the user interface elements in the page;
generating a termination state description set according to the state information of the user interface elements in the new page;
constructing a connection initial state corresponding to the new page according to the initial state description set and the termination state description set so as to transit from the old page to the connection initial state, and creating a connection animation set according to the transition from the connection initial state to the connection termination state corresponding to the new page, wherein the connection initial state is used for reflecting the existence form of user interface elements in the new page and the old page at the same time;
and performing joint animation display for the new page according to the joint animation set, wherein the joint animation display is transited from the joint initial state to the joint termination state.
2. The method of claim 1, wherein the method further comprises:
asynchronously creating a process when the old page is started, and triggering the process to pre-load resources, wherein the resources comprise system resources and resources corresponding to user interface elements;
before generating an initial state description set according to the state information of the user interface elements in the old page in the process of starting the new page, the method further comprises the following steps:
and when the process finishes the resource preloading or the resource preloading is overtime, triggering the process to execute the new page starting.
3. The method of claim 1 or 2, wherein before generating the terminating state description set based on the state information of the user interface element in the new page, the method further comprises:
performing page starting check on the new page;
and when the new page and the old page need to be connected, jumping to a step of generating a termination state description set according to the state information of the user interface elements in the new page.
4. The method of claim 1 or 2, wherein generating a set of terminating state descriptions from state information of user interface elements in the new page comprises:
user interface element layout is carried out in the new page, and the new page and the user interface elements in the new page are subjected to temporary non-display processing by modifying preset starting parameters;
acquiring corresponding state information aiming at the user interface elements arranged in the new page;
and storing the obtained state information to form the termination state description set.
5. The method of claim 1 or 2, wherein the constructing a join initial state corresponding to the new page according to the initial state description set and the termination state description set, and creating a join animation set according to a transition from the join initial state to a join termination state corresponding to the new page comprises:
grouping user interface elements according to the state information in the initial state description set and the termination state description set to obtain a plurality of connected element groups;
adding user interface elements in the new page according to the user interface elements in the plurality of connection element groups;
restoring the existing form of the user interface elements in the new page to the existing form of the user interface elements in the old page according to the state information of the user interface elements in the plurality of linkage element groups to form a linkage initial state corresponding to the new page;
and respectively configuring a joint animation for the user interface elements in each joint element group, wherein the joint animation is transited from the joint initial state to the joint termination state, so as to obtain the joint animation set.
6. The method of claim 5, wherein grouping user interface elements based on state information in the initial state description set and the final state description set to obtain a plurality of join element groups comprises:
extracting element identifiers corresponding to user interface elements from the state information in the initial state description set and the terminal state description set;
matching the element identifiers in the initial state description set with the element identifiers in the final state description set to obtain a plurality of matching results;
and dividing all user interface elements in the old page and the new page into a plurality of connection element groups according to a plurality of matching results.
7. The method of claim 1 or 2, wherein after said displaying a join animation of said new page from said join initial state to said join terminal state according to said set of join animations, the method further comprises:
after the linking animation is displayed, generating a linking completion state message;
and closing the old page according to the connection completion state message.
8. The utility model provides a device of linking page in tall and erect system of ann, its characterized in that includes:
the initial state description set generating module is used for generating an initial state description set according to the state information of the user interface elements in the old page in the starting process of the new page, wherein the state information is used for indicating the existence forms of the user interface elements in the page;
the termination state description set generation module is used for generating a termination state description set according to the state information of the user interface elements in the new page;
an initial state joining construction module, configured to construct an initial state joining corresponding to the new page according to the initial state description set and the terminal state description set, so as to transition from the old page to the initial state joining, and create an initial state joining animation set according to the transition from the initial state joining to the terminal state joining corresponding to the new page, where the initial state joining is used to reflect an existing form of a user interface element in the old and new pages at the same time;
and the animation display module is used for performing joint animation display on the new page from the joint initial state to the joint termination state according to the joint animation set.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the resource preloading module is used for asynchronously creating a process when the old page is started and triggering the process to perform resource preloading, wherein the resource comprises system resources and resources corresponding to user interface elements;
the device further comprises:
and the new page starting module is used for triggering the process to execute the new page starting when the process finishes the resource preloading or the resource preloading is overtime.
10. The apparatus of claim 8 or 9, further comprising:
the page starting checking module is used for carrying out page starting checking on the new page; and when the new page and the old page need to be spliced, notifying the termination state description set generation module.
11. The apparatus of claim 8 or 9, wherein the termination state description set generation module comprises:
the preprocessing unit is used for carrying out user interface element layout in the new page and carrying out temporary non-display processing on the new page and the user interface elements in the new page by modifying preset starting parameters;
a state information acquiring unit, configured to acquire corresponding state information for the user interface element laid out in the new page;
and the state information storage unit is used for storing the acquired state information to form the termination state description set.
12. The apparatus of claim 8 or 9, wherein the splice initiation state construction module comprises:
the element grouping unit is used for grouping the user interface elements according to the state information in the initial state description set and the termination state description set to obtain a plurality of connected element groups;
the element adding unit is used for adding user interface elements in the new page according to the user interface elements in the plurality of the connection element groups;
an initial state configuration unit, configured to restore the existence form of the user interface element in the new page to the existence form of the user interface element in the old page according to state information of the user interface elements in the several join element groups, and form a join initial state corresponding to the new page;
and the linkage animation configuration unit is used for configuring a linkage animation which is transited from the linkage initial state to the linkage termination state for the user interface elements in each linkage element group respectively to obtain the linkage animation set.
13. The apparatus of claim 12, wherein the element grouping unit comprises:
an element identifier extracting unit, configured to extract, from the state information in the initial state description set and the terminal state description set, an element identifier corresponding to a user interface element;
an element identifier matching unit, configured to match the element identifiers in the initial state description set with the element identifiers in the final state description set to obtain a plurality of matching results;
and the element dividing unit is used for dividing all the user interface elements in the old page and the new page into a plurality of the connection element groups according to a plurality of the matching results.
14. An electronic device, comprising:
a processor; and
memory having stored thereon computer readable instructions which, when executed by the processor, implement a method of joining pages in an android system as claimed in any of claims 1 to 7.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of joining pages in an android system as claimed in any of claims 1 to 7.
CN201710724627.5A 2017-08-22 2017-08-22 Method and device for linking pages in android system and electronic equipment Active CN109426532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710724627.5A CN109426532B (en) 2017-08-22 2017-08-22 Method and device for linking pages in android system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710724627.5A CN109426532B (en) 2017-08-22 2017-08-22 Method and device for linking pages in android system and electronic equipment

Publications (2)

Publication Number Publication Date
CN109426532A CN109426532A (en) 2019-03-05
CN109426532B true CN109426532B (en) 2021-08-20

Family

ID=65499072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710724627.5A Active CN109426532B (en) 2017-08-22 2017-08-22 Method and device for linking pages in android system and electronic equipment

Country Status (1)

Country Link
CN (1) CN109426532B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110276031A (en) * 2019-06-24 2019-09-24 北京向上一心科技有限公司 Animated show method, system, equipment and the computer readable storage medium of page assembly
JP2023541589A (en) * 2020-09-09 2023-10-03 華為技術有限公司 How to convert between interfaces, devices and systems
CN114640743B (en) * 2020-12-15 2023-10-13 华为技术有限公司 Interface dynamic effect display method, electronic equipment and storage medium
CN116450279A (en) * 2022-01-10 2023-07-18 北京有竹居网络技术有限公司 Virtual task stack processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214068A (en) * 2011-04-28 2011-10-12 宇龙计算机通信科技(深圳)有限公司 Control method for page switching display and mobile terminal
CN103324403A (en) * 2012-03-22 2013-09-25 腾讯科技(深圳)有限公司 Page switching method and device as well as mobile terminal
CN103488411A (en) * 2012-06-13 2014-01-01 腾讯科技(深圳)有限公司 Method and device for switching pages
CN106648399A (en) * 2015-11-02 2017-05-10 广州市动景计算机科技有限公司 Interface display processing method, apparatus and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385473A (en) * 2010-09-02 2012-03-21 腾讯科技(深圳)有限公司 Page switching method and device
CN102541515B (en) * 2010-12-08 2014-12-03 腾讯科技(深圳)有限公司 Method and device for realizing special screen switching effect
CN103809864B (en) * 2012-11-07 2016-12-21 阿里巴巴集团控股有限公司 A kind of method and apparatus at switching at runtime interface
US10691323B2 (en) * 2015-04-10 2020-06-23 Apple Inc. Column fit document traversal for reader application
CN106649725B (en) * 2016-12-22 2019-11-29 前海节事科技(深圳)有限公司 A kind of page switching method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214068A (en) * 2011-04-28 2011-10-12 宇龙计算机通信科技(深圳)有限公司 Control method for page switching display and mobile terminal
CN103324403A (en) * 2012-03-22 2013-09-25 腾讯科技(深圳)有限公司 Page switching method and device as well as mobile terminal
CN103488411A (en) * 2012-06-13 2014-01-01 腾讯科技(深圳)有限公司 Method and device for switching pages
CN106648399A (en) * 2015-11-02 2017-05-10 广州市动景计算机科技有限公司 Interface display processing method, apparatus and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
关于Android 页面切换过慢或者卡顿;黄海佳;《https://www.jianshu.com/p/2e02aac9bede》;20170512;第1-2页 *

Also Published As

Publication number Publication date
CN109426532A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
CN109426532B (en) Method and device for linking pages in android system and electronic equipment
CN108628652A (en) User interface rendering intent, device and terminal
CN103345405A (en) Application program starting method and device and client
CN106445500B (en) Method, system and terminal equipment for providing user interface
CN107220020B (en) Display method and electronic equipment
CN104333811A (en) Display method and electronic equipment
CN103345390A (en) Picture output method and device for mobile terminal and mobile terminal
CN111459586B (en) Remote assistance method, device, storage medium and terminal
CN103559055A (en) Activity starting method and device applied to Android platform
WO2020220773A1 (en) Method and apparatus for displaying picture preview information, electronic device and computer-readable storage medium
CN110442366A (en) A kind of biography screen processing method, device, equipment and storage medium
CN102800045A (en) Image processing method and device
CN106406940A (en) System upgrading method, system upgrading apparatus, and terminal
US20190378319A1 (en) Virtual scene display method and apparatus, and storage medium
WO2017091411A1 (en) Synchronizing a server-side keyboard layout with a client-side keyboard layout in a virtual session
CN113268212A (en) Screen projection method and device, storage medium and electronic equipment
CN111225232A (en) Video-based sticker animation engine, realization method, server and medium
US20200201673A1 (en) View switching
CN101483694B (en) Playing control method and apparatus for vector animation
CN103761253A (en) Display system and display method for cartoon
US10303331B2 (en) Live mobile application visual editor demo
CN105354051A (en) Method and device for presenting information flow card and electronic equipment
CN112463199A (en) System upgrading method and terminal
CN104598255A (en) System and method for adding corner mark in view
CN113286349B (en) Personal hot spot connection method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant