An interface switching method, device, storage medium and program product
By detecting the user's desktop return operation and obtaining application information and task stack information, the problem of electronic devices being unable to return to the desktop application icon during interface switching is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202411350415.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-09-26
AI Technical Summary
In applications on electronic devices, existing technologies cannot return to the interface where the desktop application icon is located during interface switching.
By detecting the user's desktop return operation, the system obtains application information and task stack information, determines the current application status, and directly returns to the interface where the desktop application icon is located.
This feature allows users to directly return to the desktop application icon while an animation is playing on an electronic device, improving the user experience.
Smart Images

Figure CN119396505B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an interface switching method, device, storage medium, and program product. Background Technology
[0002] Mobile phones and other electronic devices typically have multiple applications (apps) installed. Users can launch these applications by clicking their home screen icons. When the electronic device detects this click, it first plays an opening animation, gradually enlarging the animation to fill the entire screen before finally displaying the application interface. For example... Figure 1 As shown in Figure (a), the user can click the desktop application icon 102 on the interface 101 of the phone 100 to trigger the phone 100 to launch the corresponding "email" application. Next, as... Figure 1 As shown in Figures (b) and (c), after detecting the user's click operation, the mobile phone 100 will display an opening animation screen 103 and gradually enlarge the opening animation screen 103 to occupy the entire screen of the mobile phone 100 in order to provide the user with a visual buffer.
[0003] The desktop of an electronic device can include a central desktop and several other interfaces. The central desktop refers to the interface that is directly visible when the electronic device is powered on. Specifically, after the electronic device has fully opened an application's interface (i.e., after the animation playback is complete), if a user's swipe-up back operation is detected, the electronic device can return to the interface where the application's desktop icon is located. For example, still using... Figure 1 For example, in the email application, when Figure 1 As shown in Figure (c), the opening animation 103 gradually enlarges to occupy the entire screen of the phone 100, the phone 100 can then display the following... Figure 2 The application interface 105 is shown in Figure (a). At this time, if the mobile phone 100 detects the user's swipe-up return operation, such as... Figure 2 As shown in Figure (b), the mobile phone 100 will return the interface to the interface 101 with the email application icon 102.
[0004] However, if a user's back action is detected while the application interface is not fully open on the electronic device—that is, while the device is playing the opening animation—the device will return to the home screen from the opening animation screen, and will not return to the screen where the application icon is located. For example, as... Figure 1 As shown in Figure (c), the mobile phone 100 detected the user's swipe-up-to-go-back operation during the display of the opening animation screen 103. At this time, as shown in Figure (c), the mobile phone 100 detected the user's swipe-up-to-go-back operation during the display of the opening animation screen 103. Figure 1As shown in (d) of FIG. 1, the mobile phone 100 can return the screen picture to the center desktop 104. It can be seen that when the user performs the up-swipe return operation to interrupt the playing of the opening animation, the mobile phone 100 cannot directly return to the interface 101 where the desktop application icon 102 of the email application is located. SUMMARY
[0005] To solve the above problems, the present application provides an interface switching method, device, storage medium and program product.
[0006] In a first aspect, the present application provides an interface switching method applied to an electronic device, the method comprising: detecting an opening instruction of a first application program, playing a first animation of the first application program, wherein a first icon of the first application program is located on a first desktop, and the first desktop is different from a center desktop of the electronic device; detecting a desktop return operation of a user during the playing of the first animation; returning to the first desktop corresponding to the stack top information of the running task information of the electronic device being the same as the application information of the first application program; and displaying the first desktop corresponding to the position information of the first icon based on the position information of the first icon corresponding to the stack top information of the running task information of the electronic device being different from the application information of the first application program.
[0007] In the present application, the first application program can be the application program to be started mentioned in the present application; the first icon can be the desktop application icon of the first application program mentioned in the present application; the first desktop can be the desktop interface where the first icon is located mentioned in the present application; and the first animation can be the opening animation mentioned in the present application.
[0008] In some embodiments, when the electronic device detects the operation of the user clicking the desktop application icon, the electronic device will first play the opening animation, gradually enlarge the picture related to the opening animation to occupy the entire screen, and then display the application program interface. During the playing of the opening animation, if the return desktop operation of the user is detected, the electronic device will obtain the application information corresponding to the recorded preview animation. If it is determined that the current stack top information and the application information corresponding to the preview animation are the same, that is, the current opening window animation is being played or the application interface of the application program has been opened, the current foreground application with which the user is interacting is the application program, and the return desktop operation of the user is detected by the application program, the electronic device will return to the interface where the desktop application icon of the application program is located based on the stack top information. If it is determined that the stack top information and the application information corresponding to the preview animation are different, that is, the preview animation is still being played, the current foreground application with which the user is interacting is still the desktop, and the return desktop operation of the user is detected by the desktop, the electronic device will obtain the icon position in the application information, and directly switch the interface to the interface where the icon position is located.
[0009] Therefore, in the process of playing the opening animation, if the return-to-desktop operation of the user is detected, the electronic device returns to the interface where the desktop application icons are located.
[0010] In a possible implementation of the first aspect, the method further includes: detecting an opening instruction for the first application program, and recording application information of the first application program, the application information including position information of a first icon corresponding to the first application program.
[0011] In some embodiments, the electronic device plays the preview animation after detecting the operation of the user clicking the desktop application icon. Therefore, when the electronic device detects the operation of the user clicking the desktop application icon, the electronic device can record the application information of the application program to be started, for example, the position of the desktop application icon corresponding to the application program, the application package name corresponding to the desktop application icon, and the like.
[0012] In a possible implementation of the first aspect, the return-to-desktop operation can include any one of a bottom-up sliding return-to-desktop operation, an edge-side sliding return-to-desktop operation, and a click-main-key return-to-desktop operation.
[0013] In some embodiments, in the process of playing the first animation, the user can return to the first desktop through a plurality of return-to-desktop operations, which are not limited in the present application.
[0014] In a possible implementation of the first aspect, the return-to-desktop operation is the bottom-up sliding return-to-desktop operation, and the detection of the return-to-desktop operation of the user in the process of playing the first animation includes: detecting, in the process of playing the first animation, a touch-screen operation of the user on the bottom hot area of the electronic device; obtaining an operation gesture of the user on the bottom hot area, and in a case where it is determined that the operation gesture is an up-sliding operation, detecting the return-to-desktop operation of the user.
[0015] In some embodiments, the bottom hot area refers to an area below the screen of the electronic device that can interact with the user. In the process of playing the opening animation of the application program, when the electronic device detects the operation of the user pressing the screen on the bottom hot area of the screen, it means that the electronic device detects that the bottom hot area is triggered. At this time, the electronic device can trigger the related task of the up-sliding return-to-desktop operation. After the bottom hot area is triggered, the electronic device can obtain the operation gesture of the user on the bottom hot area. If the operation gesture is the same as a specific operation gesture (up-sliding operation gesture), it means that the electronic device detects the bottom-up sliding return-to-desktop operation of the user.
[0016] In a possible implementation of the first aspect, the method further includes: detecting a lifting action event of the user's desktop return operation, and obtaining stack top information of the task information currently running in the electronic device.
[0017] In some embodiments, after detecting the lifting operation in the user's upslide return operation, the electronic device can further call the system-side interface again to obtain the stack top information in the task information currently running. The stack top information stores information of a foreground application currently interacting with the user. For example, as shown in (a) of FIG. 10 below, if the mobile phone 100 displays the desktop interface 401 in the process of playing music, both the desktop 401 and the music application are currently running tasks. However, since the user performs the upslide operation in the desktop interface 401, the task currently interacting with the user is the desktop, and the stack top information in the task information currently running is the task information (such as a package name used to uniquely identify the desktop) corresponding to the desktop. Figure 4
[0018] In a possible implementation of the first aspect, when the stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application, returning to the first desktop includes: when the stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application, returning to the first desktop in response to the desktop return operation of the first application.
[0019] In some embodiments, when the electronic device determines that the stack top information of the task information currently running is the same as the application information of the preview animation, that is, the start window animation is currently playing or the application interface of the application has been opened, and the foreground application currently interacting with the user is the application, the application detects the return desktop operation of the user. Then, the electronic device can directly respond to the desktop return operation instruction of the first application, that is, directly run the related code of the electronic device for exiting the application, so as to return to the interface where the desktop application icon is located.
[0020] In a possible implementation of the first aspect, when the stack top information corresponding to the task information currently running in the electronic device is different from the application information of the first application, displaying the first desktop corresponding to the position information based on the position information of the first icon includes: when the stack top information corresponding to the task information currently running in the electronic device is the desktop information of the electronic device, determining that the stack top information of the task information currently running in the electronic device is different from the application information of the first application; obtaining the position information of the first icon corresponding to the first application in the application information of the first application recorded by the electronic device, and switching the display interface of the electronic device to the first desktop corresponding to the position information.
[0021] In some embodiments, if it is determined that the top-of-stack information and the application information corresponding to the preview animation are different, i.e., the preview animation is still being played, the foreground application currently being interacted with by the user is still the desktop, and the desktop detects the return-to-desktop operation of the user, the electronic device obtains the icon position in the application information and directly switches the interface to the interface in which the icon position is located.
[0022] In this way, by using the above interface switching method, if the return-to-desktop operation of the user is detected during the process in which the electronic device plays the opening animation, the electronic device returns to the interface in which the desktop application icon is located.
[0023] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device and is used to execute the interface switching method mentioned in the present application.
[0024] In a third aspect, the present application provides a readable storage medium, and the readable storage medium stores instructions, and the instructions are executed on the electronic device to make the electronic device execute the interface switching method mentioned in the present application.
[0025] In a fourth aspect, the present application provides a computer program product, comprising: computer instructions, when the computer instructions are executed on the electronic device, the electronic device executes the interface switching method mentioned in the present application.
[0026] The beneficial effects of the above-mentioned second aspect to fourth aspect can refer to the related description in the above-mentioned first aspect and various possible implementations of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 According to some embodiments of the present application, an application scenario diagram for interrupting the playing of an opening animation is shown.
[0028] Figure 2 According to some embodiments of the present application, an application scenario diagram for returning to an interface in which a desktop application icon is located is shown.
[0029] Figure 3 According to some embodiments of the present application, a flow diagram of an up-slip return operation is shown.
[0030] Figure 4 According to some embodiments of the present application, an application scenario diagram for switching to a center desktop is shown.
[0031] Figure 5 According to some embodiments of the present application, a scenario diagram for interrupting the playing of an opening animation and returning to an interface in which a desktop application icon is located is shown.
[0032] Figure 6 According to some embodiments of the present application, a flowchart of an interface switching method is shown;
[0033] Figure 7 According to some embodiments of the present application, a specific flowchart of an interface switching method is shown;
[0034] Figure 8 According to some embodiments of the present application, a system architecture diagram of an electronic device is shown;
[0035] Figure 9 According to some embodiments of the present application, an interaction flowchart of an interface switching method is shown;
[0036] Figure 10 According to some embodiments of the present application, a hardware structure diagram of an electronic device is shown. DETAILED DESCRIPTION
[0037] The illustrative embodiments of the present application include, but are not limited to, an interface switching method, device, storage medium and program product.
[0038] First, the processing procedure of the user exiting the application program through the upslide return operation is described in combination with the flowchart shown in Figure 3 . Specifically, the processing procedure is as follows:
[0039] S301: The electronic device detects that the user triggers the bottom hot area.
[0040] In some examples, the hot area refers to an area in the screen of the electronic device that can interact with the user, and when the user touches or clicks the hot area, the electronic device will trigger a specific application function or service. Among them, the bottom hot area refers to an area below the screen of the electronic device that can interact with the user. When the electronic device detects that the user presses the screen in the bottom hot area of the screen, it means that the user triggers the bottom hot area of the electronic device. At this time, the electronic device can trigger the relevant tasks of the upslide return operation described below. For example, as shown in (c) of the above Figure 1 , the operation area of the user upslide return (below the screen of the mobile phone 100) is the bottom hot area of the mobile phone 100, and when the mobile phone 100 detects that the user presses the screen in this area, it means that the user triggers the bottom hot area of the mobile phone 100.
[0041] S302: The electronic device calls the system side interface to obtain the task information currently running.
[0042] In some examples, the system side interface can be an application programming interface (API), and the electronic device can access and obtain a running task information (RunningTaskInfo) object in the system through the API provided by the system. The running task information (RunningTaskInfo) object stores task information of tasks currently running on the electronic device. The application opened by the user can be a task currently running, and the task information can include a package name for identifying the application and a state of the application (the state can be running). For example, the electronic device detects that the user views a webpage through a browser while playing music, and the music application and the browser application are both tasks currently running, and the running task information (RunningTaskInfo) object stores task information (a unique package name, etc.) corresponding to the music application and task information corresponding to the browser application. In addition, when the electronic device detects that the user performs an operation on the desktop, the desktop of the electronic device can also be a task currently running.
[0043] S303: The electronic device determines whether the specific gesture operation has been started and not ended. If yes, go to S305; if no, go to S304.
[0044] In some examples, the specific gesture operation can be a predefined upslide operation. In S301, the electronic device has detected that the user triggers the bottom hot area, and if the specific gesture operation (upslide operation) has started and not ended, it means that the electronic device detects that the user is performing an upslide operation, and then S305 is executed to perform a task related to the upslide return operation.
[0045] In some examples, if the user has not started to perform the upslide operation, or the user has ended the upslide operation before the electronic device starts to detect, the electronic device cannot determine that the user operation is an upslide operation. Then the electronic device can perform S304 to create an input object of another type, for example, an input object of a click operation type.
[0046] S304: The electronic device creates an input object of another type.
[0047] In some examples, if the user has not started to perform the upslide operation, or the user has ended the upslide operation before the electronic device starts to detect whether the user performs a sliding operation, the electronic device cannot determine that the user operation is an upslide operation in S303. At this time, the electronic device can perform a task of another operation type (such as a long press operation) different from the upslide operation, for example, create an input object of another operation type different from the upslide operation, such as an input object of a long press operation type.
[0048] S305: The electronic device caches the top stack information.
[0049] In some examples, when the electronic device determines that the user is performing the upswipe operation through S303 described above, the electronic device can create a program class (OtherActivityInputConsumer) and cache the top stack information in the running task information (RunningTaskInfo) obtained through S302 described above in the program class. The top stack information stores the information of the foreground application that is currently interacting with the user. For example, as shown in (a) of FIG. 1 1, if the phone 100 displays the desktop interface 401 in the process of playing music, both the desktop 401 and the music application are currently running tasks. However, since the user performs the upswipe operation in the desktop interface 401, the task that is currently interacting with the user is the desktop, and thus the top stack information in the currently running task information is the task information corresponding to the desktop (e.g., the package name used to uniquely identify the desktop). Figure 4
[0050] For another example, as shown in (a) of FIG. 12, if the phone 100 displays the email application interface 105 in the process of playing music, both the email application and the music application are currently running tasks. However, since the user performs the upswipe operation in the email application interface 105, the task that is currently interacting with the user is the email application, and thus the top stack information in the currently running task information is the task information corresponding to the email application (e.g., the package name used to uniquely identify the email application). Therefore, the top stack information can be the information of the application that is currently interacting with the user, or the information of the desktop that is currently interacting with the user. Figure 2
[0051] S306: The electronic device detects the up operation of the user.
[0052] In some examples, the upswipe operation of the user can include a finger down operation, a sliding operation, and an up operation, and the electronic device can determine that the user has completed the upswipe operation when detecting the up operation of the user.
[0053] S307: The electronic device executes the related instructions corresponding to the upswipe operation.
[0054] In some examples, the electronic device can determine that the user has completed the up-swipe operation when detecting the user's up-hand operation, and trigger the electronic device to execute the up-swipe operation related instruction. The up-swipe operation related instruction can include S308 and S309 described below, or the up-swipe operation related instruction can also include S308 and S310 described below.
[0055] S308: The electronic device determines whether the current stack top information is a desktop. If yes, go to S309; if no, go to S310.
[0056] In some examples, in S305 described above, the electronic device has cached the stack top information, and the stack top information refers to the information of the foreground application currently interacting with the user. Therefore, the electronic device can determine whether the foreground application currently interacting with the user is a desktop based on the stack top information. If yes, go to S309 to switch to the center desktop of the electronic device; if no, go to S310 to return to the interface where the desktop application icon of the application program is located.
[0057] S309: The electronic device switches to the center desktop.
[0058] In some examples, when the electronic device determines that the foreground application currently interacting with the user is a desktop through S308 described above, that is, the user performs the up-swipe operation on the desktop, the electronic device will switch from the current desktop interface to the center desktop. The center desktop refers to the interface that can be directly seen when the electronic device is powered on. For example, as shown in (a) of FIG. 1, when the mobile phone 100 determines that the user performs the up-swipe operation on the desktop interface 401, the electronic device will switch the desktop interface 401 to the center desktop 402 shown in (b) of FIG. 1. Figure 4 Figure 4
[0059] S310: The electronic device returns to the interface where the desktop application icon of the application program is located.
[0060] In some examples, when the electronic device determines that the foreground application currently interacting with the user is not a desktop through S308 described above, that is, the user performs the up-swipe operation on the application program interface, the electronic device will switch from the current application program interface to the interface where the desktop application icon is located. For example, as shown in (a) of FIG. 1 described above, when the mobile phone 100 determines that the user performs the up-swipe operation on the application program interface 105, the electronic device will switch the application program interface 105 to the interface 101 shown in (b) of FIG. 1. The interface 101 has the desktop application icon 102 corresponding to the email application program. Figure 2 Figure 2
[0061] Thus, when the user performs the up-swipe return operation, the electronic device can return to the interface in which the desktop application icon of the application program is located when it is determined that the top-of-stack information is the relevant information corresponding to the application program; and the electronic device can switch the interface to the center desktop when it is determined that the top-of-stack information is the relevant information corresponding to the desktop.
[0062] In addition, as described above, when the electronic device detects the operation of the user clicking the desktop application icon, the electronic device can first play the opening animation, gradually enlarge the relevant screen of the opening animation to occupy the entire screen, and then display the complete application program interface. The opening animation can be divided into two stages, the first stage being a preview animation and the second stage being a start window animation. The start window animation in the second stage is an animation initiated by the application program and can interact with the user. When the start window animation is played, the application program is being started, the top-of-stack information currently obtained by the electronic device is the relevant information corresponding to the application program, and if the user performs a return operation, the user can return to the interface in which the desktop application icon is located.
[0063] However, the preview animation in the first stage of the opening animation cannot interact with the user and cannot respond to the user operation instruction, and when the preview animation is played, the application program has not yet been started, but only a static layer that can be gradually enlarged is displayed on the desktop. That is, when the preview animation is played, the foreground application currently interacting with the user is still the desktop, and the top-of-stack information currently obtained by the electronic device is still the relevant information corresponding to the desktop. Therefore, during the process of playing the opening animation by the electronic device, if the up-swipe operation of the user is detected, the electronic device determines that the current top-of-stack information is the relevant information corresponding to the desktop, and returns to the center desktop instead of returning to the interface in which the desktop application icon of the application program is located.
[0064] It can be understood that the electronic device plays the corresponding preview animation only after detecting the operation of the user clicking the desktop application icon. Therefore, in the present application, when the electronic device detects the operation instruction of the user opening the application program (e.g., clicking the desktop application icon), the electronic device can record the application information of the application program to be started corresponding to the desktop application icon, such as the position of the desktop application icon corresponding to the application program, the application package name of the desktop application icon corresponding to the application program, and the like. Based on this, the present application provides an interface switching method.
[0065] In the present application, when the electronic device detects that the user is performing a return-to-desktop operation, if it is detected that the opening animation is currently being played, the electronic device obtains the recorded application information corresponding to the opening animation. After detecting that the user has completed the return-to-desktop operation, if it is determined that the current top-of-stack information and the application information corresponding to the opening animation are the same, that is, the startup window animation is currently being played or the application interface of the application has been opened, the current foreground application with which the user is interacting is the application, and the return-to-desktop operation is detected by the application, the electronic device returns to the interface in which the desktop application icon of the application is located based on the top-of-stack information. If it is determined that the top-of-stack information and the application information corresponding to the opening animation are different, that is, the preview animation is still being played, and the current foreground application with which the user is interacting is still the desktop, and the return-to-desktop operation is detected by the desktop, the electronic device obtains the icon position in the application information and directly switches the interface to the interface in which the icon position is located. In this way, when the electronic device plays the opening animation, if the return-to-desktop operation of the user is detected, the electronic device returns to the interface in which the desktop application icon is located.
[0066] In some embodiments, the return-to-desktop operation of the user can include, but is not limited to, any one of various operations such as a bottom-up swipe return-to-desktop operation, an edge side swipe return-to-desktop operation, a click control (such as a click on the home key), and the like. The present application does not limit this. In order to facilitate description, the following embodiments take the bottom-up swipe return-to-desktop operation as an example to describe the interface switching method provided by the present application.
[0067] In some embodiments, when the electronic device detects that the user performs the up swipe return operation, if the electronic device is playing the preview animation, the electronic device can cache the application information corresponding to the preview animation. When the electronic device detects that the user has completed the up swipe return operation, the electronic device obtains the top-of-stack information in the currently running task information again. If the top-of-stack information and the application information are the same, it indicates that the electronic device has started playing the startup window animation, and the application has started to start. The electronic device can directly determine that the top-of-stack information is the relevant information corresponding to the application, and then the electronic device can directly return to the interface in which the desktop application icon is located in response to the program exit instruction. If the top-of-stack information and the application information are different, it indicates that the electronic device is still playing the preview animation. The electronic device can obtain the icon position information in the cached application information, and then directly switch the interface to the interface in which the desktop application icon is located. In this way, when the user performs the up swipe return operation during the playing of the preview animation by the electronic device, the user can always return to the interface in which the desktop application icon of the application is located.
[0068] In some embodiments, when the electronic device detects the user performing the up-swipe return operation, if the electronic device is playing the startup window dynamic effect, indicating that the application program is starting, and the top stack information is the relevant information corresponding to the application program, the electronic device can directly execute the execution logic of the up-swipe return operation shown in Figure 3 When it is determined that the top stack information is the relevant information corresponding to the application program, the electronic device can return to the interface where the desktop application icon of the application program is located.
[0069] In this way, when the user performs the up-swipe return operation at any playing position of the dynamic effect (preview dynamic effect or startup window dynamic effect), the electronic device can always return to the interface where the desktop application icon of the application program is located. For example, as shown in (a) of Figure 5 , the user can click the desktop application icon 502 in the interface 501 of the mobile phone 100 to trigger the mobile phone 100 to start the corresponding "music" application program. Next, as shown in (b) of Figure 5 , after detecting the click operation of the user, the mobile phone 100 displays the opening dynamic effect picture 503. As shown in (c) of Figure 5 , the mobile phone 100 detects the up-swipe return operation of the user during the playing of the opening dynamic effect picture 503. At this time, as shown in (d) of Figure 5 , the mobile phone 100 can return the screen picture to the interface 501 where the desktop application icon 502 of the music application program is located.
[0070] It can be understood that the electronic device to which the embodiments of the present application are applicable can be any electronic device including a mobile phone, a computer, a virtual reality (VR) device, a tablet computer, a wearable device, an augmented reality (AR) device, a notebook computer, a vehicle-mounted device, etc., and the form of the electronic device is not limited in the embodiments of the present application.
[0071] The processing procedure of the interface switching method mentioned in the present application will be described below based on the flowchart diagram shown in Figure 6 . The method can be applied to an electronic device, for example, the mobile phone 100 mentioned above. Specifically, the method is as follows.
[0072] S601: Detect an opening instruction for a first application program, and play a first dynamic effect of the first application program.
[0073] In some embodiments, the first icon of the first application program is located on a first desktop, and the first desktop is different from the center desktop.
[0074] The first application can be an application to be started mentioned in the present application. The first icon can be a desktop application icon of the first application mentioned in the present application. The first desktop can be a desktop interface in which the first icon is located, for example, the desktop interface 101 shown in (a) of FIG. 1 mentioned above. The first dynamic effect can be an opening dynamic effect mentioned in the present application. Figure 1
[0075] In some embodiments, when the electronic device detects the operation of the user clicking the desktop application icon, the electronic device first plays the opening dynamic effect, and when the relevant screen of the opening dynamic effect is gradually enlarged to occupy the entire screen, the application interface is displayed.
[0076] S602: During the playing of the first dynamic effect, a desktop return operation of the user is detected.
[0077] In some embodiments, the detection of the desktop return operation can be the detection of a swipe-up operation of the user, for example, after the detection of the user triggering the bottom hot zone, a swipe operation from bottom to top is further performed. Alternatively, the detection of the desktop return operation can be the detection of a side swipe operation of the user, for example, after the detection of the user triggering the edge hot zone, a swipe operation from the edge to the middle is further performed. Alternatively, the detection of the desktop return operation can be the detection of an operation of the user clicking a specific control, for example, the detection of an operation of the user clicking the home button. The present application does not limit the specific operation type of the desktop return operation.
[0078] S603: If the stack top information corresponding to the running task information in the electronic device is the same as the application information of the first application, the first interface is returned.
[0079] In some embodiments, when the electronic device detects that the user is performing the return desktop operation, if it is detected that the preview dynamic effect is currently being played, the electronic device obtains the recorded application information corresponding to the preview dynamic effect. After the detection of the user completing the return desktop operation, if it is determined that the current stack top information and the application information corresponding to the preview dynamic effect are the same, that is, the start window dynamic effect is currently being played or the application interface of the first application has been opened, the current foreground application with which the user is interacting is the first application, and the first application detects the return desktop operation of the user, the electronic device directly responds to the operation instruction of exiting the first application and returns to the first desktop in which the first icon of the first application is located.
[0080] S604: If the stack top information corresponding to the running task information in the electronic device is different from the application information of the first application, based on the position information of the first icon, the first desktop corresponding to the position information is displayed.
[0081] In some embodiments, if it is determined that the information at the top of the stack and the application information corresponding to the preview animation are different, that is, the preview animation is still playing and the foreground application currently interacting with the user is still the desktop, and the desktop has detected the user's return to the desktop operation, the electronic device will obtain the icon position in the application information and directly switch the interface to the first desktop where the icon position is located.
[0082] Thus, based on the above method, when a user performs a swipe-up back operation at any playback position of the animation (preview animation or launch window animation), the electronic device can always return to the interface where the application's desktop application icon is located.
[0083] The following is based on Figure 7 The flowchart shown illustrates the specific execution process of the interface switching method mentioned in this application, using a swipe-up return action as an example to describe the user's return to the home screen. This method can be applied to electronic devices, such as the aforementioned mobile phone 100. Specifically, the method is as follows:
[0084] S701: User-triggered bottom hotspot detected.
[0085] In some embodiments, a hotspot refers to an area on the screen of an electronic device that can be interacted with by the user. When the user touches or taps the hotspot, it triggers the electronic device to execute specific application functions or services. The bottom hotspot refers to the area located at the bottom of the screen that can be interacted with by the user. During the application's opening animation, when the electronic device detects a user pressing the screen in the bottom hotspot, it indicates that the bottom hotspot has been triggered. At this point, the electronic device can then execute the relevant task for the subsequent swipe-up back operation.
[0086] S702: Call the system-side interface to obtain information about currently running tasks.
[0087] In some embodiments, the system-side interface can be an application programming interface (API), allowing the electronic device to access and retrieve the running task information (RunningTaskInfo) object provided by the system. The RunningTaskInfo object stores information about the tasks currently running on the electronic device.
[0088] S703: Determine whether a specific gesture operation has been started and has not yet ended, and whether a preview animation is currently playing. If yes, proceed to S705; otherwise, proceed to S704.
[0089] In some embodiments, the specific gesture operation can be a predefined swipe-up operation. In S701 above, the electronic device has detected that the user has triggered the bottom hot zone. If the specific gesture operation (swipe-up operation) has started and has not yet ended, it means that the electronic device has detected that the user is performing a swipe-up operation. And when it is determined that a preview animation is currently playing, S705 is executed to perform the relevant tasks for the swipe-up return operation.
[0090] In some embodiments, during the application's opening animation playback, when the electronic device detects a user pressing the screen in the bottom hot zone of the screen, the electronic device can obtain the user's operation gesture in the bottom hot zone. If the operation gesture is the same as a specific operation gesture (swipe up operation gesture), it indicates that the electronic device has detected the user's bottom swipe up operation to return to the desktop.
[0091] In some embodiments, if the user has not yet started performing the swipe-up operation, or if the user has ended the swipe-up operation before the electronic device begins detection, the electronic device cannot determine that the user's operation is a swipe-up operation. In this case, the electronic device can execute S704 to create other types of input objects, such as click-type input objects.
[0092] In other embodiments, if the electronic device determines that a preview animation is not currently playing, the electronic device can directly execute the above-mentioned steps. Figure 3 The execution logic of the swipe-up back operation shown in the figure is such that when the information popped from the top of the stack is related to the application, the electronic device can return to the interface where the application's desktop icon is located; when the information popped from the top of the stack is related to the desktop, it returns to the central desktop.
[0093] S704: Create other types of input objects.
[0094] In some embodiments, when the electronic device does not detect that the user is performing a swipe-up operation via the above-described S703, the electronic device will create an input object of another operation type different from the swipe-up operation, such as a click operation type input object, a long press operation type input object, etc.
[0095] S705: Information at the top of the cache stack and application information corresponding to the cache preview animation.
[0096] In some embodiments, when the electronic device determines that the user is performing the upswipe operation through S703 described above, the electronic device can create a program class (OtherActivityInputConsumer), and cache the stack top information in the running task information (RunningTaskInfo) obtained through S702 described above in the program class, and cache the recorded application information corresponding to the preview animation. The stack top information stores the information of the foreground application that is currently interacting with the user. The stack top information can be the relevant information of the application that is currently interacting with the user, or the relevant information of the desktop that is currently interacting with the user.
[0097] S706: detecting the lifting hand operation of the user.
[0098] In some embodiments, the upswipe operation of the user can include a finger down operation, a sliding operation, and a lifting hand operation, and the electronic device can determine that the user has completed the upswipe operation when detecting the lifting hand operation of the user.
[0099] S707: executing the relevant instructions corresponding to the upswipe operation.
[0100] In some embodiments, the electronic device can determine that the user has completed the upswipe operation when detecting the lifting hand operation of the user, and can trigger the electronic device to execute the relevant instructions corresponding to the upswipe operation hereinafter. The relevant instructions corresponding to the upswipe operation can include S708 to S712 hereinafter.
[0101] S708: obtaining the current stack top information again.
[0102] In some embodiments, after detecting the lifting operation in the upswipe return operation of the user through S706 described above, the electronic device can also call the system-side interface again to obtain the stack top information in the running task information.
[0103] S709: determining whether the stack top information obtained again is the same as the application information of the preview animation? If yes, performing S710; if no, performing S711.
[0104] In some embodiments, if the stack top information obtained again is the same as the application information of the preview animation, it indicates that the electronic device has played the startup window animation or has entered the application program display interface, and the application program has started. Therefore, the electronic device can directly perform S710, the electronic device can directly determine that the stack top information is the relevant information of the application program, and the electronic device can directly respond to the instruction of exiting the application program to return to the interface where the desktop application icon is located.
[0105] In some embodiments, if the stack top information obtained again is different from the application information of the preview animation, it indicates that the electronic device is still playing the preview animation. The electronic device can perform S711 to obtain the icon position information in the cached application information, and then directly switch the interface to the interface where the desktop application icon is located.
[0106] S710: return to the interface where the desktop application icon of the application program is located.
[0107] In some embodiments, if it is determined through S709 that the stack top information of the currently running task information obtained again is the same as the application information of the preview animation, the electronic device can directly determine that the stack top information is the application information corresponding to the application program, and then directly respond to the desktop return operation instruction of the first application program, that is, directly run the related code of the exit application program of the electronic device, so as to return to the interface where the desktop application icon is located.
[0108] S711: obtain the position of the desktop application icon based on the application information of the preview animation.
[0109] In some embodiments, the application information can store the position information of the corresponding desktop application icon. When it is determined through S709 that the stack top information of the currently running task information is the desktop information, that is, it is determined that the stack top information obtained again is different from the application information, the electronic device can read the position information of the desktop application icon from the cached application information.
[0110] S712: return to the interface where the desktop application icon of the application program is located.
[0111] In some embodiments, after obtaining the position information of the desktop application icon, the electronic device can directly switch the interface to the interface corresponding to the position information of the desktop application icon.
[0112] In this way, based on the above interface switching method, when the user performs the up-slip return operation at any playing position of the opened animation, the electronic device can return to the interface where the desktop application icon of the application program is located.
[0113] It can be understood that the electronic device to which the embodiments of the present application are applicable can be any electronic device including a mobile phone, a computer, a virtual reality (VR) device, a tablet computer, a wearable device, an augmented reality (AR) device, a notebook computer, a vehicle-mounted device, etc. The form of the electronic device is not limited in the embodiments of the present application.
[0114] The following describes an Android system based on a layered architecture TMThe system is taken as an example to illustrate the system architecture of the electronic device of one embodiment of the application.
[0115] As shown in Figure 8 , the Android TM system can be divided into four layers, including an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer.
[0116] As shown in Figure 8 , the application layer can include applications such as a camera, a gallery, a calendar, a map, navigation, Bluetooth, music, short messages, a system user interface (System UI), a desktop (Launcher), and the like. A user can trigger the electronic device to start a corresponding application by clicking a desktop application icon corresponding to each application.
[0117] The system user interface provides core interface elements for the user to interact with the electronic device, and can be used to display a system state, display a navigation bar, display a lock screen interface, and the like.
[0118] The desktop application is responsible for managing and presenting a desktop interface, including a desktop layout, application icons, plug-ins, and the like.
[0119] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer can include a layer compositor (SurfaceFlinger), an input module (Input), an activity manager service (AMS), a system service (SystemServer), and the like.
[0120] The layer compositor is responsible for managing and rendering all display content, ensuring the fluency and efficiency of the user interface.
[0121] The input module is used to receive input data of a user, including a finger down operation event and a finger up operation event.
[0122] The AMS is used to track and manage the life cycle of an activity (Activity) in an application, including starting, pausing, stopping, and destroying the Activity.
[0123] The system service is used to be responsible for starting and managing various services in the system, including service management, cross-process communication, and the like.
[0124] The Android TMThe runtime includes a core library and a virtual machine, and the Android runtime is responsible for scheduling and management of the Android system.
[0125] The core library includes two parts: one part is a function function that the java language needs to call, and the other part is the core library of Android.
[0126] 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 into binary files. The virtual machine is used to perform functions such as management of the object life cycle, stack management, thread management, security and exception management, and garbage collection.
[0127] The system library can include multiple functional modules. For example: surface manager, media library, three-dimensional graphics processing library, two-dimensional graphics engine, etc.
[0128] The kernel layer is the layer between hardware and software, responsible for the management and abstraction of the underlying hardware, and provides a stable and efficient running environment for the upper layer application. The kernel layer at least includes display driver, camera driver, audio driver, and sensor driver.
[0129] The following describes the overall execution process of the interface switching method provided by the present application in combination with the system architecture diagram shown in Figure 8 and based on the interaction process shown in Figure 9 During the execution of the interface switching method provided by the present application, the electronic device needs to transmit data between multiple system architecture modules. The system architecture modules used can include the system user interface, the desktop; and the layer compositor, the input module, the AMS, and the system service in the application framework layer; and the display driver in the kernel layer. Through the data interaction between the above modules, the interface switching can be realized. Specifically, the interaction process is as follows:
[0130] 901: The desktop receives the down operation event sent by the input module.
[0131] In some embodiments, when the user clicks the desktop application icon, the input module detects the down operation event in the user click operation and sends the down operation event to the desktop.
[0132] 902: The desktop sends the application package name of the application to be started to the system service.
[0133] In some embodiments, the desktop can send the application package name of the application to be started to the system service, and the system service judges whether the start type is cold start or hot start, wherein the application includes an application package name that can be used as a unique identifier of the application.
[0134] 903: The system service sends the launch type to the desktop.
[0135] In some embodiments, when the system service obtains the application package name, it can determine whether the background has loaded the same application based on the package name. If yes, the launch type of the application is hot launch; if no, the launch type of the application is cold launch. After determining the launch type of the application to be launched, the system service can send the launch type to the desktop.
[0136] 904: The system service sends the system user interface information about the completion of the preparation work.
[0137] In some embodiments, when loading the preview animation corresponding to the application to be launched, the relevant layers of the preview animation need to be obtained. For example, when the user last exited the application to be launched, the electronic device saves the interface layer at the time of the exit of the application. If the current launch type of the application to be launched is hot launch, the electronic device can obtain the interface layer saved at the last exit of the application and use the interface layer as the layer of the preview animation. If the current launch type of the application to be launched is cold launch, for example, after the last exit of the application, a memory clearing operation is performed, the layer of the preview animation can be the start-up interface customized by the application, for example, the logo interface of the application.
[0138] 905: The system user interface sends the animation playing instruction to the desktop.
[0139] In some embodiments, after the system user interface receives the instruction about the completion of the preparation work sent by the system service, it can notify the desktop that the preview animation can be played.
[0140] 906: The desktop creates the root control layer when the preview animation is opened (pre-opening root leash) and the root control layer when the preview animation is closed (pre-closing root leash).
[0141] In some embodiments, a control layer (leash) can be used to mount other layers, so that the layers mounted under the control layer (leash) can be isolated. That is, when the layers mounted under the control layer (leash) are processed, other layers in the business logic will not be affected. The root control layer (pre-opening root leash) when the preview animation opening is created can be a control layer (leash) related to the animation at the beginning of the preview animation, so that the relevant layers of the preview animation at the beginning are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers of the preview animation at the beginning. The root control layer (pre-closing root leash) when the preview animation is closed can be a control layer (leash) related to the animation at the end of the preview animation, so that the relevant layers of the preview animation at the end are mounted under the control layer (leash), so that the electronic device will not interfere with other layers when processing the relevant layers of the preview animation at the end.
[0142] 907: The desktop receives the up operation event sent by the input module.
[0143] In some embodiments, when the user completes the operation of clicking the desktop application icon, the input module detects the up operation event in the user click operation and sends the up operation event to the desktop.
[0144] 908: The desktop triggers the AMS to call the startActivity method.
[0145] In some embodiments, when the up operation is detected, the AMS is triggered to execute the startActivity method to start a new startActivity method to display a new window or interface. The AMS is the core component of the activity (Activity) management, which provides functions such as starting, life cycle management, and stack management of the activity (Activity).
[0146] 909: The desktop creates an animation object.
[0147] In some embodiments, the electronic device creates an animation object when playing any animation. The created animation object can include various properties of the preview animation, such as the animation change type (e.g., gradient, rotation, etc.) and the duration of the preview animation.
[0148] 910: The layer compositor obtains the animation sent by the desktop.
[0149] In some embodiments, the layer compositor is an Android TM The layer compositor is a key component in the system, mainly responsible for managing and compositing display content. The layer compositor can receive the preview animation and render and display it.
[0150] 911: The layer compositor processes the layers.
[0151] In some embodiments, the layer compositor can composite multiple graphical elements (e.g., multiple text boxes) in the layers of the preview animation into one layer, thereby forming a complete picture for the final display. In addition, the layer compositor can also render based on the animation information of the preview animation and the related layers of the preview animation. The present application does not limit this.
[0152] 912: The layer compositor displays the preview animation to the display driver.
[0153] In some embodiments, the electronic device sends the related layers of the processed preview animation to the display driver, so that the display driver can send the layers to the screen for display, thereby realizing the playing of the preview animation.
[0154] 913: The desktop receives the down operation event sent by the input module.
[0155] In some embodiments, when the layer compositor displays the preview animation to the display driver, that is, when the electronic device is playing the preview animation, if the desktop receives the user's down operation event and the down operation event is located in the bottom hot area of the screen of the electronic device. Since the bottom hot area refers to the area in the screen of the electronic device that can interact with the user, when the electronic device detects that the user touches or clicks the bottom hot area, it means that the electronic device receives the instruction triggered by the bottom hot area, thereby triggering the electronic device to execute the interface switching method provided by the present application.
[0156] 914: The desktop creates an OtherActivityInputConsumer class.
[0157] In some embodiments, before creating the OtherActivityInputConsumer class, the desktop also detects whether it has received the user's up operation event sent by the input module. When the desktop determines that the user is performing the up operation, the desktop can create an OtherActivityInputConsumer program class and cache the top stack information in the RunningTaskInfo in the program class, as well as the application information corresponding to the recorded preview animation.
[0158] 915: The home initiates an up-swipe animation request to the system user interface.
[0159] In some embodiments, the preview animation is followed by an up-swipe animation that returns to the interface where the home application icon is located. This process is also an animation transition, which can be described as an "up-swipe animation." To implement the up-swipe animation, the home needs to initiate an animation request.
[0160] 916: The system service receives the up-swipe animation request sent by the system user interface.
[0161] In some embodiments, after the system user interface receives the up-swipe animation request initiated by the home, the system user interface sends the up-swipe animation request to the system service, so that the system service can perform the related preparation work of the up-swipe animation request.
[0162] 917: The system service performs the preparation work of the up-swipe animation.
[0163] In some embodiments, the preparation work can include setting the application state of the home to the foreground application state and setting the application state of the application program to the background application state. Alternatively, the system service can also collect the animation participants of the up-swipe animation, that is, collect the system settings that need to be changed during the up-swipe animation, so that the subsequent electronic device can only operate the collected animation participants, and will not operate elements (such as time settings, etc.) unrelated to the animation participants, so that the elements unrelated to the animation participants will not change. Since the animation participants are elements that need to change when the preview animation is converted to the up-swipe animation, the animation participants collected by the electronic device can include but are not limited to interface layout, text box content, brightness change parameter, button, and the like.
[0164] 918: The system service sends the up-swipe animation related information to the system user interface.
[0165] In some embodiments, after completing the related preparation work of the up-swipe animation, the system service can send the up-swipe animation related information to the system user interface, for example, the information of the animation participants collected by the system service in 917 above, and the information notifying the system user interface that the preparation work is completed, and the like.
[0166] 919: The system user interface calls back the animation related information to the home.
[0167] In some embodiments, the system user interface sends the up-swipe animation related information to the home, so as to play the up-swipe animation on the home.
[0168] 920: The home creates an animation object.
[0169] In some embodiments, the electronic device creates an animation effect object when playing the up-swipe animation effect. The created animation effect object can include various attributes of the up-swipe animation effect, such as the animation change type (e.g., gradient, rotation, etc.) of the up-swipe animation effect, the animation duration of the up-swipe animation effect, and the like.
[0170] 921: The layer compositor obtains the animation effect sent by the desktop.
[0171] In some embodiments, the layer compositor is a key component in the Android system, mainly responsible for managing and compositing display content. The layer compositor can receive the up-swipe animation effect and render and display it. TM TM In some embodiments, the layer compositor is a key component in the Android system, mainly responsible for managing and compositing display content. The layer compositor can receive the up-swipe animation effect and render and display it.
[0172] 922: The layer compositor performs layer processing.
[0173] In some embodiments, the layer compositor can composite multiple graphical elements (e.g., multiple text boxes) in the interface where the desktop application icon is located into a layer, thereby forming the complete interface for final display. In addition, when performing layer processing, the layer compositor can also render the layer based on the animation information (e.g., fade-in, gradient, etc.) of the up-swipe animation effect. For example, if the animation information of the up-swipe animation effect is fade-in (e.g., the desktop interface gradually changes from transparent to clear), the layer compositor can determine the transparency of the desktop interface at different times, so that when displaying the desktop interface, the fade-in animation effect can be achieved based on the determined different transparencies. The way the layer compositor performs layer processing is not limited in this application.
[0174] 923: The layer compositor sends the up-swipe animation effect to the display driver.
[0175] In some embodiments, the electronic device sends the interface where the desktop application icon is located to the display driver, so that the display driver can send the interface to the screen for display, thereby achieving the playing of the up-swipe animation effect.
[0176] In this way, through the above interaction diagram, when the user clicks the desktop application icon, the electronic device can trigger the playing of the preview animation effect. Moreover, when the user performs the up-swipe return operation during the playing of the preview animation effect by the electronic device, the electronic device can always return to the interface where the desktop application icon of the application is located.
[0177] The embodiments of the present application provide a readable storage medium, and the readable storage medium stores instructions. The instructions, when executed on an electronic device, cause the electronic device to perform the interface switching method mentioned in the present application.
[0178] The embodiments of the present application provide a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the interface switching method mentioned in the present application.
[0179] The embodiment of the present application further provides an electronic device, comprising a memory and a processor, the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device and is used to execute the interface switching method mentioned in the present application.
[0180] The interface switching method mentioned in the present application can be executed by an electronic device, wherein the electronic device can be any electronic device such as a server, a mobile phone, a computer, a tablet computer, an augmented reality (AR) device, a notebook computer, etc. The form of the electronic device is not limited in the embodiment of the present application.
[0181] As shown in FIG. 1, a hardware structure schematic diagram of an electronic device in one embodiment of the present application is exemplarily illustrated by taking a mobile phone 100 as an example. Figure 10
[0182] As shown in FIG. 1, the mobile phone 100 can 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 loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a gyroscope sensor 180A, a magnetic sensor 180B, an acceleration sensor 180C, an infrared sensor 180D, a temperature sensor 180E, a touch sensor 180F, an ambient light sensor 180G, a light sensor 180H, etc. Figure 10 It can be understood that the structure exemplified in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In another embodiment of the present application, the mobile phone 100 can include more or fewer components than the illustration, or combine certain components, or split certain components, or different arrangement of components. The components illustrated can be realized by hardware, software or a combination of software and hardware.
[0183]
[0184] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), a controller, a video codec, a digital signal processor (DSP), etc. Different processing units can be independent devices or integrated into one or more processors.
[0185] In the embodiments of the present application, the processor 110 can be configured to perform the interface switching method mentioned in the present application. For example, detecting whether the user performs the return desktop operation, detecting whether the preview animation is playing, etc.
[0186] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0187] The USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transmit data between the mobile phone 100 and peripheral devices. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0188] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 140 can charge the battery 142 while also providing power to the electronic device through the power management module 141.
[0189] The power management module 141 is configured to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the screen 194, the camera 193, and the wireless communication module 160, etc. In some other embodiments, the power management module 141 can also be provided in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be provided in the same device.
[0190] The wireless communication function of the mobile phone 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, and the modem processor, etc. The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna 1 can be used in combination with a tuning switch.
[0191] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the mobile phone 100.
[0192] The screen 194 is used to display images, videos, etc. The screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), etc. In some embodiments, the mobile phone 100 can include one or N screens 194, N being a positive integer greater than 1.
[0193] The camera 193 is used to capture still images or videos. An object generates an optical image through a lens and projects the optical image to a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. In some embodiments, the mobile phone 100 can include one or N cameras 193, N being a positive integer greater than 1.
[0194] The internal memory 121 can be used to store computer executable program codes including instructions. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data created during use of the mobile phone 100 (such as audio data, a phone book, etc.), and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like. The processor 110 executes various function applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory disposed in the processor.
[0195] The mobile phone 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, an application processor, and the like. For example, music playing, recording, and the like.
[0196] The gyroscope sensor 180A can be used to determine a motion posture of the mobile phone 100. In some embodiments, the gyroscope sensor 180A can be used to determine an angular velocity of the mobile phone 100 around three axes (i.e., x, y, and z axes).
[0197] The magnetic sensor 180B includes a Hall sensor, and can be used to detect a surrounding magnetic field strength.
[0198] The acceleration sensor 180C can detect a magnitude of acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, the acceleration sensor 180C can detect a magnitude and direction of gravity. The acceleration sensor 180C can also be used to identify an electronic device posture, and can be applied to landscape / portrait screen switching, a pedometer, and the like.
[0199] The infrared sensor 180D is used to detect, receive, and analyze infrared radiation signals.
[0200] The temperature sensor 180E is used to detect a temperature. In some embodiments, the mobile phone 100 uses a temperature detected by the temperature sensor 180E to implement a temperature processing strategy. For example, when a temperature reported by the temperature sensor 180E exceeds a threshold value, the mobile phone 100 implements a performance reduction of a processor located near the temperature sensor 180E in order to reduce power consumption and implement thermal protection.
[0201] Touch sensor 180F, also called "touch device". Touch sensor 180F can be disposed on screen 194, and touch sensor 180F and screen 194 form a touch screen, also called "touch panel". Touch sensor 180F is used to detect touch operation acting on or near it.
[0202] Ambient light sensor 180G is used to sense ambient light brightness.
[0203] Light sensor 180H can be used to detect light intensity, with high sensitivity and fast response speed, and can be applied to various lighting environments and real-time feedback of light conditions.
[0204] Keys 190 include power-on key, volume key, etc. Keys 190 can be mechanical keys. They can also be touch keys. Mobile phone 100 can receive key input and generate key signal input related to user settings and function control of mobile phone 100.
[0205] Motor 191 can generate vibration prompt. Motor 191 can be used for incoming call vibration prompt, and also can be used for touch vibration feedback.
[0206] Indicator 192 can be an indicator light, which can be used to indicate charging status, power change, and also can be used to indicate messages, missed calls, notifications, etc.
[0207] SIM card interface 195 is used to connect SIM card. SIM card can be inserted into or pulled out of SIM card interface 195 to realize contact and separation with mobile phone 100. Mobile phone 100 can support one or N SIM card interfaces, N being a positive integer greater than 1.
[0208] Embodiments disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. Embodiments of the present application can be implemented as computer programs or program codes executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0209] Program code can be applied to input instructions to perform functions described in the present application and generate output information. Output information can be applied to one or more output devices in a known manner. For the purpose of the present application, a processing system includes any system having a processor such as, for example, a digital signal processor, microcontroller, application specific integrated circuit or microprocessor.
[0210] The program code can be implemented in a high level of programming language or a object-oriented programming language to communicate with processing system. In the event that it is required, assembly or machine language can also be implemented. In fact, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language can be a compiled or interpreted language.
[0211] In the drawings, some of the structural or methodological acts can be shown in a particular arrangement and / or order. However, it should be understood that such is merely an illustration and both the specific arrangement and the order of the acts can be modified, in some embodiments. Additionally, the inclusion of structural or methodological acts in a particular figure does not imply that these acts are required in all embodiments, and in some embodiments, these acts can be excluded or combined with other acts.
[0212] It should be noted that each unit / module mentioned in the embodiments of the devices in the present application is a logical unit / module, which can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical unit / modules in the physical world. The physical implementation of these logical units / modules is not the most important point. The combination of the functions implemented by these logical units / modules is the key to solving the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned embodiments of the devices in the present application do not introduce units / modules that are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned embodiments of the devices do not have other units / modules.
[0213] It should be noted that in the examples and descriptions of the present application, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including one" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0214] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it should be understood by those skilled in the art that various changes in form and details can be made therein without departing from the scope of the present application.
Claims
1. An interface switching method, applied to electronic devices, characterized in that, The method includes: Upon detecting an instruction to open a first application, the system plays a first animation effect of the first application and records application information of the first application. The application information includes the location information of a first icon corresponding to the first application. The first icon of the first application is located on a first desktop, which is different from the central desktop of the electronic device. During the playback of the first animation effect, a user's desktop return operation was detected; If the stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application, return to the first desktop; The stack top information corresponding to the task information currently running in the electronic device is different from the application information of the first application. Based on the location information of the first icon, the first desktop corresponding to the location information is displayed.
2. The method according to claim 1, characterized in that, The desktop return operation includes any one of the following: swiping up from the bottom to return to the desktop, swiping from the edge to return to the desktop, and clicking the main button to return to the desktop.
3. The method according to claim 2, characterized in that, Corresponding to the desktop return operation being the bottom swipe-up return to desktop operation, detecting the user's desktop return operation during the first animation playback includes: During the playback of the first animation effect, the user's touch screen operation is detected in the bottom hot zone of the electronic device; The system acquires the user's gesture in the bottom hot zone, and if the gesture is determined to be an up swipe, it detects the user's desktop return action.
4. The method according to claim 3, characterized in that, The method further includes: The system detects a user's desktop return gesture and retrieves the top stack information of the tasks currently running in the electronic device.
5. The method according to claim 4, characterized in that, The stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application, and the process returns to the first desktop, including: The stack top information corresponding to the task information currently running in the electronic device is the same as the application information of the first application. In response to the desktop return operation of the first application, the system returns to the first desktop.
6. The method according to claim 4, characterized in that, The stack top information corresponding to the task information currently running in the electronic device is different from the application information of the first application. Based on the location information of the first icon, the first desktop corresponding to the location information is displayed, including: The stack top information corresponding to the task information currently running in the electronic device is the desktop information of the electronic device, and it is determined that the stack top information of the task information currently running in the electronic device is different from the application information of the first application. In the application information of the first application recorded by the electronic device, the location information of the first icon corresponding to the first application is obtained, and the display interface of the electronic device is switched to the first desktop corresponding to the location information.
7. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store instructions executed by one or more processors of the electronic device, the processor being one of one or more processors of the electronic device, for performing the interface switching method according to any one of claims 1 to 6.
8. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the interface switching method according to any one of claims 1 to 6.
9. A computer program product, characterized in that, include: Computer instructions, when executed on an electronic device, cause the electronic device to perform the interface switching method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Animation playing method and device, electronic equipment and computer readable storage medium
CN117130678A