Interface display method and device of application program
By displaying animations in parallel with pre-rendering the transition interface, the problem of inconsistent interface switching between Android phones is solved, the smoothness and consistency of interface switching is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202510644259.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-26
AI Technical Summary
In the prior art, the interface switching effect and time of mobile phone systems such as Android are inconsistent, and the fluency is poor, which is limited by the drawing time of the application.
The animation is displayed in parallel through the pre-rendering transition interface. First, the first pre-rendering interface is displayed. After the application is started, switch to the actual interface. Combined with whitelist and blacklist strategies, use the interface cache information to optimize the animation style and speed.
It achieves consistency of interface switching effect and time, improves the fluency of electronic devices, and ensures fluency while avoiding the loss of important information and improving the startup speed of the application.
Smart Images

Figure CN120540765A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a method and device for displaying an application interface. Background Art
[0002] Interface transitions are a common animation effect that users encounter when using electronic devices such as mobile phones. The interface transition effect can affect the smoothness of electronic device systems.
[0003] In the related art, the native solution for common mobile operating systems like Android is to notify the application to draw the transition animation after receiving a user touch operation. After waiting for the application to fully draw, the interface transition animation is executed. This makes the interface switching response time completely limited by the application's drawing time. Due to the different drawing logic of different applications, the drawing speed varies, resulting in inconsistent interface switching effects and timing, and poor smoothness. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method and device for displaying an application interface, which can solve the problems of inconsistent interface switching effects and time and poor fluency in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a method for displaying an interface of an application program, the method comprising:
[0006] Receive a first input; wherein the first input is used to control the electronic device to run a first application;
[0007] In response to the first input, a first interface is displayed; wherein the first interface is used to display a first animation, and the first animation is associated with a first application;
[0008] When the first application is started, the first interface is controlled to switch to the second interface; wherein the second interface is the program interface of the first application.
[0009] In a second aspect, an embodiment of the present application provides an interface display device for an application program, the interface display device comprising:
[0010] A receiving module, configured to receive a first input; wherein the first input is used to control the electronic device to run a first application;
[0011] A display module, configured to display a first interface in response to a first input; wherein the first interface is configured to display a first animation associated with a first application;
[0012] And, when the first application is started, the first interface is controlled to switch to the second interface; wherein the second interface is the program interface of the first application.
[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the method of the first aspect.
[0016] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.
[0017] In this embodiment of the present application, when a user runs an application, they do not need to wait for the application to complete rendering of the transition animation. Instead, a pre-rendered first interface is immediately displayed instead of the actual application interface. By displaying the transition animation in the first interface, the dynamic output during interface switching can be guaranteed to be stable. When the user switches between different application interfaces, the interface switching effect and timing remain consistent, improving the smoothness of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart illustrating a method for displaying an application interface according to some embodiments of the present application is shown;
[0019] Figure 2 A schematic diagram showing an interface of an electronic device according to some embodiments of the present application is shown;
[0020] Figure 3 A schematic diagram showing the update logic of interface cache information in some embodiments of the present application is shown;
[0021] Figure 4 A schematic diagram showing the startup logic of an application program according to some embodiments of the present application is shown;
[0022] Figure 5 A structural block diagram showing an interface display device for an application program according to some embodiments of the present application is shown;
[0023] Figure 6 shows a structural block diagram of an electronic device according to an embodiment of the present application;
[0024] Figure 7 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0026] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0027] The following describes in detail the method and device for displaying the interface of an application program provided by the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0028] In some embodiments of the present application, a method for displaying an application interface is provided. Figure 1 A flowchart showing an interface display method of an application program according to some embodiments of the present application is shown. Figure 1 As shown, the interface display method includes:
[0029] Step 102: Receive a first input; wherein the first input is used to control the electronic device to run a first application.
[0030] In the embodiment of the present application, the first input is used to start running the first application. For example, Figure 2 Schematic diagrams of interfaces of electronic devices of some embodiments of the present application are shown, such as Figure 2 As shown, the electronic device displays a main interface 200 , in which a program icon 202 of a first application is displayed. The first input is a touch input of the user on the program icon 202 .
[0031] Step 104 : Display a first interface in response to the first input; wherein the first interface is used to display a first animation, and the first animation is associated with a first application.
[0032] In an embodiment of the present application, the first interface is a pre-rendered transition interface. Upon receiving the first input from the user, the electronic device immediately displays the first interface and displays the first animation associated with the first application currently being run by the user through the first interface. Therefore, the transition animation can be started without waiting for the program interface of the first application to be rendered.
[0033] The method for displaying the first interface as a transition is defined as a parallel animation solution. This solution reduces or avoids the "stuttering" experience caused by inconsistent interface rendering times by displaying pre-rendered transition animations while rendering the actual application interface, significantly improving the smoothness of interface switching.
[0034] Exemplarily, the first animation is a pre-rendered animation. Exemplarily, the first animation is generated based on the interface currently displayed by the electronic device and the program interface of the first application. Exemplarily, the first animation is consistent with the style of the program interface of the first application.
[0035] Step 106 , when the first application is started, control the first interface to switch to the second interface; wherein the second interface is the program interface of the first application.
[0036] In an embodiment of the present application, upon receiving a first input from a user, the electronic device immediately starts running the first application indicated by the first input and displays the first interface. By displaying the first interface according to a fixed logic, the user can obtain a consistent interface switching experience when launching different applications.
[0037] While displaying the first interface, the electronic device synchronously processes the startup of the first application and starts rendering the program interface of the first application, which is the above-mentioned second interface. After the first application starts running and the rendering of the second interface is completed, it is determined that the startup of the first application is complete. At this time, the electronic device switches from displaying the first interface to displaying the second interface. That is, it switches from displaying the pre-rendered transition animation interface to displaying the correct application interface. Since the style of the first animation in the first interface is consistent with the actual interface content of the second interface, the overall experience of interface switching is smooth and smooth.
[0038] In this embodiment of the present application, when a user runs an application, there is no need to wait for the application to complete rendering of the transition animation. Instead, a pre-rendered first interface is immediately displayed instead of the actual application interface. By displaying the transition animation in the first interface, the dynamic output during interface switching can be guaranteed to be stable. This ensures that when the user switches between different application interfaces, the interface switching effect and timing remain consistent, improving the smoothness of the electronic device.
[0039] In some embodiments of the present application, after receiving the first input, the interface display method further includes:
[0040] Control the start timer; when the timer timing reaches the time threshold, execute the step of displaying the first interface; or, when the timer timing does not reach the time threshold and the first application is started, display the second interface.
[0041] In an embodiment of the present application, when running an application, a time threshold is used to determine whether to display a pre-rendered transition animation interface, i.e., the above-mentioned first interface. For example, upon receiving the user's first input, the electronic device immediately starts timing. If the timing reaches the preset time threshold and the program interface of the first application has not yet been rendered, it means that continuing to wait may cause a delay in interface switching, giving the user a "stuttering" experience.
[0042] At this time, the electronic device displays the first interface and displays the first animation associated with the first application in the first interface. By displaying the first interface, the visual interface of the electronic device responds to the user input, making the visual experience of interface switching smoother.
[0043] If the first application has been launched and its interface, i.e., the second interface, has been rendered before the timer reaches the preset time threshold, it indicates that the first application has launched quickly and will not cause a "stuttering" experience for the user. In this case, the second interface can be directly displayed, thereby improving the running speed of the application.
[0044] This application chooses to display a pre-rendered transition animation interface or directly display the application interface based on the judgment result of the duration threshold, which can ensure a smooth experience when switching interfaces while ensuring the startup and running speed of the application.
[0045] In some embodiments of the present application, after receiving the first input, the interface display method further includes:
[0046] When the first application is a whitelisted program and the first application is not a blacklisted program, the first interface is displayed in response to the first input; or, when the first application is not a whitelisted program or the first application is a blacklisted program, the second interface is displayed in response to the first input.
[0047] In an embodiment of the present application, for the above-mentioned animation parallel scheme, the embodiment of the present application sets a whitelist and a blacklist. Among them, if and only if an application is a whitelist program and this application is not a blacklist program, the animation parallel scheme will be executed, that is, by displaying the first interface as a transition. If an application is not a whitelist program, or this application is a blacklist program, the animation parallel scheme will not be performed on this application, and the transition animation will be displayed according to the native animation rendering logic.
[0048] For example, the programs in the whitelist and blacklist may be dynamically updated by using an online configuration distribution method.
[0049] For example, some applications that start up slowly and do not display key information during the startup process may be added to the whitelist.
[0050] For example, for some applications that display important information on the startup interface when they are started, in order to ensure that the information of these applications can be displayed correctly, they can be added to the blacklist.
[0051] Exemplarily, the blacklist and the whitelist record the program name of at least one application. When an application is run, whether the application is a blacklisted program or a whitelisted program is determined by comparing the program name of the application with that in the blacklist or the whitelist.
[0052] This application sets up whitelists and blacklists to ensure the smoothness of interface switching while avoiding the loss of important information during program startup and ensuring information security.
[0053] In some embodiments of the present application, before displaying the first interface, the interface display method further includes:
[0054] Obtain interface cache information; wherein the interface cache information includes transition animation type information and first interface color information corresponding to the first application; render the first animation according to the transition animation type information and the first interface color information.
[0055] In an embodiment of the present application, an interface information caching strategy is proposed. Specifically, during the operation of an electronic device, interface cache information for different applications is generated. This interface cache information contains information about the transition animation type corresponding to the application, as well as the color information of the first program interface after the application is launched, i.e., the aforementioned first interface color information.
[0056] After a user clicks the program icon of the first application, the electronic device runs the first application and simultaneously reads the interface cache information. When the interface cache information is read, the electronic device renders and displays the first interface based on the transition animation type information and the first interface color information in the interface cache information, and displays the pre-rendered first animation in the first interface.
[0057] By using the cached transition animation type information and the first interface color information, the animation style of the first animation displayed in the first interface can be kept consistent with the actual interface switching style of the first application, and the smoothness of interface switching can be improved by displaying the pre-rendered transition animation.
[0058] Exemplarily, the interface cache information is deleted when the electronic device is restarted or shut down, thereby reducing space usage.
[0059] By caching information in the interface, this application can provide a transition animation in the transition interface that is consistent with the real program interface switching dynamic effect style, and at the same time can increase the rendering speed of the transition animation, thereby improving the smoothness of the interface switching.
[0060] In some embodiments of the present application, before obtaining the interface cache information, the interface display method further includes:
[0061] Determine the transition animation type information corresponding to the first application, and obtain the version information of the first application and the interface color information of the second interface; generate interface cache information according to the transition animation type information and the interface color information;
[0062] And, after displaying the second interface, the interface display method further includes: updating the interface cache information when any one of the following conditions is met: version information changes, interface color of the second interface changes, and interface cache information expires.
[0063] In an embodiment of the present application, when a user first launches an application, the electronic device automatically creates an interface cache information corresponding to the application. For example, during the launch of the first application, the electronic device renders the interface switching animation of the first application according to the system's native animation logic. During this process, the electronic device captures the transition animation type information of the first application and obtains the interface color information of the second interface after the program interface of the first application is rendered.
[0064] For example, the electronic device may determine the color with the largest display area in the second interface as the interface color of the second interface. For example, the electronic device may determine the interface color information of the second interface based on the interface theme of the second interface, such as black for a dark theme and white for a light theme.
[0065] After obtaining the transition animation type information of the first application and the interface color information of the second interface, the electronic device generates and stores interface cache information corresponding to the first application. When the user runs the first application again, the electronic device can quickly render the first animation in the first interface based on the interface cache information, thereby improving the interface switching smoothness when running the first application.
[0066] At the same time, when the electronic device starts the application, it obtains the current version information of the application, determines whether the application's transition animation type information and interface color information theme may have changed based on the version information, and updates the interface cache information accordingly.
[0067] For example, after displaying the second interface, the electronic device determines whether the current version information of the program is consistent with the version information recorded in the interface cache information. If the current version information is inconsistent with the version information in the interface cache information, it is determined that the version information has changed, and the electronic device updates the interface cache information of the first application.
[0068] For example, after the second interface is displayed, it indicates that the first application has been started. During this process, the electronic device completes the rendering of the second interface in the background. During the rendering process, the electronic device determines whether the interface color of the second interface is consistent with the interface color information recorded in the interface cache information when rendering the dynamic effect of the second interface this time. If the interface color of the second interface rendered this time is inconsistent with the interface color information recorded in the interface cache information, it is determined that the interface color of the second interface has changed, and the electronic device updates the interface cache information of the first application.
[0069] For example, an expiration date is set for the interface cache information of each application. If the total storage time of the interface cache information of the first application exceeds the expiration date, the interface cache information is determined to be expired, and the electronic device updates the interface cache information of the first application.
[0070] This application sets up an update mechanism for the interface cache information to ensure that the pre-rendered transition animation is always consistent with the actual dynamic effect style of the running application.
[0071] In some embodiments of the present application, before displaying the first interface, the interface display method further includes:
[0072] Determine interface color information of a current interface displayed by the electronic device; and render a first animation according to the interface color information of the current interface.
[0073] In an embodiment of the present application, when displaying the first interface, the electronic device renders the first animation based on the current interface color information. Since the electronic device's display interface actually switches from the current interface to the first application's second interface when the electronic device is running the first application, rendering the first animation based on the color of the current interface can avoid abrupt visual effects caused by sudden color changes in the transition animation and improve the smoothness of interface switching.
[0074] In some embodiments of the present application, an extremely fast motion effect engine technology is proposed, which utilizes page color information extraction and analysis technology, advanced motion effect response technology, and page jump motion effect strategy intelligent selection technology to improve the fluency of electronic devices.
[0075] Exemplarily, this application uses an animation parallel architecture, customizes and modifies the native animation process of the framework based on the judgment result of the motion rendering time threshold, and adds ShellStaringSurfaceController (the core module in the system service responsible for managing the rendering of the graphical interface in the startup phase) to control and manage the pre-rendering window. The pre-rendering window replaces the actual application window, keeps consistent with the style of the actual application interface, and performs transition animation in advance. And add a list and interface information caching strategy, use the form of online configuration to control the list, and cache key information such as cache timestamps and animation type information.
[0076] In related technologies, native solutions require waiting until the application rendering is complete before displaying the interface transition animation. The speed of application interface rendering is closely related to the design of the application interface itself. However, the embodiment of the present application does not need to wait for the interface rendering to be completed. Instead, it uses a pre-rendered window to display the transition animation first. During the transition animation, the pre-rendered window is replaced by the real application window.
[0077] For example, the present application embodiment proposes a list and interface information caching strategy. The list includes a whitelist of applications and a blacklist of interface names, and the list content is controlled through online configuration. Applications on the whitelist and not on the blacklist use a parallel animation solution, while other applications use a native animation solution.
[0078] For example, this application proposes an interface information caching strategy. The interface cache information includes information such as the program interface's primary color, dark mode, application version number, cache timestamp, and animation type. The interface cache information is cleared after a reboot and updated according to a specific logic. The interface information cache is limited to entries, and entry replacement follows a first-in, first-out principle.
[0079] For example, Figure 3A schematic diagram of the update logic of the interface cache information of some embodiments of the present application is shown. Figure 3 Shown, including:
[0080] Step 302: Interface drawing is completed;
[0081] Step 304, determine whether there is interface cache information; if yes, proceed to step 306, otherwise proceed to step 308;
[0082] Step 306, determine whether the update condition is met; if yes, proceed to step 308, otherwise proceed to step 310;
[0083] In step 306 , the update conditions include: application version information change, interface cache information expiration, and / or interface color change.
[0084] Step 308: Analyze the interface color and update the cache;
[0085] Step 310: Cache update is completed.
[0086] For example, in the animation parallelization scheme proposed in the embodiment of the present application, a duration threshold is designed. When the time for the application to render the interface exceeds the duration threshold, the animation parallelization scheme is executed. Otherwise, the native animation scheme is executed.
[0087] For example, Figure 4 A schematic diagram of the startup logic of an application program in some embodiments of the present application is shown. Figure 4 As shown, after receiving the user's click input, the application starts to execute the program running steps, including starting the activity, starting a new transition, generating the application, continuing the application, and completing the application drawing. Among them, when the new transition starts, the timer starts timing.
[0088] When the app is finished drawing, if the timer is still counting, it will be canceled and the native animation solution will be used. If the timer times out before the app is finished drawing, the animation parallel solution will be used to finally display the application interface.
[0089] For example, taking an electronic device running the Android system as an example, the animation parallel strategy is mainly to customize the native animation process of the framework. Therefore, the main logical modifications are in WMS (Window Manager Service, the core window management service of the Android system), AMS (Activity Manager Service, the activity management service of the Android system) and wm_shell (an extension module of the window management framework of the Android system). The overall modification follows the native animation framework, and ShellStaringSurfaceController is added to it to control and manage the pre-rendered window.
[0090] Among them, ShellStaringSurfaceController is responsible for:
[0091] 1. Read and cache the blacklist / whitelist in the local machine;
[0092] 2. Obtain and manage the theme color, color mode and other information of the corresponding interface;
[0093] 3. Generate and manage pre-rendered windows of corresponding interfaces.
[0094] For example, this application replaces the actual application window with a pre-rendered window, renders the transition animation in advance, suppresses the style of the transition animation and the actual interface, and follows the following logic:
[0095] 1. Store color. The color is determined by combining the cached color or the color of the previous interface with the dark mode.
[0096] 2. The SurfaceControl of the original animation container (Container) is the parent node (Parent), and the hierarchy is one level higher.
[0097] 3. After the actual window content is drawn, it is replaced with the application content using alpha transparency gradient, which is mainly used for background blur of visual effects within the application, such as title bar blur.
[0098] The application interface display method provided in the embodiment of the present application can be executed by an application interface display device. In the embodiment of the present application, the application interface display device executing the application interface display method is taken as an example to illustrate the application interface display device provided in the embodiment of the present application.
[0099] In some embodiments of the present application, an interface display device for an application is provided. Figure 5 The structural block diagram of the interface display device of the application program of some embodiments of the present application is shown as follows: Figure 5 As shown, the interface display device 500 includes:
[0100] The receiving module 502 is configured to receive a first input, wherein the first input is used to control the electronic device to run a first application program;
[0101] Display module 504 is used to display a first interface in response to a first input; wherein the first interface is used to display a first animation, and the first animation is associated with a first application; and, when the first application is started, control the first interface to switch to a second interface; wherein the second interface is a program interface of the first application.
[0102] In this embodiment of the present application, when a user runs an application, there is no need to wait for the application to complete rendering of the transition animation. Instead, a pre-rendered first interface is immediately displayed instead of the actual application interface. By displaying the transition animation in the first interface, the dynamic output during interface switching can be guaranteed to be stable. This ensures that when the user switches between different application interfaces, the interface switching effect and timing remain consistent, improving the smoothness of the electronic device.
[0103] In some embodiments of the present application, the interface display device further includes:
[0104] A timing module, used to control the start timer;
[0105] The display module is also used to execute the step of displaying the first interface when the timing duration of the timer reaches the duration threshold; or to display the second interface when the timing duration of the timer does not reach the duration threshold and the first application is started.
[0106] This application chooses to display a pre-rendered transition animation interface or directly display the application interface based on the judgment result of the duration threshold, which can ensure a smooth experience when switching interfaces while ensuring the startup and running speed of the application.
[0107] In some embodiments of the present application, the display module is further configured to:
[0108] When the first application is a whitelisted program and the first application is not a blacklisted program, the first interface is displayed in response to the first input; or, when the first application is not a whitelisted program or the first application is a blacklisted program, the second interface is displayed in response to the first input.
[0109] This application sets up whitelists and blacklists to ensure the smoothness of interface switching while avoiding the loss of important information during program startup and ensuring information security.
[0110] In some embodiments of the present application, the interface display device further includes:
[0111] An acquisition module, configured to acquire interface cache information; wherein the interface cache information includes transition animation type information corresponding to the first application and first interface color information;
[0112] The rendering module is used to render the first animation according to the transition animation type information and the first interface color information.
[0113] By caching information in the interface, this application can provide a transition animation in the transition interface that is consistent with the real program interface switching dynamic effect style, and at the same time can increase the rendering speed of the transition animation, thereby improving the smoothness of the interface switching.
[0114] In some embodiments of the present application, the interface display device further includes:
[0115] A determination module, configured to determine the transition animation type information corresponding to the first application, and obtain the version information of the first application and the interface color information of the second interface;
[0116] The cache module is used to generate interface cache information based on the transition animation type information and interface color information;
[0117] The update module is used to update the interface cache information when any of the following conditions are met:
[0118] Version information changes, the interface color of the second interface changes, and the interface cache information expires.
[0119] This application sets up an update mechanism for the interface cache information to ensure that the pre-rendered transition animation is always consistent with the actual dynamic effect style of the running application.
[0120] In some embodiments of the present application, the interface display device further includes:
[0121] A determination module, configured to determine the interface color information of the current interface displayed by the electronic device;
[0122] The rendering module is used to render the first animation according to the interface color information of the current interface.
[0123] In an embodiment of the present application, when displaying the first interface, the electronic device renders the first animation based on the current interface color information. Since the electronic device's display interface actually switches from the current interface to the first application's second interface when the electronic device is running the first application, rendering the first animation based on the color of the current interface can avoid abrupt visual effects caused by sudden color changes in the transition animation and improve the smoothness of interface switching.
[0124] The interface display device of the application in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0125] The interface display device of the application in the embodiment of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0126] The interface display device of the application provided in the embodiment of the present application can implement each process implemented in the above method embodiment. To avoid repetition, it will not be described here.
[0127] Optionally, an embodiment of the present application further provides an electronic device, Figure 6 FIG. 1 shows a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device 600 includes a processor 602, a memory 604, and a program or instruction stored in the memory 604 and executable on the processor 602. When the program or instruction is executed by the processor 602, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they will not be described here.
[0128] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0129] Figure 7 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0130] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709 and a processor 710.
[0131] Those skilled in the art will understand that the electronic device 700 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.
[0132] The user input unit 707 is configured to receive a first input, wherein the first input is configured to control the electronic device to execute a first application program.
[0133] Display unit 706 is used to display a first interface in response to a first input; wherein the first interface is used to display a first animation, and the first animation is associated with a first application; and, when the first application is started, control the first interface to switch to a second interface; wherein the second interface is a program interface of the first application.
[0134] In this embodiment of the present application, when a user runs an application, there is no need to wait for the application to complete rendering of the transition animation. Instead, a pre-rendered first interface is immediately displayed instead of the actual application interface. By displaying the transition animation in the first interface, the dynamic output during interface switching can be guaranteed to be stable. This ensures that when the user switches between different application interfaces, the interface switching effect and timing remain consistent, improving the smoothness of the electronic device.
[0135] Optionally, the processor 710 is configured to start timing;
[0136] The display unit 706 is further configured to display the first interface when the timing duration reaches a duration threshold; or display the second interface when the timing duration does not reach the duration threshold and the first application is started.
[0137] This application chooses to display a pre-rendered transition animation interface or directly display the application interface based on the judgment result of the duration threshold, which can ensure a smooth experience when switching interfaces while ensuring the startup and running speed of the application.
[0138] Optionally, the display unit 706 is also used to display the first interface in response to the first input when the first application is a whitelist program and the first application is not a blacklist program; or to display the second interface in response to the first input when the first application is not a whitelist program or the first application is a blacklist program.
[0139] This application sets up whitelists and blacklists to ensure the smoothness of interface switching while avoiding the loss of important information during program startup and ensuring information security.
[0140] Optionally, the processor 710 is further used to obtain interface cache information; wherein the interface cache information includes transition animation type information and first interface color information corresponding to the first application; and render the first animation according to the transition animation type information and the first interface color information.
[0141] By caching information in the interface, this application can provide a transition animation in the transition interface that is consistent with the real program interface switching dynamic effect style, and at the same time can increase the rendering speed of the transition animation, thereby improving the smoothness of the interface switching.
[0142] Optionally, the processor 710 is also used to determine the transition animation type information corresponding to the first application, and obtain the version information of the first application and the interface color information of the second interface; generate interface cache information based on the transition animation type information and the interface color information; and update the interface cache information when any of the following conditions is met: version information changes, interface color of the second interface changes, and interface cache information expires.
[0143] This application sets up an update mechanism for the interface cache information to ensure that the pre-rendered transition animation is always consistent with the actual dynamic effect style of the running application.
[0144] Optionally, the processor 710 is further configured to determine interface color information of a current interface displayed by the electronic device; and render the first animation according to the interface color information of the current interface.
[0145] In an embodiment of the present application, when displaying the first interface, the electronic device renders the first animation based on the current interface color information. Since the electronic device's display interface actually switches from the current interface to the first application's second interface when the electronic device is running the first application, rendering the first animation based on the color of the current interface can avoid abrupt visual effects caused by sudden color changes in the transition animation and improve the smoothness of interface switching.
[0146] It should be understood that in an embodiment of the present application, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.
[0147] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0148] Processor 710 may include one or more processing units. Optionally, processor 710 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 710.
[0149] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0150] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0151] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0152] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0153] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0154] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0155] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0156] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A method for displaying an application interface, characterized in that: The interface display method includes: Receive a first input; wherein the first input is used to control the electronic device to run a first application; In response to the first input, display a first interface; wherein the first interface is used to display a first animation, and the first animation is associated with the first application; When the first application is started, the first interface is controlled to switch to the second interface; wherein the second interface is the program interface of the first application.
2. The interface display method according to claim 1, characterized in that: After receiving the first input, the interface display method further includes: Control start timer; When the timing duration of the timer reaches the duration threshold, executing the step of displaying the first interface; or When the timing duration of the timer does not reach the duration threshold and the first application is started, the second interface is displayed.
3. The interface display method according to claim 1, characterized in that: After receiving the first input, the interface display method further includes: In a case where the first application is a whitelisted application and the first application is not a blacklisted application, in response to the first input, displaying the first interface; or In a case where the first application is not a whitelisted program, or the first application is a blacklisted program, the second interface is displayed in response to the first input.
4. The interface display method according to any one of claims 1 to 3, characterized in that: Before displaying the first interface, the interface display method further includes: Acquire interface cache information; wherein the interface cache information includes transition animation type information and first interface color information corresponding to the first application; Render the first animation according to the transition animation type information and the first interface color information.
5. The interface display method according to claim 4, characterized in that: Before acquiring the interface cache information, the interface display method further includes: Determine the transition animation type information corresponding to the first application, and obtain version information of the first application and interface color information of the second interface; Generate the interface cache information according to the transition animation type information and the interface color information; Furthermore, after displaying the second interface, the interface display method further includes: When any of the following conditions is met, the interface cache information is updated: The version information changes, the interface color of the second interface changes, and the interface cache information expires.
6. An interface display device for an application, characterized in that: The interface display device includes: A receiving module, configured to receive a first input; wherein the first input is used to control the electronic device to run a first application; A display module, configured to display a first interface in response to the first input; wherein the first interface is configured to display a first animation, the first animation being associated with the first application; And, when the first application is started, the first interface is controlled to switch to the second interface; wherein, the second interface is the program interface of the first application.
7. The interface display device according to claim 6, characterized in that: The interface display device further includes: A timing module, used to control the start timer; The display module is further configured to, when the timing duration of the timer reaches a duration threshold, execute the step of displaying the first interface; or When the timing duration of the timer does not reach the duration threshold and the first application is started, the second interface is displayed.
8. The interface display device according to claim 6, characterized in that: The display module is further used for: In a case where the first application is a whitelisted application and the first application is not a blacklisted application, in response to the first input, displaying the first interface; or When the first application is a non-whitelisted program, or when the first application is a blacklisted program, the second interface is displayed in response to the first input.
9. The interface display device according to any one of claims 6 to 8, characterized in that: The interface display device further includes: An acquisition module, configured to acquire interface cache information; wherein the interface cache information includes transition animation type information and first interface color information corresponding to the first application; A rendering module is used to render the first animation according to the transition animation type information and the first interface color information.
10. The interface display device according to claim 9, characterized in that: The interface display device further includes: a determination module, configured to determine the transition animation type information corresponding to the first application, and obtain version information of the first application and interface color information of the second interface; A cache module, configured to generate the interface cache information according to the transition animation type information and the interface color information; An updating module is configured to update the interface cache information when any of the following conditions is met: The version information changes, the interface color of the second interface changes, and the interface cache information expires.