Application function response method, electronic equipment and readable storage medium
By switching animations when the target application interface is drawn, the problem of delay in electronic devices when triggering application functions is solved, and the response speed and user experience are improved.
Patent Information
- Application Number
- CN202311750630.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2025-06-27
AI Technical Summary
Electronic devices may delay in responding to triggering application functions, resulting in poor user experience.
During the process of drawing the target application interface, the playback interface switches animations, thereby responding to trigger operations in advance and improving response speed.
By switching animations in advance, the response speed of electronic devices to the triggering operations of application functions is improved, and user viscosity and user experience are improved.
Smart Images

Figure CN120215772A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and particularly to a method for responding to application functions, an electronic device, and a readable storage medium. Background Art
[0002] With the development of terminal technology, the types of application programs used by users are increasing. Usually, each application program includes multiple functions to meet different needs of users. For example, a social application program can provide functions such as chatting, payment, and display of life status. To improve the user experience of using application functions, when a user triggers an application function, the electronic device needs to respond to the application function as soon as possible.
[0003] Currently, when any application function in an application program is triggered, such as when a target application function is triggered, the electronic device can draw the application interface corresponding to the target application function; after the application interface of the target application function is drawn, the electronic device sequentially plays the exit animation of the first application interface and the display animation of the application interface corresponding to the target application function to display the application interface corresponding to the target application function, where the first application interface is the interface where the user triggers the application function.
[0004] However, in the process of displaying the application interface corresponding to the target application function in the above manner, sometimes there may be a problem that the electronic device delays in responding to the operation of triggering the application function. Summary of the Invention
[0005] This application provides a method for responding to application functions, an electronic device, and a readable storage medium, which can solve the problem that the electronic device delays in responding to the operation of triggering the application function in related technologies. The technical solutions are as follows:
[0006] In a first aspect, a method for responding to application functions is provided, which is applied to an electronic device. The method includes:
[0007] After receiving a trigger operation on a target application function in a first application interface of an application program, draw a target application interface corresponding to the target application function, where the target application function is a function in the application program; during the process of drawing the target application interface, play an interface switching animation, which includes an animation of switching from the first application interface to a transition interface and an animation of switching from the transition interface to the target application interface when the target application interface is drawn; display the target application interface.
[0008] It should be noted that the transition interface can be an interface that does not display any content. Of course, in order to reflect the personalization of the interface switching process, display content can also be set in the transition interface. For example, a preset pattern, text, etc. can be set in the transition interface.
[0009] It should be noted that by setting the transition interface to an interface that does not display any content, the smoothness of the playback of the interface switching animation is improved.
[0010] In this way, since after the target application function is triggered, the interface switching animation is not played after the target application interface is drawn, but during the process of drawing the target application interface, the interface switching animation is already being played, thus advancing the playback timing of the interface switching animation, that is, advancing the response display timing of the trigger operation of the target application function, improving the response speed of the electronic device to the trigger operation of the application function, and increasing user stickiness.
[0011] As an example of the present application, during the process of the electronic device drawing the target application interface and before playing the interface switching animation, after receiving the trigger operation of the target application function in the first application interface, it can also load the transition interface;
[0012] Correspondingly, during the process of the electronic device drawing the target application interface, the operation of playing the interface switching animation includes:
[0013] During the process of drawing the target application interface, sequentially play the exit animation of the first application interface and the display animation of the transition interface;
[0014] When the target application interface is drawn, play the animation of switching from the transition interface to the target application interface.
[0015] In this way, since during the process of drawing the target application interface, the interface switching animation can already be played, rather than playing the interface switching animation after the target application interface is drawn, thus advancing the playback timing of the interface switching animation, that is, advancing the response timing of the trigger operation in the display interface, thereby enhancing the user experience and increasing user stickiness.
[0016] As an example of the present application, after the electronic device receives the trigger operation of the target application function in the first application interface, the operation of loading the transition interface includes: after receiving the trigger operation of the target application function in the first application interface, determining the application theme of the application program; when the application theme is not a transparent theme, loading the transition interface.
[0017] Since when the application theme is a transparent theme, if an interface switch occurs, the transition interface cannot be reflected during the interface switching process. In this way, after advancing the timing of playing the interface switching animation, although it can be made, but because the transition interface will also be transparent, then the user will feel that the interface switching process is not smooth, that is, the playback effect of the interface switching animation is not ideal. Therefore, in order to improve the playback effect of the interface switching animation, the electronic device can also determine the application theme of the application program and load the transition interface when the application theme is not a transparent theme.
[0018] In this way, by loading the transition interface when the application theme of the application is not a transparent theme, the loading of the transition interface is made more reasonable, improving the playback effect of the subsequent interface switching animation.
[0019] In some embodiments, when the application theme of the application is a transparent theme, the electronic device may go through the life cycle of the activity corresponding to the application function, and then draw the target application interface corresponding to the activity. After the target application interface is drawn, an interface switching animation is played to display the target application interface.
[0020] As an example of the present application, the first application interface is a full-screen display application interface; in this case, when the application theme is not a transparent theme, the operations of the electronic device for loading the transition interface include:
[0021] When the application theme is not a transparent theme, determine the size of the target application interface; when the size of the target application interface indicates that the target application interface can completely cover the first application interface, load the transition interface.
[0022] It should be noted that when the size of the target application interface is greater than or equal to the first application interface, it can be determined that the size of the target application interface indicates that the target application interface can completely cover the first application interface. When the size of the target application interface is smaller than the first application interface, it is determined that the size of the target application interface indicates that the target application interface cannot completely cover the first application interface.
[0023] In this way, by loading the transition interface when the target application interface can completely cover the first application interface, the loading of the transition interface is made more reasonable, improving the playback effect of the subsequent interface switching animation.
[0024] In some embodiments, the electronic device may also determine the display mode of the target application interface; when the display mode of the target application interface is the same as the display mode of the first application interface, it is determined that the target application interface can completely cover the first application interface. When the display mode of the target application interface is different from the display mode of the first application interface, it is determined that the target application interface cannot completely cover the first application interface.
[0025] As an example of the present application, when the target application interface is drawn, the operations of the electronic device for playing the animation of switching from the transition interface to the target application interface include:
[0026] When the target application interface is drawn, the exit animation of the transition interface and the display animation of the target application interface are played in sequence according to the preset animation effect; wherein, the preset animation effect is an oval gradient effect, and the oval gradient effect is the effect that the target application interface gradually changes and is displayed in an oval shape from top to bottom, or the preset animation effect is the animation effect that the target application interface gradually appears from nothing.
[0027] In this way, when the preset animation effect is the animation effect that the target application interface gradually appears from nothing, the screen flashing problem that may be perceived by highly sensitive users in the case of no animation effect can be improved.
[0028] As an example of the present application, during the process of drawing the target application interface by the electronic device, before playing the interface switching animation, the theme color of the application program can also be obtained; and the interface color of the transition interface is set to the theme color.
[0029] In this way, by setting the interface color of the transition interface to the theme color, during the process of playing the interface switching animation, the situation of unsmooth playback caused by color jump will not occur.
[0030] As an example of the present application, the first application interface includes an application interface displayed in a split-screen manner; in this case, after receiving a trigger operation for the target application function in the first application interface, the operation of loading the transition interface by the electronic device includes:
[0031] After receiving a trigger operation for the target application function in the first application interface, mount the transition interface to the activity corresponding to the target application interface.
[0032] Since when the electronic device is a folding screen or a tablet computer, and the first application interface includes an application interface displayed in a split-screen manner, that is, when at least two application interfaces are displayed in split screen on the display screen, if the transition interface is mounted to the task corresponding to the target application interface, then during the subsequent interface switching process, the transition interface will completely cover the first application interface, resulting in an unsmooth switching screen problem during the interface switching process. Therefore, when the first application interface includes an application interface displayed in a split-screen manner, the electronic device mounts the transition interface to the activity corresponding to the target application interface.
[0033] As an example, when the electronic device is not a folding screen or a tablet computer, or when the electronic device is a folding screen or a tablet computer, and the first application interface is a full-screen display application interface, after receiving a trigger operation for the target application function in an application interface by the electronic device, the transition interface can be mounted to the activity or task corresponding to the target application interface.
[0034] It should be noted that the first application interface including application interfaces displayed in a split-screen manner means that at least two application interfaces of an application program are displayed on the display screen of an electronic device, and the at least two application interfaces are displayed in a split-screen manner, and the at least two application interfaces together constitute the first application interface.
[0035] In this way, when the first application interface includes application interfaces displayed in a split-screen manner, by mounting the transition interface to the activity corresponding to the target application interface, in the case of interface switching, the transition interface will not completely cover the first application interface, ensuring the smoothness of the switching screen during the interface switching process.
[0036] As an example of the present application, during the process of an electronic device drawing a target application interface and before playing an interface switching animation, the display mode of the transition interface can also be set to be displayed according to a preset animation effect. The preset animation effect is an oval gradient effect. The oval gradient effect is an effect in which the target application interface gradually changes from top to bottom in an oval shape, or the preset animation effect is an animation effect in which the target application interface gradually appears from nothing.
[0037] In some embodiments, the electronic device can set the information of the FLAG of the transition interface to set the transition interface to be displayed according to a preset animation effect. Or, the window setting module can cancel all the FLAG settings in the transition interface to set the transition interface to be displayed according to a preset animation effect.
[0038] In this way, by setting the display mode of the transition interface to a preset animation effect, the richness of playing the transition interface is improved.
[0039] In a second aspect, an electronic device is provided. The structure of the electronic device includes a processor and a memory. The memory is used to store a program for supporting the electronic device to execute the response method of the application function provided in the first aspect above, and to store data involved in the response method of the application function described in the first aspect above. The processor is configured to execute the program stored in the memory. The electronic device may further include a communication bus, and the communication bus is used to establish a connection between the processor and the memory.
[0040] In a third aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When it runs on a computer, it causes the computer to execute the response method of the application function described in the first aspect above.
[0041] In a fourth aspect, a computer program product containing instructions is provided. When it runs on a computer, it causes the computer to execute the response method of the application function described in the first aspect above.
[0042] The technical effects obtained in the second, third, and fourth aspects described above are similar to those obtained by the corresponding technical means in the first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the response process of an application function in the related technology provided by an embodiment of the present application;
[0044] Figure 2 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0045] Figure 3 It is a schematic diagram of the flow of another method for responding to an application function in the related technology provided by an embodiment of the present application;
[0046] Figure 4 It is a schematic diagram of the response process of another application function in the related technology provided by an embodiment of the present application;
[0047] Figure 5 It is a schematic diagram of the flow of another method for responding to an application function in the related technology provided by an embodiment of the present application;
[0048] Figure 6 It is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0049] Figure 7 It is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0050] Figure 8 It is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0051] Figure 9 It is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0052] Figure 10 It is a block diagram of the software system of an electronic device provided by an embodiment of the present application;
[0053] Figure 11 It is a schematic diagram of the flow of a method for responding to an application function provided by an embodiment of the present application;
[0054] Figure 12 It is a schematic diagram of the flow of another method for responding to an application function provided by an embodiment of the present application;
[0055] Figure 13 It is a schematic diagram of the response process of another application function provided by an embodiment of the present application;
[0056] Figure 14 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0057] To make the objectives, technical solutions and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below with reference to the accompanying drawings.
[0058] It should be understood that the "plurality" mentioned in the present application means two or more. In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B may mean A or B; the "and / or" herein is only a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in order to clearly describe the technical solutions of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the terms such as "first" and "second" do not limit the quantity and execution order, and the terms such as "first" and "second" do not necessarily limit to be different.
[0059] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that specific features, structures or characteristics described in combination with the embodiment are included in one or more embodiments of the present application. Thus, the statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "include", "comprise", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0060] With the development of terminal technologies, more and more functions are included in application programs. When a user triggers an application function, an electronic device can usually respond to the trigger operation to display the interface corresponding to the application function. For the user, the user will feel that the electronic device responds to the trigger operation of the application function when switching interfaces. Exemplarily, see Figure 1, when the user performs a triggering operation in the first application interface of the application to trigger an application function of the application, the touch module of the electronic device (including a touch sensor, an input event reading module, and an input event distribution module) can send the input event of the triggering operation to the application, and the application can determine the application function triggered by the triggering operation according to the input event. Since the electronic device will perform an interface switch in most cases where an application function is triggered, when the application determines that an interface switch occurs when implementing the application function, the application can send an interface switch request to the System Server. The activity management module (ActivityManagerService, AMS) or the window management module (WindowManagerService, WMS) in the System Server can request the activity corresponding to the application function and pause the activity corresponding to the first application interface. Then, after going through the life cycle of the activity corresponding to the application function, the application can draw the target application interface corresponding to the activity (usually draw the first frame display animation of the target application interface). After the target application interface is drawn, the application sends an animation playback request to the System Server. The System Server can instruct the SystemUI to play the interface switch animation to display the target application interface, and the interface switch animation includes the exit animation of the first application interface and the display animation of the target application interface.
[0061] To facilitate understanding of the response operation of the electronic device to the application function in the related art, the following takes the example of the user triggering the "life status exhibition function" during the process of using a social application on the mobile phone for illustration.
[0062] In some scenarios, when the user is using a social application on the mobile phone, if the user needs to view the life status of other users in the social circle, then referring to Figure 2 Figure (a) below, when the discovery interface S1 of the social application is displayed, the user can click on the "social circle" control S2 displayed in the discovery interface S1. When the mobile phone receives the click operation on the "social circle" control S2, after waiting for 200 milliseconds, referring to Figure 2 Figure (b) below, the mobile phone can play the interface switch animation (the interface playback animation is represented by a timeline and does not limit the embodiments of the present application). The interface switch animation is the exit animation of the discovery interface S1 and the display animation of the social circle interface S3. Since the interface switch animation is a dynamic process, for the purpose of illustrating this scenario, the accompanying drawings of the embodiments of the present application show one frame of the exit animation and one frame of the display animation as an example, referring to Figure 2Figure (c). When the interface switching animation finishes playing, the mobile phone can display a social circle interface S3 as shown in Figure 2 Figure (d).
[0063] It should be noted that when the mobile phone receives a click operation on the "Social Circle" control S2, during the 200 - millisecond waiting period, a series of operations will be performed at the underlying layer of the mobile phone. This series of operations includes drawing the social circle interface S3. When the social circle interface S3 is drawn, the mobile phone can play the interface switching animation.
[0064] However, if the time taken to draw the social circle interface is relatively long, then after the user clicks the "Social Circle" control S2 for a certain period of time, the mobile phone will play the interface switching animation only after a delay. For example, it may be necessary to wait for 1 second, 1.5 seconds, etc. This will make the user feel that the response time of the mobile phone to the "Social Circle" control S2 is relatively long, and thus the user will think that the mobile phone is stuck, that is, the mobile phone responds untimely and gets stuck, resulting in a decrease in user viscosity.
[0065] To understand the response process of an electronic device to an application function in the related technology, please refer to the following Figure 3 、 Figure 4 or Figure 5In the process schematic diagram shown, after the user clicks on the "Social Circle" control S2, the touch module in the mobile phone can detect the input event (execute the Input event()). This touch module can send the input event to the social application. The social application receives the input event (execute DeliverInput()), and then requests the activity corresponding to the "Social Circle" control from the System Server (execute startActivity()); the System Server can create an activity (execute startActivityInner(), and this activity is called the entry activity or the next activity), and request the SystemUI (here it refers to SytemUI wmshell.main) to prepare the animation (execute requestStartTransition()). The social application can request the System Server to pause the activity corresponding to the first application interface (execute activityPaused(), and here the activity refers to the exit activity or the previous activity). After that, the social application can go through the life cycle of the activity corresponding to the "Life Status Exhibition Function" corresponding to the "Social Circle" control (execute activitystart() and activityResume() in sequence). After that, the social application draws the target application interface corresponding to the activity corresponding to the "Social Circle" control (execute doFrame(), and usually draws the first frame of the display animation). After the target application interface is drawn, the social application can send a drawing completion message to the System Server (execute finishDrawing()). The System Server can refresh the view of the interface to be displayed (execute performSurfacePlacement()), and prepare the interface switching animation (execute onTransactionReady()). After that, the System Server sends an animation playback request to the SystemUI (execute reportAnimationStart()). The SytemUI (here it refers to SytemUI wmshell.anim) can play the interface switching animation (execute animator()) to display the target application interface.
[0066] It should be noted that before requesting the interface switching animation to play, mState = STATE_STARTED is completed, and the states of all WindowContainer and windowState participating in this interface switching animation play are SYNC_STATE_READY. In addition, by Figure 4It can be known that in the related art, the approximate time taken for the mobile phone to distribute the deliverInput event clicked within the application to SystemUi to play the interface switching animation is more than 200 milliseconds. If the application interface corresponding to the started activity is more complex, then this time-consuming may be longer, resulting in a more obvious problem of mobile phone lag.
[0067] In order to improve the response speed of the electronic device to application functions, an embodiment of the present application provides a method for responding to application functions. In this method, after the electronic device receives a trigger operation for a target application function on the first application interface of the application, the electronic device can draw the target application interface, and during the process of drawing the target application interface, play an interface switching animation, which includes an animation for switching from the first application interface to the transition interface, and an animation for switching from the transition interface to the target application interface when the target application interface is drawn; after the interface switching animation is played, the electronic device can display the target application interface. Since after the target application function is triggered, the interface switching animation is not played after the target application interface is drawn, but during the process of drawing the target application interface, the interface switching animation has been played, thus advancing the playing time of the interface switching animation, that is, advancing the response display time for the trigger operation of the target application function. The user can feel that the operation is responded to in a timely manner without a sense of delay, thereby improving the response speed of the electronic device to the trigger operation of the application function and increasing user stickiness.
[0068] For ease of understanding, before introducing the method provided by the embodiment of the present application in detail, the application scenarios involved in the embodiment of the present application will be introduced next.
[0069] Please refer to Figure 6 , Figure 6 which is a schematic diagram of an application scenario provided by an embodiment of the present application. In an application scenario, when the user is using a social application on the mobile phone, if the user wants to use the life status exhibition function in the social application, then when the mobile phone displays the discovery interface S1 as shown in Figure 6 Figure (a) therein, the user can click on the "social circle" control S2 displayed on the discovery interface S1. When the mobile phone receives the click operation on the "social circle" control S2, a series of operations will be performed at the bottom layer of the mobile phone. This series of operations includes drawing the social circle interface S3, and during the process of drawing the social circle interface S3, referring to Figure 6 Figure (b) therein, the mobile phone can play an interface switching animation. This interface switching animation includes the exit animation of the discovery interface S1 and the display animation of the transition interface S4. For the purpose of illustrating this scenario, in the accompanying drawings of the embodiment of the present application, an example is given by showing one frame of the exit animation of the discovery interface S1 and one frame of the display animation of the transition interface S4. Refer toFigure 6 Figure (c) therein. When the social circle interface S3 is drawn completely, continue to play the exit animation of the transition interface S4 and the display animation of the social circle interface S3. In the accompanying drawings of the embodiments of the present application, one frame of the exit animation of the transition interface S4 and one frame of the display animation of the social circle interface S3 are shown as examples for illustration. Refer to Figure 6 Figure (d) therein. When the interface switching animation ends, the mobile phone directly displays the social circle interface S3 as shown in Figure 6 Figure (e) therein.
[0070] As an example, the above Figure 6 shown interface switching animation is an animation without dynamic effects, and this interface switching animation can also be an animation played according to a preset dynamic effect. Refer to Figure 7 Figure (a) therein. After the user clicks the "social circle" control S2, the mobile phone can play the interface switching animation. Among them, one frame of the switching animation of the exit animation of the discovery interface S1 and the display animation of the transition interface S4 can be as shown in Figure 7 Figure (b) therein. The switching animation from the transition interface S4 to the social circle interface S3 can include an elliptical dynamic effect, and one frame of the animation from the transition interface S4 to the social circle interface S3 according to this elliptical dynamic effect can be as shown in Figure 7 Figure (c) therein. When the interface switching animation ends, the mobile phone directly displays the social circle interface S3 as shown in Figure 7 Figure (d) therein.
[0071] In another application scenario, the preset dynamic effect can be a dynamic effect in which the social circle interface S3 fades in from nothing. One frame of the animation from the transition interface to the social circle interface according to this preset dynamic effect can be as shown in Figure 8 Figure (a) therein. When the interface switching animation ends, the mobile phone directly displays the social circle interface S3 as shown in Figure 8 Figure (b) therein.
[0072] In another application scenario, the mobile phone may be a folding screen mobile phone, and a screen is split-displayed on the folding screen of the mobile phone. Refer to Figure 9In Figure (a), the split screen displays the home page S5 of a news application and the first content display interface S6. The news content corresponding to the first news title (which is located on the home page S5) is displayed in the first content display interface S6. If the user triggers the second news title, the mobile phone can draw the second content display interface S7 corresponding to the news title. During the process of the mobile phone drawing the second content display interface S7, the mobile phone can maintain the home page S5 of the news application while playing an interface switching animation at the position where the first content display interface S6 is located. Among them, a frame animation during the playback of the exit animation of the first content display interface S6 and the display animation of the transition interface S4 can be as Figure 9 shown in Figure (b). When the second content display interface S7 is drawn, a frame animation during the playback of the exit animation of the transition interface S4 and the display animation of the second content display interface S7 can be as Figure 9 shown in Figure (c). When the interface switching animation finishes playing, the mobile phone directly displays the second content display interface S7 as shown in Figure 9 Figure (d).
[0073] It should be noted that the embodiments of the present application are only described by taking the above Figures 6 - 9 shown application scenarios as examples, and do not limit the embodiments of the present application. The interface switching within other application programs is also applicable to the embodiments of the present application, such as application scenarios where a shopping application or a browser searches according to keywords in a search box; application scenarios where a video application enters a video playback interface from a video display interface, etc. The embodiments of the present application do not make specific limitations on this.
[0074] Next, the software system of the electronic device 100 will be described.
[0075] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the Android system with a layered architecture as an example, the software system of the electronic device 100 is described by way of example.
[0076] Figure 10 is a block diagram of a software system of an electronic device 100 provided by the embodiments of the present application. Refer to Figure 10 . The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime and the system layer, and the kernel layer.
[0077] The application layer may include a series of application packages. Such as Figure 10As shown, the application layer may include applications such as social applications, shopping applications, browsers, video applications, and system applications (System UI).
[0078] System UI is the first user-visible application during the system startup process of an electronic device. For example, the lock screen interface displayed after the electronic device is powered on, the desktop and status bar displayed after unlocking. System UI is a set of UI components that provides system-level information display and interaction for users and can be used to control the interface display of the electronic device. In the embodiments of the present application, System UI can be used to interact with the System Server in the application framework layer to play an interface switching animation when an interface switch occurs within the application of the electronic device.
[0079] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0080] As an example of the present application, the application framework layer includes a System Server; among them, the System Server includes a Window Management Module (WindowManagerService, WMS), a Splashscreen Content Drawer, and a Window Settings Module. Among them, the WMS may include ActivityRecord and HwActivityRecordEx; the Window Settings Module may include Transition and DisplayPolicy.
[0081] In some embodiments, ActivityRecord is the form of the activity corresponding to the target application function in the AMS (which also belongs to the System Server). ActivityRecord can be used to store information about the Activity corresponding to the target application function, such as the process name where it is located, the package name of the application, etc.
[0082] In some embodiments, the ActivityRecord in the window management module can be used to identify whether the application theme of an application is a transparent theme. If it is not a transparent theme, it can be determined that the transition interface can be loaded. The window management module is also used to load the transition interface in the Activity or task corresponding to the triggered application function. And in the case where the electronic device is in split-screen display, the WMS is used to load the transition interface in the Activity of the triggered application function. The SplashscreenContentDrawer is used to obtain the theme color of the application and set the interface color of the transition interface to the theme color. The window setting module is used to set the display mode of the transition interface to be displayed according to a preset animation effect. For example, the Transition module can cancel the setting of the FLAG for the transition interface.
[0083] In some embodiments, the System Server may further include other modules, which are not enumerated one by one in the embodiments of the present application.
[0084] The Android Runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0085] The system library may include multiple functional modules, such as: the surface manager, the Media Libraries, the 3D graphics processing library (such as: OpenGL ES), the 2D graphics engine (such as: SGL), etc. The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications. The Media Libraries support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The Media Libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is the drawing engine for 2D drawing.
[0086] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, etc.
[0087] As an example, the sensor driver can obtain the TP diff data detected by the touch sensor in the hardware layer and the ACC data detected by the acceleration sensor. After processing the TP diff data and the ACC data into input events, the input events are sent to the corresponding application.
[0088] Based on the execution subject provided in the above embodiments, the response method for the application functions provided in the embodiments of the present application will be introduced next. Please refer to Figure 11 , Figure 11 which is a schematic flowchart of a response method for an application function shown by way of example. Without limitation, this method can be executed by the above-mentioned electronic device. The electronic device can be implemented through the interaction of multiple modules. This method can include the following parts or all of the content:
[0089] Step 1101: When the first application interface is displayed, the application receives a trigger operation for the target application function.
[0090] Since the user may use different application functions of the application during the use of the application, the application functions of the application are triggered within the application. For example, when the application displays the first application interface, in the case of displaying the first application interface, the user can click on the control related to the target application function within the first application interface, so that the application can receive the trigger operation for the target application function. Exemplarily, this scenario can refer to the application scenario shown in Figure (a) in the above Figure 6 .
[0091] Alternatively, when the application displays the first application interface, the user can trigger the target application function through relevant gesture postures in the first application interface. The embodiments of the present application do not specifically limit the trigger operation for the target application function.
[0092] Step 1102: The application sends a function trigger message to the system service.
[0093] Step 1103: When the system service receives the function trigger message, the system service pauses the activity corresponding to the first application interface.
[0094] Step 1104: The window management module in the system service can determine the application theme of the application.
[0095] Since users may set the application theme of an application to reflect personalization or due to their own usage habits during the process of using the application. For example, the application theme of the application may be set to a transparent theme, a dragon year theme, a calligraphy theme, a deep sea theme, a painted theme, etc. Different application themes can change the styles of information such as the icons of the application, the background color of the application interface (including background patterns, etc.), and the displayed text. For instance, if the application theme of the application is a deep sea theme, then the application interface of the application may be dark blue; if the application theme of the application is a calligraphy theme, then the application interface of the application is dark gray or light yellow, and there are calligraphy-related patterns displayed in the application interface; in the case of a transparent theme for the application, the application interface of the application is transparent. Thus, if the application theme of the application is set to a transparent theme, that is, the background color of the application interface of the application is transparently displayed, then after triggering the target application function, the switching of the window may not be reflected, resulting in a poor playback effect of the interface switching animation. Therefore, in order to improve the playback effect of the interface switching animation, the window management module can determine the application theme of the application.
[0096] Exemplarily, the window management module can determine the application theme of the application through ActivityRecord. There is Activitylist1 recorded in this ActivityRecord, and the activities with non-zero application theme identifiers are recorded in Activitylist1. In this way, the window management module can determine whether the application theme identifier of the application is 0 through Activitylist1. When the application theme identifier of the application is not 0, it is determined that the application theme of the application is not a transparent theme; when the application theme identifier of the application is 0, it is determined that the application theme of the application is a transparent theme.
[0097] Step 1105: When the application theme is not a transparent theme, the window management module can determine whether the target application interface corresponding to the target application function can completely cover the first application interface.
[0098] As an example, the window management module can determine the size of the target application interface; when the size of the target application interface is greater than or equal to the size of the first application interface, it is determined that the target application interface can completely cover the first application interface. When the size of the target application interface is less than the size of the first application interface, it is determined that the target application interface cannot completely cover the first application interface.
[0099] In some embodiments, the window management module may further determine the display mode of the target application interface; when the display mode of the target application interface is the same as that of the first application interface, it is determined that the target application interface can completely cover the first application interface. When the display mode of the target application interface is different from that of the first application interface, it is determined that the target application interface cannot completely cover the first application interface.
[0100] Exemplarily, when the display mode of the target application interface is different from that of the first application interface, if the display mode of the target application interface is pop-up display or floating window display. Since generally, both the pop-up window and the floating window are displayed on the first application interface and cannot completely cover the first application interface, it can be determined that the target application interface cannot completely cover the first application interface.
[0101] In some embodiments, when the application theme is a transparent theme, the subsequent steps are continued according to the process Figure 1 shown above, that is, the window management module may request the activity corresponding to the target application function, and go through the life cycle of the activity corresponding to the application function, then draw the target application interface corresponding to the activity, and after the drawing of the target application interface is completed, the System UI plays an interface switching animation to display the target application interface.
[0102] Step 1106: When it is determined that the target application interface can completely cover the first application interface, the window management module may load a transition interface according to the display form of the first application interface.
[0103] It should be noted that the display form of the first application interface includes that the first application interface is displayed in a split-screen form (that is, the first application interface includes application interfaces displayed in a split-screen manner), or the first application interface is displayed full-screen, etc. Among them, the first application interface including application interfaces displayed in a split-screen manner means that at least two application interfaces of an application program are displayed on the display screen of the electronic device, and the at least two application interfaces are displayed in a split-screen manner, and the at least two application interfaces together constitute the first application interface.
[0104] In some embodiments, when the first application interface includes application interfaces displayed in a split-screen manner, the window management module may load the transition interface into the activity corresponding to the target application function. When the display form of the first application interface is that the first application interface is displayed full-screen, the window management module may load the transition interface into the activity or task corresponding to the target application function.
[0105] It should be noted that the function for loading the transition interface may be addStartingWindow().
[0106] When the first application interface includes an application interface displayed in a split-screen manner, if the activity corresponding to the target application function is loaded into the task corresponding to the target application function, then during the subsequent process of playing the interface switching animation, the transition interface will completely cover the display screen, that is, the interface that does not require the interface switching animation in the split-screen display will also be covered by the transition interface, resulting in a poor interface display effect. Therefore, in order to improve the interface display effect, when the first application interface includes an application interface displayed in a split-screen manner, the window management module can load the transition interface into the activity corresponding to the target application function.
[0107] Step 1107: The window management module sends a loading message to the screen drawing module.
[0108] It should be noted that this loading message is used to indicate that the transition interface has been loaded.
[0109] Step 1108: When receiving the loading message, the screen drawing module can determine the theme color of the application.
[0110] Since the user may set the application theme or set the usage mode of the electronic device (the usage mode includes dark mode and light mode). As described above, when the application themes of the application are different, the theme colors of the application are different, and when the electronic device is in different usage modes, the theme colors of the application are also different. For example, when the usage mode is dark mode, the theme color of the application is dark gray, and when the usage mode is switched to light mode, the theme color of the application is light gray. If the interface color of the transition interface is randomly set, then during the subsequent process of playing the interface switching animation, the interface color jump will occur. Therefore, in order to ensure the smoothness of the interface switching animation during the subsequent playing of the interface switching animation, the window management module can determine the theme color of the application.
[0111] Step 1109: The screen drawing module can set the interface color of the transition interface to the theme color.
[0112] It is worth noting that by setting the interface color of the transition interface to the theme color, the smoothness of the interface switching animation is ensured.
[0113] Step 1110: The screen drawing module sends a window setting message to the window setting module.
[0114] It should be noted that this window setting message is used to indicate setting the window attributes of the transition interface. The window attributes of the transition interface include the layer where the transition interface is located, the display mode, etc.
[0115] Step 1111: When the window setting module receives a window setting message, it sets the window attributes of the transition interface.
[0116] As an example, the window setting module can set the display mode of the transition interface to be displayed according to a preset animation effect. The preset animation effect is an oval gradient effect. The oval gradient effect is an effect in which the target application interface gradually changes from top to bottom in the shape of an oval, which is equivalent to the transition interface gradually disappearing from top to bottom in the shape of an oval. Or, the preset animation effect is an animation effect in which the target application interface gradually appears from nothing, which is equivalent to the transition interface gradually disappearing from being there.
[0117] In some embodiments, the window setting module can set the transition interface to be displayed according to a preset animation effect by setting the FLAG information of the transition interface. Or, the window setting module can cancel all FLAG settings in the transition interface to set the transition interface to be displayed according to a preset animation effect. The cancellation function for canceling the FLAG setting can be FLAG_IS_BEHIND_STARTING_WINDOW(). The embodiments of the present application do not make specific limitations on this.
[0118] In some embodiments, the window setting module may also not set the display mode of the transition interface. In this way, the display mode of this transition interface can be default to be the same as that of other interfaces, that is, the transition interface will not be displayed according to a preset animation effect.
[0119] Step 1112: The window setting module sends an animation playback request to the system application and sends an activity start message to the application.
[0120] Step 1113: The application starts the Activity corresponding to the target application function.
[0121] It should be noted that the window setting module can send an animation playback request to the system application before starting the activity corresponding to the target application function, or can also send an animation playback request to the system application after the application starts the activity corresponding to the target application function. The embodiments of the present application do not make specific limitations on this.
[0122] Step 1114: After going through the life cycle of the activity corresponding to the target application function, the application draws the target application interface.
[0123] Step 1115: When the drawing of the target application interface is completed, the application sends a drawing completion message to the system application through the system service.
[0124] Step 1116: When the system application receives an animation playback request, it plays the exit animation of the first application and the display animation of the transition interface in sequence.
[0125] Exemplarily, this scenario can refer to the application scenario shown in Figure (b) above. Figure 6 in the above.
[0126] Step 1117: When the system application receives a drawing completion message, it plays the animation of switching from the transition interface to the target application interface.
[0127] As can be seen from the above, the transition interface may be set to be displayed according to a preset animation effect, or it may not be set to be displayed according to the preset animation effect. In the case where the transition interface is set to be displayed according to the preset animation effect, the exit animation of the transition interface and the display animation of the target application interface are played in sequence according to the preset animation effect. Exemplarily, this scenario can refer to the application scenario shown in Figure (c) above or Figure 7 in the above. Figure 8 Figure (a) shown in the above. In the case where the transition interface is not set to be displayed according to the preset animation effect, the exit animation of the transition interface and the display animation of the target application interface are played in sequence, and there is no animation effect during the playback. Exemplarily, this scenario can refer to the application scenario shown in Figure (c) above. Figure 6 in the above.
[0128] It should be noted that the animation of switching from the first application interface to the transition interface and the animation of switching from the transition interface to the target application interface are continuous.
[0129] As an example, the system application may start playing the animation of switching from the transition interface to the target application interface before completely playing the animation of switching from the first application interface to the transition interface. Therefore, during the playback of the interface switching animation, there may be a scenario where the exit animation of the first application interface, the exit animation of the transition interface, and the display animation of the target application interface are played simultaneously.
[0130] In the embodiments of the present application, since after the target application function is triggered, the interface switching animation is not played after the target application interface is drawn, but during the process of drawing the target application interface, the interface switching animation is already being played, thus advancing the playback timing of the interface switching animation, that is, advancing the response display timing of the trigger operation of the target application function, improving the response speed of the electronic device to the trigger operation of the application function, and increasing user stickiness.
[0131] Based on the above embodiments, next, another method for responding to an application function provided by the embodiments of the present application will be introduced. Please refer to Figure 12 , Figure 12It is a schematic flowchart of a response method for another application function shown according to an exemplary embodiment. This method can be executed by the above-mentioned electronic device, and this method may include the following parts or all of the content:
[0132] Step 1201: After receiving a trigger operation for a target application function in a first application interface of an application, draw a target application interface corresponding to the target application function.
[0133] It should be noted that the target application function is a function in the application, and according to different applications, the target application function is also different. In addition, after the target application function is triggered, an interface switch can occur in the application. For example, in the case where the application is a shopping application, the target application function can be an item search function, etc.; in the case where the application is a news application, the target application function can be an exhibition function for any news information, etc. Exemplarily, this scenario can refer to the application scenario shown in the above figure Figure 9 In the case where the application is a social application, the target application function can be a life status exhibition function, etc. Exemplarily, this scenario can refer to the above Figure 6 shown application scenario.
[0134] In some embodiments, receiving a trigger operation for a target application function in the first application interface may refer to the electronic device receiving an operation that triggers a control corresponding to the target application function in the first application interface, or it may also refer to the electronic device detecting a gesture posture that triggers the target application function in the first interface. The embodiments of the present application do not make specific limitations on this.
[0135] As an example, after receiving a trigger operation for a target application function in the first application interface of an application, referring to Figure 13 , the electronic device can pause the activity of the first application interface and request the activity corresponding to the target application function. After experiencing the life cycle of the activity corresponding to the target application function, the electronic device can draw the target application interface corresponding to the target application function. Exemplarily, this process can refer to the operations in step 1101-step 1103 and step 1113-step 1114 above, and the embodiments of the present application will not elaborate on this one by one.
[0136] In some embodiments, after receiving a trigger operation for a target application function in the first application interface of an application, the electronic device can not only draw the target application interface, but also load a transition interface.
[0137] It should be noted that the electronic device can load the transition interface before going through the life cycle of the activity corresponding to the target application function (that is, before starting the activity corresponding to the target application function). Or, during the process of going through the life cycle of the activity corresponding to the target application function, load the transition interface. Or, after going through the life cycle of the activity corresponding to the target application function and before learning the target application interface, load the transition interface. The embodiments of the present application do not make specific limitations on this.
[0138] Exemplarily, referring to Figure 13 , after the electronic device receives a trigger operation for the target application function in the first application interface of the application, it can load the transition interface during the process of going through the life cycle of the activity corresponding to the target application function.
[0139] In some embodiments, when the electronic device is a folding screen or a tablet computer, and the first application interface includes an application interface displayed in a split-screen manner, after receiving a trigger operation for the target application function in the first application interface, mount the transition interface to the activity corresponding to the target application interface. When the electronic device is not a folding screen or a tablet computer, or when the electronic device is a folding screen or a tablet computer and the first application interface is a full-screen displayed application interface, after the electronic device receives a trigger operation for the target application function in the first application interface, it can mount the transition interface to the activity or task corresponding to the target application interface.
[0140] It should be noted that the first application interface including an application interface displayed in a split-screen manner means that at least two application interfaces of the application program are displayed on the display screen of the electronic device, and the at least two application interfaces are displayed in a split-screen manner, and the at least two application interfaces together constitute the first application interface.
[0141] Since when the electronic device is a folding screen or a tablet computer and the first application interface includes an application interface displayed in a split-screen manner, that is, when at least two application interfaces are split-screen displayed on the display screen, if the transition interface is mounted to the task corresponding to the target application interface, then during the subsequent interface switching process, the transition interface will completely cover the first application interface, resulting in a problem of unsmooth switching of the switching screen.
[0142] It is worth noting that when the first application interface includes an application interface displayed in a split-screen manner, by mounting the transition interface to the activity corresponding to the target application interface, it is ensured that during the interface switching, the transition interface will not completely cover the first application interface, guaranteeing the smoothness of the switching screen during the interface switching process.
[0143] As an example, after the electronic device receives a trigger operation for a target application function in the first application interface, it can determine the application theme of the application program; in the case where the application theme is not a transparent theme, a transition interface is loaded.
[0144] As can be seen from the above, users may set the application theme of the application program according to their own preferences or usage habits. Different application themes can change the styles of information such as the icons, application interfaces, and displayed text of the application program. For example, if the application theme of the application program is a deep - sea theme, then the application interface of the application program may be dark blue; if the application theme of the application program is a calligraphy theme, then the application interface of the application program is dark gray or light yellow, and patterns related to calligraphy are displayed in the application interface. In the case where the application theme is a transparent theme, the application interface of the application program is transparent.
[0145] Since in the case where the application theme is a transparent theme, if an interface switch occurs, the transition interface cannot be reflected during the interface switch process. Thus, after the timing of playing the interface - switching animation in advance, although it can be achieved, because the transition interface will also be transparent, the user will feel that the interface - switching process is not smooth, that is, the playback effect of the interface - switching animation is not ideal. Therefore, in order to improve the playback effect of the interface - switching animation, the electronic device can also determine the application theme of the application program and load a transition interface in the case where the application theme is not a transparent theme.
[0146] It should be noted that the operation of the electronic device to determine the application theme of the application program can refer to the operation of the window management module to determine the application theme in step 1104 above, and this application embodiment will not elaborate on it one by one.
[0147] It is worth noting that by loading the transition interface when the application theme of the application program is not a transparent theme, the loading of the transition interface is more reasonable, and the playback effect of the subsequent interface - switching animation is improved.
[0148] In some embodiments, in the case where the application theme of the application program is a transparent theme, the electronic device can continue with the subsequent steps according to the Figure 1 process shown above, that is, the electronic device can go through the life cycle of the activity corresponding to the application function, then draw the target application interface corresponding to the activity, and after the target application interface is drawn, play the interface - switching animation to display the target application interface.
[0149] As an example, when the application theme of the electronic device is not a transparent theme and the first application interface is a full-screen display application interface, the electronic device can further determine whether the target application interface can completely cover the first application interface. If it can completely cover the first application interface, the transition interface is loaded; if it cannot completely cover the first application interface, the electronic device proceeds with the subsequent steps according to the Figure 1 process shown above.
[0150] In some embodiments, when the first application interface is a full-screen display application interface and the application theme is not a transparent theme, the electronic device can determine the size of the target application interface; when the size of the target application interface indicates that the target application interface can completely cover the first application interface, the transition interface is loaded.
[0151] It should be noted that when the size of the target application interface is greater than or equal to that of the first application interface, it can be determined that the size of the target application interface indicates that the target application interface can completely cover the first application interface. When the size of the target application interface is less than that of the first application interface, it is determined that the size of the target application interface indicates that the target application interface cannot completely cover the first application interface.
[0152] It is worth noting that by loading the transition interface when the target application interface can completely cover the first application interface, the loading of the transition interface is more reasonable, improving the playback effect of the subsequent interface switching animation.
[0153] In some embodiments, the electronic device can also determine whether the target application interface can completely cover the first application interface in other ways. Exemplarily, the electronic device can determine the display mode of the target application interface; when the display mode of the target application interface is the same as that of the first application interface, it is determined that the target application interface can completely cover the first application interface. When the display mode of the target application interface is different from that of the first application interface, it is determined that the target application interface cannot completely cover the first application interface.
[0154] As can be seen from the above, the first application interface may include application interfaces displayed in a split-screen manner, that is, the first application interface includes at least two application interfaces. Then, to ensure the smooth playback of the interface switching animation, after the electronic device determines the size of the target application interface, if the size of the target application interface is greater than or equal to the size of the application interface to be switched, the transition interface is loaded into the activity corresponding to the target application interface. If the size of the target application interface is less than the size of the application interface to be switched, then according to the Figure 1 process shown above, the switching between the application interface to be switched and the target application interface is completed. The application interface to be switched is the interface that switches with the target application interface.
[0155] In some embodiments, after the electronic device loads the transition interface, it can also obtain the theme color of the application program; and set the interface color of the transition interface to the theme color.
[0156] It should be noted that by setting the interface color of the transition interface to the theme color, during the process of playing the interface switching animation, the situation of color jump and resulting in unsmooth playback will not occur.
[0157] In some embodiments, after the electronic device loads the transition interface, it can also set the display mode of the transition interface to be displayed according to a preset animation effect. The preset animation effect is an oval gradient effect. The oval gradient effect is an effect in which the target application interface gradually changes from top to bottom in the shape of an oval, or the preset animation effect is an animation effect in which the target application interface gradually appears from nothing.
[0158] In some embodiments, the electronic device can set the information of the FLAG of the transition interface to set the transition interface to be displayed according to a preset animation effect. Or, the window setting module can cancel all the FLAG settings in the transition interface to set the transition interface to be displayed according to a preset animation effect.
[0159] It should be noted that by setting the display mode of the transition interface to a preset animation effect, the richness of playing the transition interface is improved.
[0160] Step 1202: During the process of drawing the target application interface, play the interface switching animation.
[0161] It should be noted that the interface switching animation includes the animation of switching from the first application interface to the transition interface, and the animation of switching from the transition interface to the target application interface when the drawing of the target application interface is completed. The transition interface can be an interface that does not display any content.
[0162] It should be noted that by setting the transition interface to an interface that does not display any content, the smoothness of playing the interface switching animation is improved.
[0163] In some embodiments, in order to reflect the personalization of the interface switching process, the transition interface can also be set with display content. For example, the transition interface can be set with a preset pattern, text, etc. The embodiments of the present application do not make specific limitations on this.
[0164] In some embodiments, during the process of rendering the target application interface, the operation of playing the interface switching animation includes: during the process of rendering the target application interface, sequentially playing the exit animation of the first application interface and the display animation of the transition interface; when the target application interface is rendered, playing the animation of switching from the transition interface to the target application interface. Exemplarily, refer to Figure 13 。
[0165] It should be noted that the completion of rendering the target application interface may mean that the first N frames of the display animation corresponding to the target application interface are rendered, where N can be a positive integer greater than or equal to 1. Or, the completion of rendering the target application interface may also mean that all the frame images related to the target application interface are rendered. Generally, in order to ensure the continuity of the interface switching animation, the completion of rendering the target application interface may mean that the first frame of the display animation corresponding to the target application interface is rendered.
[0166] It is worth noting that since during the process of rendering the target application interface, the interface switching animation can already be played, rather than playing the interface switching animation after the target application interface is rendered, the playing time of the interface switching animation is advanced in this way, that is, the response time to the trigger operation is advanced in the display interface, thereby improving the user experience and increasing user stickiness.
[0167] In some embodiments, when the target application interface is rendered, the electronic device may sequentially play the exit animation of the transition interface and the display animation of the target application interface according to a preset animation effect; wherein, the preset animation effect is an oval gradient effect, and the oval gradient effect is an effect in which the target application interface gradually changes and is displayed in an oval shape from top to bottom, or the preset animation effect is an animation effect in which the target application interface gradually appears from nothing.
[0168] It is worth noting that in the case where the preset animation effect is an animation effect in which the target application interface gradually appears from nothing, it is possible to improve the screen flashing problem that may be perceived by highly sensitive users in the case of no animation effect.
[0169] Step 1203: Display the target application interface.
[0170] In the embodiments of the present application, since after the target application function is triggered, the interface switching animation is not played after the target application interface is rendered, but during the process of rendering the target application interface, the interface switching animation is already being played, thus advancing the playing time of the interface switching animation, that is, advancing the response display time to the trigger operation of the target application function, improving the response speed of the electronic device to the trigger operation of the application function, and increasing user stickiness.
[0171] Next, after a detailed explanation of the response method for the application functions provided in the embodiments of the present application, the electronic devices involved in the embodiments of the present application will be described.
[0172] As an example, this method can be applied to an electronic device installed with an application program, and an interface switching event will occur within the application program. By way of example and not limitation, the electronic device can be, but is not limited to, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a mobile phone (including a mobile phone with a folding screen), a smart watch, etc. The embodiments of the present application do not make any limitations in this regard.
[0173] Figure 14 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Refer to Figure 14 , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0174] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0175] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0176] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0177] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0178] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0179] The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor, baseband processor, etc.
[0180] The electronic device 100 implements the display function through the GPU, display screen 194, application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0181] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is an integer greater than 1.
[0182] The electronic device 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
[0183] The internal memory 121 can be used to store computer-executable program code, and the computer-executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0184] The electronic device 100 can implement audio functions, such as music playback, recording, etc., through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0185] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can include at least two parallel plates with conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations with the same touch position but different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the pressure threshold acts on the short message application icon, the instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
[0186] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0187] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch screen, also known as the "touch screen", is composed of the touch sensor 180K and the display screen 194. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a different position from the display screen 194.
[0188] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys or touch keys. The electronic device 100 can receive key inputs and generate key signal inputs related to the user settings and function control of the electronic device 100.
[0189] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a Digital Versatile Disc (DVD)), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.
[0190] The above are the optional embodiments provided by the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the scope of the technology disclosed in the present application shall be included in the protection scope of the present application.
Claims
1. A response method for application functions, characterized in that, Applied to an electronic device, the method includes: After receiving a trigger operation for a target application function in a first application interface of an application, draw a target application interface corresponding to the target application function, where the target application function is a function in the application; During the process of drawing the target application interface, play an interface switching animation, where the interface switching animation includes an animation of switching from the first application interface to a transition interface, and an animation of switching from the transition interface to the target application interface when the target application interface is drawn; Display the target application interface.
2. The method according to claim 1, characterized in that Before playing the interface switching animation during the process of drawing the target application interface, it further includes: After receiving a trigger operation for the target application function in the first application interface, load the transition interface; Playing the interface switching animation during the process of drawing the target application interface includes: During the process of drawing the target application interface, sequentially play the exit animation of the first application interface and the display animation of the transition interface; When the target application interface is drawn, play the animation of switching from the transition interface to the target application interface.
3. The method according to claim 2, wherein Loading the transition interface after receiving a trigger operation for the target application function in the first application interface includes: After receiving a trigger operation for the target application function in the first application interface, determine the application theme of the application; When the application theme is not a transparent theme, load the transition interface.
4. The method according to claim 3, characterized in that The first application interface is a full-screen display application interface; loading the transition interface when the application theme is not a transparent theme includes: When the application theme is not a transparent theme, determine the size of the target application interface; When the size of the target application interface indicates that the target application interface can completely cover the first application interface, load the transition interface.
5. The method according to claim 2, characterized in that, Playing the animation of switching from the transition interface to the target application interface when the target application interface is drawn includes: When the target application interface is drawn, sequentially play the exit animation of the transition interface and the display animation of the target application interface according to a preset animation effect; Wherein, the preset animation effect is an oval gradient effect, and the oval gradient effect is an effect that the target application interface gradually changes and displays in an oval shape from top to bottom, or the preset animation effect is an animation effect that the target application interface gradually appears from nothing.
6. The method according to any one of claims 1-5, characterized in that, Before playing the interface switching animation during the process of drawing the target application interface, it further includes: Obtain the theme color of the application; Set the interface color of the transition interface to the theme color.
7. The method according to any one of claims 2-6, characterized in that, The first application interface includes an application interface displayed in a split-screen manner; Loading the transition interface after receiving a trigger operation for the target application function in the first application interface includes: After receiving a trigger operation for the target application function in the first application interface, mount the transition interface to the activity corresponding to the target application interface.
8. The method according to any one of claims 1-7, characterized in that, Before playing the interface switching animation during the process of drawing the target application interface, it further includes: Set the display mode of the transition interface to be displayed according to a preset animation effect, where the preset animation effect is an oval gradient effect. The oval gradient effect is an effect in which the target application interface gradually changes from top to bottom in the shape of an oval, or the preset animation effect is an animation effect in which the target application interface gradually appears from nothing.
9. An electronic device, characterized in that, The structure of the electronic device includes a processor and a memory; The memory is used to store a program that supports the electronic device to execute the method described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium, and when it runs on a computer, it causes the computer to execute the method described in any one of claims 1-8.