Method, device and electronic equipment for implementing application page switching effect

CN115454553BActive Publication Date: 2026-09-15杭州米络星科技(集团)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211124558.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2026-09-15
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

[0003]本发明的目的在于提供一种应用页面切换效果的实现方法、装置和电子设备,以缓解现有技术中存在的页面切换效果少、用户参与度低的技术问题

Benefits of technology

[0023] This invention provides a method, apparatus, and electronic device for implementing application page switching effects. The method includes: obtaining the root layout of a second page in response to a switching operation on a first page; obtaining the root layout of the first page in response to an exit operation on the second page; both the first page and the second page are application interfaces in an Android system; executing a first switching effect based on the root layouts of the first page and the second page to achieve a switch from the first page to the second page; the first switching effect is an animation effect; executing a second switching effect based on the root layouts of the first page and the second page to achieve a switch from the second page back to the first page; the second switching effect includes animation effects or gesture effects, solving the technical problems of limited switching effects and low user participation, and achieving the technical effects of enriching animation effects and increasing interactivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454553B_ABST
    Figure CN115454553B_ABST
Patent Text Reader

Abstract

The application provides an implementation method and device of application page switching effect and electronic equipment, relates to the technical field of Android system UI design, and includes the following steps: in response to a switching operation for a first page, acquiring a root part of a second page; in response to an exit operation for the second page, acquiring a root part of the first page; the first page and the second page are both application interfaces in the Android system; a first switching effect is executed based on the root parts of the first page and the second page, so as to switch from the first page to the second page; the first switching effect is an animation effect; a second switching effect is executed based on the root parts of the first page and the second page, so as to switch from the second page back to the first page; the second switching effect includes an animation effect or a gesture effect, the technical problem of few switching effects and low user participation is solved, and the technical effect of rich animation effects and increased interactivity is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Android system UI design technology, and in particular to a method, apparatus and electronic device for implementing application page switching effects. Background Technology

[0002] In Android systems, transitions between application pages are achieved with entrance and exit animations. These transitions are typically implemented using default system methods. The system generally provides several basic animation effects, such as translation, scaling, rotation, and transparency changes, or combinations of these to achieve specific transition effects. However, using the native system approach has two main drawbacks: first, it limits the animation styles, restricting choices to a few basic animations and hindering more advanced custom animations; second, it lacks user interactivity, as users can only use the transition effects directly after they are set and cannot participate in defining them according to their preferences. In other words, current methods for implementing application page transition effects in Android systems suffer from limited transition effects and low user engagement. Summary of the Invention

[0003] The purpose of this invention is to provide a method, apparatus, and electronic device for implementing page switching effects, so as to alleviate the technical problems of limited page switching effects and low user participation in the prior art.

[0004] In a first aspect, embodiments of the present invention provide a method for implementing application page switching effects, comprising:

[0005] In response to a switching operation on the first page, the root layout of the second page is obtained; both the first page and the second page are application interfaces in the Android system.

[0006] In response to the exit operation for the second page mentioned above, obtain the root layout of the first page;

[0007] The first transition effect is executed based on the root layout of the first page and the root layout of the second page to achieve the transition from the first page to the second page; the first transition effect is an animation effect.

[0008] Based on the root layout of the first page and the root layout of the second page, a second switching effect is executed to achieve a switch from the second page back to the first page; the second switching effect includes animation effects or gesture effects.

[0009] In some possible implementations, the above animation effects include system animations and custom animations; the system animations are pre-configured in Extensible Markup Language (XML) and include any one or more combinations of translation, scaling, rotation, and opacity changes.

[0010] The above methods also include: pre-creating custom animations using an animation generator.

[0011] In some possible implementations, a first switching effect is performed based on the root layout of the first page and the root layout of the second page to achieve the switching from the first page to the second page, including: performing system animation or custom animation on the root layout of the second page to achieve the switching from the first page to the second page.

[0012] In some possible implementations, based on the root layout of the first page and the root layout of the second page, a first switching effect is performed to achieve the switching from the first page to the second page. This also includes: performing a system animation or a custom animation on the root layout of the first page to exit the current display interface; and performing a system animation or a custom animation on the root layout of the second page to display the second page on the current display interface.

[0013] In some possible implementations, after obtaining the root layout of the first page in response to the exit operation for the second page, the method further includes: obtaining the position coordinates of the touch object in contact with the display device based on the swipe listener pre-added in the root layout of the second page; if the position coordinates are within the gesture response area on the display device, then the exit operation is a gesture exit; obtaining the movement information of the touch object when in contact with the display device based on the swipe listener; the movement information includes the displacement and time of the touch object's movement on the display device; and determining the swipe gesture for the second page based on the movement information.

[0014] In some possible implementations, a second switching effect is performed based on the root area of ​​the first page to achieve a switch from the second page back to the first page, including: determining the second switching effect based on the swipe gesture; and performing the second switching effect based on the root area of ​​the first page and the root area of ​​the second page to achieve a switch from the second page back to the first page.

[0015] In some possible implementations, it further includes: if the exit operation is not a gesture exit, then a second switching effect is executed based on the root area of ​​the second page to achieve a switch from the second page back to the first page; the first switching effect is an animation effect.

[0016] Secondly, embodiments of the present invention provide an apparatus for implementing application page switching effects, comprising:

[0017] The first acquisition module is used to acquire the root layout of the second page in response to the switching operation of the first page; the first page and the second page are both application interfaces in the Android system.

[0018] The second acquisition module is used to acquire the root layout of the first page in response to the exit operation of the second page mentioned above.

[0019] The first switching module is used to execute a first switching effect based on the root layout of the first page and the root layout of the second page to achieve the switching from the first page to the second page; the first switching effect is an animation effect.

[0020] The second switching module is used to execute a second switching effect based on the root layout of the first page and the root layout of the second page, so as to realize the switching from the second page back to the first page; the second switching effect includes animation effect or gesture effect.

[0021] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of the method described in any of the first aspects above.

[0022] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method described in any of the first aspects above.

[0023] This invention provides a method, apparatus, and electronic device for implementing application page switching effects. The method includes: obtaining the root layout of a second page in response to a switching operation on a first page; obtaining the root layout of the first page in response to an exit operation on the second page; both the first page and the second page are application interfaces in an Android system; executing a first switching effect based on the root layouts of the first page and the second page to achieve a switch from the first page to the second page; the first switching effect is an animation effect; executing a second switching effect based on the root layouts of the first page and the second page to achieve a switch from the second page back to the first page; the second switching effect includes animation effects or gesture effects, solving the technical problems of limited switching effects and low user participation, and achieving the technical effects of enriching animation effects and increasing interactivity. Attached Figure Description

[0024] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0025] Figure 1 A flowchart illustrating a method for implementing an application page switching effect according to an embodiment of the present invention;

[0026] Figure 2 A flowchart illustrating another method for implementing an application page switching effect according to an embodiment of the present invention;

[0027] Figure 3 This is a schematic diagram illustrating the effect of gesture exit in a method for implementing application page switching effects according to an embodiment of the present invention.

[0028] Figure 4 A schematic diagram of the structure of an application page switching effect implementation device provided in an embodiment of the present invention;

[0029] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0031] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0032] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Some embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Unless otherwise specified, the following embodiments and features thereof can be combined with each other.

[0033] In Android systems, transitions between application pages are achieved with entrance and exit animations. These transitions are typically implemented using default system methods. The system generally provides several basic animation effects, such as translation, scaling, rotation, and transparency changes, or combinations of these to achieve specific transition effects. However, using the native system approach has two main drawbacks: first, it limits the animation styles, restricting choices to a few basic animations and hindering more advanced custom animations; second, it lacks user interactivity, as users can only use the transition effects directly after they are set and cannot participate in defining them according to their preferences. In other words, current methods for implementing application page transition effects in Android systems suffer from limited transition effects and low user engagement.

[0034] Based on this, in order to improve user experience and achieve smooth transitions between pages, the present invention has made certain extensions based on the Android system source code. That is, the embodiments of the present invention provide a method, device and electronic device for implementing application page transition effects, so as to alleviate the technical problems of few page transition effects and low user participation in the prior art.

[0035] To facilitate understanding of this embodiment, a method for implementing an application page switching effect disclosed in this embodiment of the invention will first be described in detail. (See [link to relevant documentation]). Figure 1 The diagram illustrates a method for implementing an application page switching effect. This method can be executed by an electronic device and mainly includes the following steps S110 to S140:

[0036] S110: In response to a switching operation on the first page, obtain the root layout of the second page; both the first page and the second page are application interfaces in the Android system;

[0037] S120: In response to an exit operation for the second page, obtain the root layout of the first page;

[0038] S130: Execute the first transition effect based on the root layout of the first page and the root layout of the second page to achieve the transition from the first page to the second page; the first transition effect is an animation effect;

[0039] In this embodiment, the animation effect includes system animation; the system animation is pre-configured in Extensible Markup Language (XML) and includes any one or more combinations of translation, scaling, rotation, and transparency changes. Furthermore, the animation effect may also include custom animation; accordingly, the method provided in this embodiment may further include: pre-constructing custom animation using an animation generator. As a concrete example, by using a custom Animator, and constructing the necessary estimators and interpolators for execution, various complex or finely controlled animation effects can be achieved.

[0040] In this embodiment, step S120 includes: performing a system animation or a custom animation on the root area of ​​the second page to achieve the switching from the first page to the second page.

[0041] Alternatively, step S120 may further include: performing a system animation or a custom animation on the root area of ​​the first page to exit the current display interface; and simultaneously performing a system animation or a custom animation on the root area of ​​the second page to display the second page in the current display interface.

[0042] As a concrete example, the first transition effect is an entry effect, that is, the currently displayed interface switches from the first page (A) to the second page (B). During the transition, the first page A can execute an animation when exiting the current displayed interface, or it can not execute an animation; at the same time, the second page B executes an animation when entering the current displayed interface. That is to say, the first transition effect can include two cases: (1) only the second page's entry animation; (2) both the first page's exit animation and the second page's entry animation.

[0043] S140: Based on the root layout of the first page and the root layout of the second page, execute the second switching effect to achieve the switch from the second page back to the first page; the second switching effect includes animation effects or gesture effects.

[0044] This application provides a method, apparatus, and electronic device for implementing application page switching effects, including: obtaining the root layout of a second page in response to a switching operation on a first page; obtaining the root layout of the first page in response to an exit operation on the second page; both the first page and the second page are application interfaces in an Android system; executing a first switching effect based on the root layouts of the first page and the second page to achieve a switch from the first page to the second page; the first switching effect is an animation effect; executing a second switching effect based on the root layouts of the first page and the second page to achieve a switch from the second page back to the first page; the second switching effect includes animation effects or gesture effects, solving the technical problems of few switching effects and low user participation, and achieving the technical effects of enriching animation effects and increasing interactivity.

[0045] See Figure 2 The flowchart illustrates another method for implementing the application page switching effect. In this embodiment, after step S130, the method may further include: determining whether the exit operation is a gesture exit; if so, listening for gesture swipes on the second page. The specific steps are as follows:

[0046] Step 21: Based on the pre-added swipe listener in the root layout of the second page, obtain the position coordinates of the touch object in contact with the display device;

[0047] In this embodiment, the display device can be a touch screen, and the touch object can be a user's finger or stylus, used to input gesture operations on the touch screen device through the touch object.

[0048] The swipe listener, pre-added to the root layout, is typically an executable program used to receive coordinates and other data generated by touch objects swiping on the device. The specific principle is as follows: When a user's finger or stylus performs gestures such as tapping, pressing, or swiping on the screen, the system converts the screen data into recognizable data based on these gestures. If the currently used application interface has a swipe listener, the swipe coordinate data generated on the screen will be continuously sent back to this swipe listener. Based on this swipe data, corresponding business operations can be executed. The entire swipe listener principle is supported by the underlying system, and each software application can add swipe listeners to achieve its own gesture swipe effects.

[0049] The specific code demonstration is as follows: DecorView.setOnTouchListener((x,y)->{}); where setOnTouchListener() is a system-provided method for adding a touch listener, and x and y are the coordinates returned by the system callback.

[0050] Step 22: If the location coordinates are within the gesture response area on the display device, the exit operation is a gesture exit;

[0051] Step 23: Based on the sliding listener, obtain the movement information of the touch object when it comes into contact with the display device; the movement information includes the displacement and time of the touch object's movement on the display device;

[0052] Step 24: Determine the swipe gesture for the second page based on the motion information.

[0053] As a concrete example, see Figure 3 The illustration shows a gesture-based exit effect. The upper interface B (the second page) swipes upwards to exit to the lower interface A (the first page). The gesture is monitored by adding a swipe listener (supported by system methods) to the root layout of the upper interface B. When a touch object swipes on the root layout, the system continuously receives the coordinates of the touch object's position on the screen. Simultaneously, only when the touch object presses down and swipes upwards within the gesture response area will the root layout of the upper interface B move upwards with the touch object, and the lower interface A will gradually appear. The position and size of the gesture response area on the display device can be customized. The standard for response is that the coordinates of the user's swipe fall within the predefined coordinate range of the gesture response area.

[0054] Therefore, when returning to page A from page B, if a swipe gesture is used (e.g., the user quickly swipes the touch object upwards from the bottom), the transition effect will execute the gesture to exit. If no swipe gesture is used (e.g., pressing the back button), a custom animation can be used to exit. The swipe gesture can be from bottom to top, from left to right, etc., and the inertial movement after releasing the touch object can also be set with a speed to achieve a natural transition effect.

[0055] Accordingly, in one embodiment, step S140 includes: determining a second switching effect based on the swipe gesture; and performing the second switching effect based on the root layout of the first page and the root layout of the second page to achieve a switch from the second page back to the first page.

[0056] In one embodiment, the method further includes: if the exit operation is not a gesture exit, then performing a second switching effect based on the root of the second page to achieve a switch from the second page back to the first page; the first switching effect is an animation effect.

[0057] This invention provides a method for implementing page transition effects. By obtaining the DecorView at the bottom of the interface, basic animations can be executed using this root layout, and user-defined effects such as blur, distortion, and Bezier motion can also be added. Furthermore, when exiting the page, the method can also respond to user gestures and perform matching actions. For example, if a touch object is pressed and swiped from left to right, the page will slide out along with the touch object, thus exiting the page. The user gestures can be arbitrary, such as swiping upwards to throw or free-following.

[0058] In other words, the method for implementing the application page switching effect provided in this application embodiment uses a custom animation form added to the root layout of the page, instead of using the method provided by the system. This is equivalent to breaking through the limitations of the system and enriching the animation effect. Combined with the user's swipe gesture, the effect is applied to the root layout, which can produce very good interactivity and enhance the user's sense of participation and experience.

[0059] This invention provides a device for implementing application page switching effects, see [link to device]. Figure 4 The device includes:

[0060] The first acquisition module 310 is used to acquire the root layout of the second page in response to a switching operation on the first page; both the first page and the second page are application interfaces in the Android system.

[0061] The second acquisition module 320 is used to acquire the root layout of the first page in response to an exit operation for the second page.

[0062] The first switching module 330 is used to execute a first switching effect based on the root layout of the first page and the root layout of the second page to achieve the switching from the first page to the second page; the first switching effect is an animation effect.

[0063] The second switching module 340 is used to execute a second switching effect based on the root layout of the first page and the root layout of the second page, so as to realize the switching from the second page back to the first page; the second switching effect includes animation effect or gesture effect.

[0064] The application page switching effect implementation device provided in this application embodiment can be specific hardware on the device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. The application page switching effect implementation device provided in this application embodiment has the same technical features as the application page switching effect implementation method provided in the foregoing embodiments, and therefore can solve the same technical problems and achieve the same technical effects.

[0065] This application also provides an electronic device, specifically, the electronic device includes a processor and a storage device; the storage device stores a computer program, and the computer program, when run by the processor, executes the method described in any of the above embodiments.

[0066] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 400 includes: a processor 40, a memory 41, a bus 42, and a communication interface 43. The processor 40, the communication interface 43, and the memory 41 are connected through the bus 42. The processor 40 is used to execute executable modules, such as computer programs, stored in the memory 41.

[0067] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0068] Bus 42 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0069] The memory 41 is used to store programs. After receiving an execution instruction, the processor 40 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 40 or implemented by the processor 40.

[0070] Processor 40 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 40 or by instructions in software form. Processor 40 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 41. The processor 40 reads the information in memory 41 and, in conjunction with its hardware, completes the steps of the above method.

[0071] Corresponding to the above method, this application embodiment also provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and run by a processor, the machine-executable instructions cause the processor to perform the steps of the above method.

[0072] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0073] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0074] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0075] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0076] It should be noted that similar reference numerals and letters in the accompanying drawings indicate similar items. Therefore, once an item is defined in one accompanying drawing, it does not need to be further defined and explained in subsequent accompanying drawings. In addition, the terms "first," "second," "third," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for implementing application page switching effects, characterized in that, include: In response to a switching operation on the first page, the root layout of the second page is obtained; both the first page and the second page are application interfaces in the Android system. In response to an exit operation on the second page, obtain the root layout of the first page; The first switching effect is performed based on the root layout of the first page and the root layout of the second page to achieve the switching from the first page to the second page; The first switching effect is an animation effect; the animation effect includes system animation and custom animation, and the method further includes: pre-constructing the custom animation using an animation generator; In response to an exit operation on the second page, after obtaining the root layout of the first page, the position coordinates of the touch object in contact with the display device are obtained based on the pre-added swipe listener in the root layout of the second page; if the position coordinates are within the gesture response area on the display device, the exit operation is a gesture exit; the position and size of the gesture response area are customizable; and when the touch object is no longer in contact with the display device, an inertial movement effect is executed according to the set inertial movement speed. Based on the sliding monitoring, the movement information of the touch object when it comes into contact with the display device is obtained; the movement information includes the displacement and time of the touch object's movement on the display device; Based on the movement information, a swipe gesture is determined for the second page; Based on the root layout of the first page and the root layout of the second page, a second switching effect is executed to achieve a switch from the second page back to the first page; the second switching effect includes animation effects or gesture effects; wherein, during the execution of the second switching effect, the root layout of the second page moves along with the movement of the touch object; If the exit operation is not a gesture exit, then a second switching effect is executed based on the root area of ​​the second page to achieve a switch from the second page back to the first page; the first switching effect is an animation effect.

2. The method for implementing the application page switching effect according to claim 1, characterized in that, The system animation is pre-configured in Extensible Markup Language (XML) and includes any one or more combinations of translation, scaling, rotation, and transparency changes. The method also includes: pre-constructing custom animations using an animation generator.

3. The method for implementing the application page switching effect according to claim 2, characterized in that, Based on the root layout of the first page and the root layout of the second page, a first switching effect is executed to achieve the switching from the first page to the second page, including: Perform a system animation or a custom animation on the root area of ​​the second page to achieve the transition from the first page to the second page.

4. The method for implementing the application page switching effect according to claim 2, characterized in that, Based on the root layout of the first page and the root layout of the second page, a first switching effect is executed to achieve the switching from the first page to the second page, which also includes: Perform a system animation or a custom animation on the root area of ​​the first page to exit the current display interface; Perform a system animation or a custom animation on the root section of the second page to display the second page on the current display interface.

5. The method for implementing the application page switching effect according to claim 1, characterized in that, The second switching effect is executed based on the root area of ​​the first page to achieve a switch from the second page back to the first page, including: The second switching effect is determined based on the swipe gesture; The second switching effect is executed based on the root layout of the first page and the root layout of the second page to achieve a switch from the second page back to the first page.

6. A device for implementing page switching effects, characterized in that, include: The first acquisition module is used to acquire the root layout of the second page in response to a switching operation on the first page; both the first page and the second page are application interfaces in the Android system. The second acquisition module is used to acquire the root layout of the first page in response to the exit operation of the second page; The first switching module is used to perform a first switching effect based on the root layout of the first page and the root layout of the second page, so as to achieve the switching from the first page to the second page; The first switching effect is an animation effect; the animation effect includes system animation and custom animation, and further includes: pre-constructing the custom animation using an animation generator; The second acquisition module is further configured to, in response to an exit operation for the second page, acquire the root layout of the first page, and based on a pre-added swipe listener in the root layout of the second page, acquire the position coordinates of the touch object in contact with the display device; if the position coordinates are within the gesture response area on the display device, then the exit operation is a gesture exit; the position and size of the gesture response area are customizable; and, when the touch object is no longer in contact with the display device, perform an inertial movement effect according to a set inertial movement speed; acquire the movement information of the touch object when in contact with the display device based on the swipe listener; the movement information includes the displacement and time of the touch object's movement on the display device; and determine a swipe gesture for the second page based on the movement information; The second switching module is used to execute a second switching effect based on the root layout of the first page and the root layout of the second page to achieve a switch from the second page back to the first page; the second switching effect includes an animation effect or a gesture effect; wherein, during the execution of the second switching effect, the root layout of the second page moves along with the movement of the touch object; if the exit operation is not a gesture exit, the second switching effect is executed based on the root layout of the second page to achieve a switch from the second page back to the first page; the first switching effect is an animation effect.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for implementing the application page switching effect as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to execute the method for implementing the application page switching effect as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Page switching method and device

    CN106528163A

  • Page processing method and device, electronic equipment and readable storage medium

    CN112596648A