Interface switching method, electronic device and storage medium

By deleting unnecessary animations when the negative screen returns to the desktop in the terminal device, the screen lag caused by excessive CPU load during the interface switching process is solved, and a smoother interface switching experience is achieved.

CN118426892BActive Publication Date: 2025-05-06HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410547643.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-05-06
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

In terminal devices, the interface switching animation is too complicated to cause the screen to stutter, especially during the switching process from the negative screen to the home screen, the CPU load is too heavy, affecting the smoothness of interface drawing.

Method used

Provides an interface switching method, which removes unnecessary animations in the desktop scene when the negative screen returns to the desktop scene, releases CPU processing pressure, and avoids lag during the interface switching process. The specific steps include detecting the user's swipe operation, reducing the display home screen interface, and restoring its display size after the switching is completed.

Benefits of technology

By reducing unnecessary animations and reducing CPU load, the main thread of the negative screen with lower priority can draw the screen in time, avoiding lags during interface switching, and improving the UI fluency of the system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426892B_ABST
    Figure CN118426892B_ABST
Patent Text Reader

Abstract

The present application relates to the field of electronic technology, and in particular to an interface switching method, electronic device and storage medium. The method includes: displaying a first interface, wherein the first interface includes a left-slide screen interface; detecting a first operation of the user on the first interface; corresponding to the first operation for indicating switching to a second interface, in the process of switching from the first interface to the second interface, displaying a reduced second interface with at least one scaling ratio, wherein the second interface is a main screen interface; and displaying an unreduced second interface. Through the interface switching method of the present application, there is no need to display unnecessary animations in the scenario of returning to the desktop from the negative one screen, thereby releasing the processing load of the CPU to avoid freezes during the interface switching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to an interface switching method, an electronic device and a storage medium. Background Art

[0002] During the use of terminal devices, the smoothness of the user interface (UI) is one of the key factors to improve the operating efficiency of terminal devices. Among them, the interface switching animation is an important visual element. The switching animation is achieved through the continuous display of a series of image frames or vector graphics, which can create a smooth animation effect on the screen. It can not only enhance the visual effect of the UI and prevent the switching screen from being too abrupt, but also provide users with intuitive operation perception.

[0003] At present, if the interface switching animation is complicated, the screen may freeze. Taking the terminal device as a mobile phone as an example, the mobile phone detects that the user swipes up from the bottom of the left screen of the main screen. In the process of switching from the left screen interface of the main screen interface to the main screen interface, the interface zoom animation, displacement animation, transparency animation, etc. need to be rendered. Due to too many animations that need to be rendered, the CPU of the mobile phone may be overloaded, so that the main screen thread cannot draw the next frame of the interface in time, resulting in the problem of screen freeze. Summary of the invention

[0004] The purpose of the present application is to provide an interface switching method, an electronic device and a computer-readable storage medium.

[0005] In a first aspect, the present application provides an interface switching method, which is applied to an electronic device, comprising: displaying a first interface, wherein the first interface includes a left-swiping screen interface; detecting a first operation of a user on the first interface; performing interface switching based on the first operation, wherein: corresponding to the first operation used to indicate switching to a second interface, in the process of switching from the first interface to the second interface, displaying a reduced second interface with at least one zoom ratio, wherein the second interface is a main screen interface; and displaying the second interface that has not been reduced.

[0006] Through the interface switching method of the present application, there is no need to display unnecessary animations when returning to the desktop from the negative one screen, which releases the processing pressure of the CPU and enables the negative one screen main thread with a lower priority to draw the screen in time, thereby avoiding the jamming phenomenon during the interface switching process; and, during the switching process, the main screen interface is reduced in size and the display size of the main screen interface is restored after the switching is completed, which can prevent the switching screen from being too abrupt.

[0007] In a possible implementation of the first aspect above, executing interface switching based on the first operation also includes: corresponding to the first operation used to indicate switching to a third interface, during the process of switching from the first interface to the third interface, displaying the second interface, the third interface including a multitasking interface; based on the animation of the second interface, controlling the display content of the second interface to gradually fade out; and displaying the third interface.

[0008] In a possible implementation of the first aspect above, the animation of the second interface includes a zoom animation.

[0009] In a possible implementation of the first aspect above, displaying the third interface includes: corresponding to the third interface including a multi-tasking card, displaying the multi-tasking card and an animation of the multi-tasking card.

[0010] In a possible implementation of the first aspect above, the animation of the multitasking card includes a transparency animation and a displacement animation, and the multitasking card and the animation of the multitasking card are displayed, including: based on the transparency animation of the multitasking card, controlling the third interface to gradually appear; based on the displacement animation of the multitasking card, controlling the third interface to move from an initial position to a target position.

[0011] In a possible implementation of the first aspect above, the first operation includes a first swipe up operation and a second swipe up operation, and the first swipe up operation is used to indicate switching to the second interface, and the second swipe up operation is used to indicate switching to the third interface, and the sliding parameters of the first swipe up operation and the second swipe up operation are different.

[0012] In a possible implementation of the first aspect, the sliding parameter includes at least one of a sliding distance, a sliding speed, and a sliding duration.

[0013] In a possible implementation of the first aspect above, the scaling ratio is negatively correlated with the sliding distance of the first sliding up operation.

[0014] In a second aspect, the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which, when the processor executes the instructions in the memory, enables the electronic device to execute the above-mentioned interface switching method.

[0015] In a third aspect, the present application provides a storage medium having instructions stored thereon, which, when executed on an electronic device, causes the electronic device to execute the above-mentioned interface switching method.

[0016] In a fourth aspect, the present application provides a computer program product, including: a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium containing a computer program code for executing the above-mentioned interface switching method. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1A According to the present application, a schematic diagram of a negative one screen interface is shown;

[0018] Figure 1B According to the present application, a schematic diagram of an interface for switching from the negative one screen to the main screen is shown;

[0019] Figure 1C According to the present application, a schematic diagram of the interface of a main screen is shown;

[0020] Figure 2 According to an embodiment of the present application, a schematic diagram of a multi-tasking interface is shown;

[0021] Figure 3 According to an embodiment of the present application, a software structure block diagram of an electronic device 100 is shown;

[0022] Figure 4 According to an embodiment of the present application, an interactive flow chart of an interface switching method is shown;

[0023] Figure 5A According to the implementation of this application, a schematic diagram of a first interface switching from the negative one screen to the multi-tasking interface is shown;

[0024] Figure 5B According to the implementation of this application, a schematic diagram of a second interface switching from the negative one screen to the multi-tasking interface is shown;

[0025] Figure 6 According to an embodiment of the present application, a flow chart of an interface switching method is shown;

[0026] Figure 7 A schematic diagram of a sliding distance is shown according to an embodiment of the present application;

[0027] Fig. 8A According to an embodiment of the present application, a first interface schematic diagram showing switching from the negative one screen to the multi-tasking interface is shown;

[0028] Figure 8B According to an embodiment of the present application, a schematic diagram of a second interface switching from the negative one screen to the multitasking interface is shown;

[0029] Figure 8C According to an embodiment of the present application, a third interface schematic diagram showing switching from the negative one screen to the multitasking interface is shown;

[0030] Fig. 9 According to an embodiment of the present application, a schematic diagram of an interface drawing process is shown;

[0031] Fig.10 A schematic diagram of a desktop thread is shown according to an embodiment of the present application;

[0032] Fig.11 According to an embodiment of the present application, a schematic diagram of a hardware framework of an electronic device 100 is shown. DETAILED DESCRIPTION

[0033] The illustrative embodiments of the present application include, but are not limited to, an interface switching method, an electronic device, and a storage medium.

[0034] It should be understood that the electronic device 100 in the embodiment of the present application may include a smart phone, a desktop computer, a tablet computer, a laptop computer, a smart speaker, a digital assistant, an augmented reality (AR) / virtual reality (VR) device, a smart wearable device, and other types of electronic devices 100. Optionally, the operating system running on the electronic device 100 may include but is not limited to Android™ system, IOS™ system, Linux™, Windows™, etc. The details of the electronic device 100 will be combined with the following text. Figure X Description, no further elaboration is given here.

[0035] As mentioned earlier, when the phone switches from the left screen interface of the main screen interface to the main screen interface, the screen may freeze. For the convenience of description below, the left screen is called the negative one screen, which is an additional screen in addition to the main screen. It can be understood that the negative one screen can be directly accessed from the main screen based on a right swipe operation; as a system-level entrance, the negative one screen brings together a variety of services, including search, weather, daily, logistics, news and other services.

[0036] As an example, refer to Figure 1A Taking the electronic device 100 as a mobile phone 10 as an example, after the user slides up at the bottom of the negative first screen, the interface of the electronic device 100 can be gradually changed from Figure 1A The negative one screen interface 01A shown in the figure switches to Figure 1C The main screen interface 01C is shown.

[0037] In the above process, the negative one screen main thread needs to draw the negative one screen interface 01A of each frame, and the desktop main thread needs to draw the main screen interface 01C of each frame. For example, Figure 1B The negative one screen interface 01A and the main screen interface 01C shown in the figure. Each time the negative one screen main thread draws a frame of the negative one screen interface 01A, it needs to send the corresponding displacement parameters to the desktop main thread. Among them, the displacement parameters may include the displacement distance of the negative one screen interface 01A. After receiving the displacement parameters, the desktop main thread can start drawing the main screen interface 01C of the current frame. After the drawing is completed, the electronic device 100 can display the negative one screen interface 01A and the main screen interface 01C of the current frame, for example, as shown in the figure below. Figure 1B The interface shown.

[0038] However, the desktop thread needs to create animations for interface switching, such as scaling animations, displacement animations, and transparency animations, which may occupy a large amount of CPU load, resulting in the inability to schedule the negative one-screen main thread with a lower priority. Since the negative one-screen main thread cannot work properly, the displacement parameters cannot be sent to the desktop main thread, so that the desktop main thread cannot draw the next frame of the interface, such as the next frame of the main screen interface 01C, resulting in screen freezes. For example, the time it takes for the next frame to be drawn is a long time after the previous frame was displayed, resulting in freezes in the view.

[0039] To summarize, in some embodiments, since the desktop thread needs to draw a large number of animations during the interface switching process from the negative one screen to the main screen, the CPU is overloaded, which affects the normal drawing of the screen and causes the interface to freeze.

[0040] In order to solve the above problems, the present application provides an interface switching method, which does not render zoom animation, displacement animation, and transparency animation for the scene where the interface switches from the negative one screen interface to the main screen interface. Among them, after the electronic device 100 detects the user's swipe-up gesture operation based on the bottom of the interface, it can determine whether the interface switches from the negative one screen interface to the main screen interface by judging whether the negative one screen interface is displayed in the foreground. In addition, in order to prevent the switching screen from being too abrupt, during the switching process, for example Figure 1B In the state shown, the elements of the main screen interface and the negative one screen interface can be displayed in reduced size, and after the switch is completed, all elements of the main screen interface can be enlarged and restored.

[0041] Through the interface switching method of the present application, unnecessary animations can be deleted in the scenario of returning to the desktop from the negative one screen, releasing the CPU processing pressure, allowing the negative one screen main thread with a lower priority to draw the picture in time and pass key parameters to the desktop main thread, thereby avoiding the jamming phenomenon during the interface switching process and improving the UI smoothness of the system operation.

[0042] According to some embodiments, after detecting a user's swiping up operation based on the bottom of the negative one screen interface, corresponding to at least a portion of the negative one screen interface being displayed in the foreground, the main screen interface is displayed in a reduced size; corresponding to the negative one screen interface not being displayed in the foreground and the main screen interface being displayed in its entirety in the foreground, the display size of the elements in the main screen interface is restored.

[0043] According to some embodiments, corresponding to the foreground display of the multitasking interface, the desktop rendering thread can render a scaling animation, a displacement animation, and a transparency animation. Figure 2, including a main screen interface 02A displayed based on a certain transparency, and a multi-task card 02B. In some embodiments, if the user does not release the swipe up operation, the multi-task interface can be triggered. Among them, the main screen interface 02A and the multi-task card 02B are both drawn by the desktop main thread, so there will be no screen freeze problem caused by thread priority differences.

[0044] Combine the following Figure 3 The software structure in the embodiments of the present application is introduced. Figure 3 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0045] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime and system library, kernel layer and hardware abstraction layer.

[0046] The application layer can include a series of application packages. Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, negative one screen, desktop, etc.

[0047] Among them, the desktop application can be Android TM The default launcher app on your device, such as Google NowLauncher TM 、Pixel Launcher TM 、Samsung One UI TM According to some embodiments, the negative one screen application may be a smart assistant application, a third-party launcher application (different from the default launcher application); according to other embodiments, the negative one screen application may also be a part of the above-mentioned default launcher application.

[0048] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0049] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, an input manager, etc. Among them, the input manager may capture user input and pass it to the corresponding program for processing, for example, monitoring click events generated by input hardware, converting the events into a standardized format, and then distributing them to the desktop application for processing.

[0050] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0051] The system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0052] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0053] The hardware abstraction layer is responsible for interacting with specific input hardware devices, including buttons, touch screens, keyboards, mice, etc. Each input device type has a corresponding module that provides a standard interface for upper-layer software to call.

[0054] Combine the following Figure 4 The following is an interactive flow chart of an interface switching method according to an embodiment of the present application. Figure 4 As shown, it specifically includes the interaction process between the input management service (IMS), the negative first screen application (hiboard), and the desktop application (lancher).

[0055] It is understandable that the input management service 41 may convert the original touch event into a MotionEvent object, such as downEvent.

[0056] It can be understood that the negative one screen application 42 represents the negative one screen application in the software architecture of the electronic device 100 .

[0057] It can be understood that the desktop application 43 represents a desktop application in the software architecture of the electronic device 100 .

[0058] S41 : The input management service 41 distributes the click event to the negative one screen application 42 .

[0059] First, the user slides up, and the input management service 41 converts the operation into a click event (downEvent) and notifies the negative one screen application 42.

[0060] For example, the click event may include information such as the coordinates of the touch point, pressure, and tool. Figure 1A , Figure 1B, detecting a swipe-up operation by the user at the bottom of the mobile phone 10, the input management service 41 may generate a downEvent corresponding to the operation, which includes specific parameters of the swipe-up operation, such as the swipe position.

[0061] S42: The negative-one-screen application 42 sends a slide-up notification message to the desktop application 43.

[0062] After the negative one screen application 42 receives the click event, the negative one screen application 42 determines the user operation as a swip up event according to the click event, and transmits a notification message corresponding to the swip up event to the desktop application 43 .

[0063] According to some other embodiments, the input management service 41 may also distribute the click event to the desktop application 43, and then the desktop application 43 may identify the click event as a slide-up event based on the content of the click event.

[0064] Exemplarily, the desktop application 43 can calculate the desktop view according to the progress of the sliding event, such as Figure 1B The zoom ratio of the main screen interface 1C shown is shown in FIG. 1. For example, the calculation is performed based on one or more of the current position and speed of the gesture, wherein the position and speed information used in the calculation is included in the content of the click event.

[0065] As the swipe up gesture progresses, the zoom ratio may gradually decrease. In other words, the zoom ratio of the main screen interface 1C drawn by the desktop application 43 gradually decreases during the swipe up gesture.

[0066] S43: The negative one screen application 42 transmits a left shift parameter to the desktop application 43.

[0067] The negative one screen application 42 passes the left shift parameters of each frame to the desktop application 43 through the overScrollChange() interface, so that the launcher can draw the main screen interface according to the left shift parameters. Figure 1B The main screen interface 01C in the interface shown.

[0068] S44: The desktop application 43 determines whether the multi-task card is visible; if so, go to step S45.

[0069] If the result of the judgment is yes, it means that the multi-task card (recentsView) is visible, and it is necessary to jump to the multi-task interface, and there are recent applications or background applications, then it is necessary to create an animation for the multi-task card. In this case, it is necessary to go to step S45 to continue execution.

[0070] Optionally, the desktop application 43 may register a BroadcastReceiver to monitor system broadcasts, or query the system service for the status of the task view, etc., to determine whether the multi-task card is visible.

[0071] S45: Desktop application 43 creates Alpha animation and Translation animation.

[0072] For example, creating an Alpha can be done through Android TM Specifically, you can use the ObjectAnimator or ValueAnimator class to create an Alpha animation.

[0073] For example, reference Figure 5A and Figure 5B The Alpha animation may be a transparency animation of the multitasking card 05B. For example, after the mobile phone 10 detects that the touch point disappears, that is, after the user releases the finger, the multitasking card 05B is gradually displayed based on a preset transparency change.

[0074] For example, creating a Translation animation can be done through Android TM Specifically, you can use the ObjectAnimator or ValueAnimator class to create a Translation animation, such as a translationX animation.

[0075] For example, reference Figure 5A and Figure 5B , the Translation animation can be a displacement animation of the multitasking card 05B. For example, after the mobile phone 10 detects that the touch point disappears, that is, the user releases the finger, the multitasking card 05B is Figure 5A The left side of the screen shown is shifted to Figure 5B Animation of the displacement of the center of the screen shown.

[0076] S46: The desktop application 43 determines whether the negative one screen is visible; if so, go to step S47; if not, go to step S48.

[0077] If the result of the determination is yes, indicating that the negative one screen is visible, the mobile phone 10 will execute the relevant process of returning to the desktop, that is, displaying the screen sliding from the negative one screen interface to the desktop, and then proceeding to step S47.

[0078] If the judgment result is no, it means that the negative one screen is not visible, and the mobile phone 10 is about to execute the relevant process of displaying the multitasking interface, that is, the desktop part in the view displayed by the mobile phone 10 gradually disappears, and a multitasking card may be added to the view, and then go to step S48 to continue execution.

[0079] Optionally, the desktop application 43 may register a BroadcastReceiver to listen to system broadcasts, or query the system service for the status of the task view, etc., to determine whether the negative first screen is visible. In other embodiments, the desktop application 43 may send a detection request to the negative first screen application 42, and the negative first screen application 42 may return the detection result to the desktop application 43, so that the negative first screen application 42 can detect whether the negative first screen is visible.

[0080] It should be noted that the embodiment of the present application does not limit the form and creation time of the Alpha animation and TranslationX animation of the multi-task card.

[0081] S47: The desktop application 43 restores the desktop size.

[0082] It can be understood that restoring the desktop size means restoring the desktop size when returning to the desktop successfully. Figure 1C As shown, when the leftmost side of the main screen interface 1C reaches the leftmost side of the view of the mobile phone 10, the zoom ratio of the main screen interface 1C is restored. For another example, when the main screen interface 1C reaches the center of the view of the mobile phone 10, that is, when it is displayed in the center, the zoom ratio of the main screen interface 1C is restored.

[0083] According to some embodiments, the desktop size can be restored by using the scale command, for example, by using the setScaleX() and setScaleY() commands to restore the horizontal and vertical scaling ratios.

[0084] According to some embodiments, after the user swipes up, the negative one screen becomes visible. At this time, the mobile phone 10 can restore the desktop size to the size shown in the figure when the desktop returns successfully. Figure 1C In this embodiment, at the touch point Figure 1A Move the position shown to Figure 1B During the process of returning to the position shown in the figure, the zoom ratio of the main screen interface 01C will gradually decrease; after successfully returning to the desktop, the mobile phone 10 restores the zoom ratio of the main screen interface 01C to the original ratio.

[0085] S48: Desktop application 43 creates a Scale animation.

[0086] For example, reference Figure 5A The Scale animation may be a zoom animation of the main screen interface 05A, that is, an animation of enlarging or reducing elements in the main screen interface 05A.

[0087] According to some embodiments, creating a Scale animation can be done by Android TM Specifically, you can use the ObjectAnimator class to create a Scale animation.

[0088] For example, when the mobile phone 10 detects that the touch point disappears, that is, after the user releases his finger, the main screen interface 05A is enlarged. Figure 5A , Figure 5B In the example shown, after the touch point disappears, as the main screen interface 05A is enlarged, the main screen interface 05A will gradually disappear, and finally Figure 5B shown, replaced by a solid color background.

[0089] It should be noted that the above is only an example, and the embodiment of the present application does not limit the form and creation time of the desktop Scale animation.

[0090] According to the embodiment of the present application, the mobile phone 10 does not need to create an animation when the negative one screen is visible, which releases the CPU load and ensures the smooth operation of the negative one screen application 42.

[0091] Combine the following Figure 6 An exemplary process of an interface switching method provided by an embodiment of the present application is introduced. For ease of description, the electronic device 100 is taken as a mobile phone 10 as an example for explanation.

[0092] S61: Detecting a user sliding up on the negative one screen.

[0093] It can be understood that the upward sliding operation means that the user first touches a first position, and then the touch point moves upward to a second position above the first position, wherein the first position is located at the bottom area of ​​the screen, or the distance between the first position and the bottom of the screen is less than a preset distance.

[0094] According to some embodiments, sliding up from the bottom of the negative screen can be divided into the following situations:

[0095] The first is that the distance between the second position and the bottom of the screen is less than the first distance. In this case, the upward swipe operation triggers the return to the desktop. In this case, during the return to the desktop, the negative one screen interface and the main screen interface will be displayed at the same time in the foreground.

[0096] The second type is that the distance between the second position and the bottom of the screen is greater than or equal to the first distance, and the user stops touching immediately after the touch point moves to the second position. At this time, the swipe up operation will also trigger a return to the desktop. In this case, during the process of returning to the desktop, the negative one screen interface and the main screen interface will be displayed in the foreground at the same time.

[0097] The third type is that the distance between the second position and the bottom of the screen is greater than or equal to the first distance, and after the touch point moves to the second position, the user stays for a while, that is, the duration of touching the second position is greater than the first duration. In this case, the swiping up operation will trigger the multitasking interface.

[0098] For example, when there is a background task, the following will be triggered: Figure 2 The interface shown includes a display background and at least one multi-task card, where each task card can correspond to a background application. Figure 2 Task card 02B is shown.

[0099] In the absence of background tasks, the triggered multitasking interface may not include Figure 2 The task card 02B shown, for example, only includes a display background. Exemplarily, the display background can be a main screen interface with a blurred display or a high transparency display, or can be a blurred display with a solid color background.

[0100] S62: Control the desktop to shrink during the hand following process.

[0101] It can be understood that the hand-following process is the process of the touch point moving from the first position to the second position.

[0102] During the hand tracking process, the desktop gradually shrinks, indicating that the zoom ratio of the desktop display gradually decreases. In addition, the zoom ratio is negatively correlated with the distance the touch point moves. In other words, as the touch point moves from the first position and gradually moves away from the first position, the zoom ratio of the desktop also gradually decreases accordingly.

[0103] According to some embodiments, the mobile phone 10 can record the information of the first position and continuously track the current position of the touch point, calculate the sliding distance or the distance change between the first position and the current touch point in real time, and then determine the zoom ratio according to the sliding distance, and then display the main screen desktop according to the determined zoom ratio.

[0104] For example, Figure 7 As shown, there are a third position 73 and a fourth position 74 between the first position 71 and the second position 72. When the touch point moves to the third position 73, the scaling ratio of the desktop is m; when the touch point continues to move upward to the fourth position 74, the scaling ratio of the desktop is n, where m>n.

[0105] In the above-mentioned embodiment, the scaling ratio is negatively correlated with the sliding distance. In other embodiments, the scaling ratio may also be related to at least one of the sliding speed and the sliding duration.

[0106] S63: Determine whether the negative one screen interface is in the foreground.

[0107] It can be understood that the negative one screen interface is included in the view displayed by the mobile phone 10 after the sliding up operation is detected in the foreground.

[0108] If the judgment result is yes, that is, after the user slides up, if the negative one screen interface is displayed in the foreground, it means that the mobile phone 10 is about to execute the relevant process of returning to the desktop, that is, the screen sliding from the negative one screen interface to the desktop is displayed. In this case, go to step S64 to continue execution.

[0109] If the judgment result is no, that is, after the user swipes up, if the negative one screen interface is not displayed in the foreground, it means that the mobile phone 10 is about to execute the relevant process of displaying the multitasking interface, that is, the desktop part in the view displayed by the mobile phone 10 gradually disappears, and a multitasking card may be added to the view. In this case, go to step S65 to continue execution.

[0110] S64: When the desktop reaches the specified position, the desktop size is restored.

[0111] Here, restoring the desktop size means displaying the main screen interface according to the original zoom ratio.

[0112] According to some embodiments, during the hand tracking process introduced in step S62, the zoom ratio of the main screen interface is reduced, that is, the overall size of the desktop is reduced; and after the desktop reaches the specified position, the size of the desktop is restored to its original size.

[0113] Among them, the entire content of the main screen interface is displayed in the view, and the leftmost side of the main screen interface is located at the leftmost side of the view displayed on the screen, indicating that the desktop has reached the specified position. At this time, the negative one screen interface in the view has completely disappeared, and the view displayed by the mobile phone 10 only includes the main screen interface. It can be understood that the specified position, that is, the leftmost side of the main screen interface reaches the leftmost side of the view displayed by the mobile phone 10. Correspondingly, the left shift distance at this time is the view width, or the screen width of the mobile phone 10.

[0114] It can be understood that after step S62, that is, after the user of the mobile phone 10 slides up and releases the touch point, for example, referring to Fig. 8A After the touch point disappears at the second position 72, the mobile phone 10 needs to display a frame-by-frame sliding picture from the negative one screen interface 08A to the main screen interface 08C, for example Figure 8B The interface shown in FIG. 1 , wherein each frame of the sliding screen is composed of at least a portion of the negative one screen interface 08A and at least a portion of the main screen interface 08C.

[0115] According to some embodiments, the process of drawing each frame is as follows: for each frame, the negative one screen main thread draws the negative one screen interface 08A in the frame according to the sliding distance, and then the negative one screen main thread sends the left shift parameter translationX representing the sliding distance to the desktop main thread; the desktop main thread draws the main screen interface 07C in the frame according to translationX. The above process is repeated to draw each frame frame by frame.

[0116] It can be understood that, in the sliding screen, as the display width of the negative one screen interface 08A becomes smaller and smaller, the display width of the main screen interface 08C becomes larger and larger. Figure 8C As shown, the negative one screen interface 08A in the view disappears completely, and the main screen interface 08C is fully displayed. At this time, the leftmost side of the main screen interface reaches the leftmost side of the view of the mobile phone 10, and the desktop size is restored to the original size.

[0117] According to some embodiments, the desktop size can be restored by a scale instruction, for example, by a setScaleX(scale) or setScaleY(scale) instruction.

[0118] S65: Create and display a desktop scaling animation.

[0119] It can be understood that the zoom animation can be a scale animation, that is, an animation that enlarges or reduces the elements in the interface.

[0120] According to some embodiments, if it is determined in step S63 that the negative one screen is not in the foreground, it means that the user's intention is not to return to the desktop, but to jump to the multitasking interface. Accordingly, the mobile phone 10 needs to jump from the negative one screen to the multitasking interface. During the jump process, the desktop zoom animation needs to be applied, so the mobile phone 10 needs to create a desktop zoom animation.

[0121] It can be understood that the desktop zooming animation may include one or more of a zoom-in animation and a zoom-out animation, and the embodiment of the present application does not limit this.

[0122] According to some embodiments, if it is determined in step S63 that the negative one screen is not in the foreground, it means that the user operation belongs to the third operation form introduced in step S61 above, wherein the distance between the second position and the bottom of the screen is greater than or equal to the first distance.

[0123] The following describes the desktop zoom animation using the zoom animation as an example.

[0124] When the touch point stays at the second position, the mobile phone 10 can display a multitasking card near the edge on one side. Figure 5A, the multitasking card 05B is on the left side of the screen of the mobile phone 10, occupying about 10% of the width of the view; at the same time, as the interface background, the other areas in the view display the blurred and blurred main screen interface 05A. According to some embodiments, the zoom ratio of the main screen interface 05A in the interface background at this time can be consistent with the final zoom ratio of the main screen interface after the hand tracking process in step S62. It should be noted that Figure 5A What is displayed is the interface when there is a background application. If there is no background application, the multitasking card 05B will not be displayed, and only the interface background 05A needs to be displayed.

[0125] When the touch point leaves the second position, that is, after the user releases the touch, Figure 5B , the multitasking card 05B can be moved to the center of the view.

[0126] For the interface background in the view after the touch point leaves the second position, according to some examples, when the touch point leaves the second position, the interface background can be converted from the blurred, virtual main screen interface 05A to a solid color background. In this process, the mobile phone 10 will display the enlargement and fade-out animation of the main screen interface 05A.

[0127] The zoom-in animation can zoom the main screen interface 05A from the zoom ratio reduced in the hand-following process in step S62 to the original zoom ratio. It can be understood that the zoom-in process can be presented in the view in the form of a zoom-in animation. The fade-out is the animation process of converting the main screen interface 05A into a solid color background. For example, the elements in the main screen interface 05A can be gradually faded and finally completely disappeared. The view is displayed as follows: Figure 5B White solid background shown.

[0128] According to some other examples, when the touch point leaves the second position, the interface background may still be the blurred and virtual main screen interface 05A. In this embodiment, the electronic device may display a zoom-in animation of the main screen interface 05A. The zoom-in animation may zoom the main screen interface 05A from the zoom ratio reduced in the hand-following process in step S42 to the original zoom ratio. It is understood that the zoom-in process may be presented in the view in the form of a zoom-in animation.

[0129] According to some other examples, when the touch point stays at the second position, the mobile phone 10 can display the main screen interface 05A, that is, a zoom animation of the interface background, such as a magnification animation. In this embodiment, the interface background will be magnified to a larger zoom ratio from the final zoom ratio of the main screen interface 05A after the hand tracking process in step S62. Optionally, when the touch point stays at the second position, the electronic device can display a wallpaper screen, that is, the icons in the main screen interface 05A are not displayed.

[0130] It should be noted that the above embodiment only introduces a method for implementing a zoom animation, and the present application does not limit the form and timing of the desktop zoom animation. In other embodiments, if the view is to jump from the negative one screen to the multitasking interface, the desktop zoom animation that the mobile phone 10 needs to create and display can also be other forms of animation.

[0131] It is understandable that in the embodiment of the present application, the zoom animation can be displayed at different times according to the specific interaction design method. In other words, the embodiment of the present application does not limit the execution time of step S45.

[0132] S66: Determine whether the multitasking card is visible; if so, go to step S67; if not, end the process.

[0133] If the multitasking card is not visible, it means there is no background application or there is no need to jump to the multitasking interface. In this case, there is no need to create an animation for the multitasking card or display the multitasking card. The process can be ended at this time.

[0134] If the multitasking card is visible, it means that you need to jump to the multitasking interface, and there are recent applications or background applications, then you need to create an animation for the multitasking card and go to step S67.

[0135] S67: Create and display animation for multi-tasking cards.

[0136] According to some embodiments, transparency animation and displacement animation of multi-task cards may be created.

[0137] Among them, transparency animation can be Alpha animation. Transparency animation refers to changing the transparency of a view to create a gradual appearance or disappearance effect. Taking Alpha animation as an example, in the animation, transparency is controlled by the alpha property, and its value range is 0 to 1, where 0 means completely transparent and 1 means completely opaque. Transparency animation can be created using an animation library, for example, the animation library can be Android TM ObjectAnimator or iOS TM UIView.animate.

[0138] It is understood that after the transparency animation is created, the multi-task card can be transparently displayed based on the specified transparency, and the animation effect based on the transparency change can be realized. For example, when the touch point stays at the second position, the multi-task card is displayed based on the preset transparency animation.

[0139] The displacement animation may be a Translation animation. For example, the translationX animation in the Translation animation may be to move the view along the X-axis (horizontally) to create an effect where the view slides left and right. Displacement animations are often used in card-style layouts, such as a multitasking interface that contains one or more task cards, to simulate the feeling of users flipping cards in the physical world. Taking the Translation animation as a translationX animation as an example, the view effect of the displacement animation can be changed by changing the translationX property of the view, including the translationX parameter of the starting point of the displacement and the translationX parameter of the end point of the displacement. Displacement animations can be created using an animation library, for example, the animation library can be Android TM ObjectAnimator from , or ViewAnimator from a third-party animation library, and so on.

[0140] It is understood that after the displacement animation is created, the displacement animation effect of the multitasking card during the sliding process can be realized. For example, when the touch point disappears from the second position, the multitasking card slides from one side of the mobile phone 10 screen view to the center of the view.

[0141] It is understandable that in the embodiment of the present application, the animation of the multi-task card can be displayed at different times according to the specific interaction design method. In other words, the embodiment of the present application does not limit the execution time of creating and displaying the transparency animation and creating and displaying the displacement animation in step S67.

[0142] According to some embodiments, exemplary pseudo codes of steps S63 to S67 are as follows:

[0143] if (when the foreground application is one screen below) {

[0144] Loop and take out the desktop view from the views collection;

[0145] Set the size of the view to the restored scale respectively;

[0146] } else {

[0147] Create a desktop scaling animation (Scale);

[0148] }

[0149] if (recent multitasking card is visible) {

[0150] Create transparency animation (Alpha) and offset animation (Translation) for multi-task cards;

[0151] }

[0152] It is understood that the actual implementation code is not limited to the code logic of the above pseudo code. In other embodiments, steps S63 to S67 can also be implemented by other code implementation methods.

[0153] Since there are many ways for users to return to the desktop, such as sliding operations, and sliding up at the bottom of the screen is a faster way. Therefore, in this scenario, the response speed of the device is more important than the animation effect. Through an interface switching method provided by the present application, unnecessary animations can be deleted in the process of returning to the desktop from the negative one screen, thereby reducing the CPU load, so that the negative one screen thread with a lower priority can also be scheduled in time, avoiding the negative one screen thread from being in the runnable state for a long time, and avoiding the blocking of parameter passing, thereby avoiding the jamming phenomenon in the process of returning to the desktop.

[0154] Furthermore, the interface switching method of the present application retains the dynamic effect of the desktop shrinking with the hand, so the electronic device can intuitively present the sliding distance through the scaling of the interface, assisting the user to perform more precise operations. For example, if you swipe up from the bottom of the screen and the swiping distance is short, it means that the user's operation intention is to return to the desktop. When the desktop returns, the interface switching method of the present application restores the desktop size in one frame, which can visually avoid the problem of sudden scaling changes.

[0155] In order to further introduce the optimization of the negative one screen thread scheduling of the present application scheme, the following is combined with Fig. 9 An exemplary process of drawing an interface on the mobile phone 10 is introduced. According to some embodiments, during the interface switching process, the interface drawing process applied to the mobile phone 10 can refer to Fig. 9 , the process includes:

[0156] S91: Detecting a user sliding up at the bottom of the negative one screen.

[0157] It can be understood that the upward sliding finger first touches a first position in the bottom area of ​​the screen, and then the touch point moves upward to a second position above the first position.

[0158] According to some embodiments, sliding up from the bottom of the negative screen can be divided into the following situations:

[0159] The first type is that the distance between the second position and the bottom of the screen is smaller than the first distance. In this case, the upward swipe operation will trigger a return to the desktop.

[0160] The second type is that the distance between the second position and the bottom of the screen is greater than or equal to the first distance, and after the touch point moves to the second position, the user immediately stops touching. In this case, the upward swipe operation will also trigger a return to the desktop.

[0161] The third type is that the distance between the second position and the bottom of the screen is greater than or equal to the first distance, and after the touch point moves to the second position, the user stays for a while, that is, the duration of touching the second position is greater than the first duration. In this case, the swipe up operation triggers the multitasking interface, such as triggering Figure 3 The interface shown.

[0162] In other scenarios, users can also perform other gesture operations on the negative first screen, such as sliding, to switch to the main screen interface.

[0163] S92: Determine based on the upward sliding operation that the user intends to return to the desktop.

[0164] It can be understood that by processing the gesture of the swipe up operation, when the swipe up operation meets the preset conditions, it can be determined that the corresponding user intention is to return to the desktop. For example, if the swipe up operation meets the conditions of one of the above three situations, the corresponding processing flow can be entered.

[0165] Exemplarily, if the swipe up operation is in the first or second case described above, it is determined that the user intends to return to the desktop. For example, if it is determined that the distance between the second position and the bottom of the screen is less than the first distance, it is determined that the user intends to return to the desktop, and the process of returning to the desktop can be entered.

[0166] S93: After the negative one screen main thread draws the negative one screen interface, the left shift parameter is passed to the desktop main thread.

[0167] According to some embodiments, after the negative-one screen main thread finishes drawing the negative-one screen interface, the left shift parameter translationX may be passed to the desktop main thread through the overlayScrollChange interface.

[0168] For example, the overlayScrollChange interface is an interface related to view scrolling, which can be used to monitor and respond to the scrolling of the overlay view when the view scrolls, including the real-time position of the overlay view. It can be understood that the overlay view refers to the view located on top of other views, such as Figure 1B The suspended negative one screen interface 1A and the main screen interface 1C.

[0169] Wherein, translationX is used to represent the horizontal translation distance of the view. In this embodiment, it can represent the sliding distance of the view from the negative one screen to the main screen.

[0170] Among them, the overlayScrollChange interface can be used to pass the current horizontal position of the scroll, that is, represented by the left shift parameter translationX, so that the desktop main thread knows the main screen content and display position that need to be displayed currently, so as to update the main screen interface of the current frame.

[0171] It can be understood that before step S93, the negative one screen main thread has completed the drawing of the negative one screen interface of the current frame. It can be understood that the current frame represents a frame that has not yet been displayed on the electronic device 100. After the left shift parameter is passed to the desktop main thread, the desktop main thread can draw the main screen interface according to the left shift parameter.

[0172] S94: Control the desktop to move left through the left shift parameter.

[0173] According to some embodiments, the desktop main thread can determine the content of the main screen interface that needs to be displayed currently and the display position of the content in the main screen interface based on translationX, so as to draw the main screen interface of the current frame.

[0174] For example, translationX indicates that the left shift distance is a first length, and the desktop main thread can draw a main screen interface of the first length.

[0175] It can be understood that after the desktop main thread completes drawing of the main screen interface of the current frame, the electronic device 100 can display the negative one screen interface of the current frame and the main screen interface of the current frame.

[0176] S95: Determine whether the desktop has reached the specified position; if not, go to step S93; if so, end the process.

[0177] Among them, the entire content of the main screen interface is displayed in the view, and the left side of the main screen interface reaches the leftmost side of the view, which means that the desktop reaches the specified position. It can be understood that the specified position, that is, the leftmost side of the main screen interface reaches the leftmost side of the view displayed by the electronic device 100. Correspondingly, the left shift distance at this time is the view width, or the screen width of the electronic device 100.

[0178] If the desktop does not reach the specified position, it means that the interface switch from the negative screen to the desktop has not yet ended, and the view interface of the next frame still needs to be drawn. Among them, the view interface of the next frame specifically includes the negative screen interface of the next frame and the main screen interface of the next frame. After going to step S93, the negative screen main thread can pass the left shift parameter of the next frame to the desktop, so that the desktop draws the main screen interface of the next frame. Repeat the cycle until the desktop reaches the specified position, indicating that the return to the desktop is successful.

[0179] During the execution of the above steps S93 to S95, the electronic device 100 can display the view screen of the interface switching frame by frame. In this process, only when the desktop main thread receives translationX, can the desktop main thread draw the main screen interface of the next frame; however, for the negative one screen main thread, its own scheduling priority is lower than the priority of desktop threads such as the desktop main thread, resulting in the drawing of the negative one screen main thread being affected. If the negative one screen main thread does not draw the negative one screen interface, it will not send translationX to the desktop main thread, resulting in the desktop main thread being unable to perform drawing operations, thereby affecting the display of the next frame.

[0180] For example, Fig.10 The diagram shows a thread interface 10A and a thread tracking interface 10B, including multiple threads of the mobile phone 10, wherein the desktop thread produces a large number of animations, including: 5 transparency animations, 7 scaling animations, and 5 displacement animations. Since the production of these animations requires a large amount of resources, the CPU load is increased, and the negative one screen thread cannot be scheduled. Therefore, the negative one screen main thread will be in a runnable state for a long time, rather than being in a running state, which eventually leads to the freezing phenomenon of the switching interface.

[0181] After applying the interface switching method provided in the embodiment of the present application, when the mobile phone 10 returns to the desktop, the desktop thread does not need to draw animation, so the CPU load is low, and the situation where the negative one screen main thread cannot be scheduled will not occur, thus avoiding screen freeze.

[0182] Fig.11 According to an embodiment of the present application, a structural schematic diagram of an electronic device 100 is shown.

[0183] 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air 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.

[0184] It is to be understood that the structure illustrated in the embodiment of the present invention 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 shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0185] 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 processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0186] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0187] The processor 110 may 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 may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0188] In some embodiments, the processor 110 of the electronic device 100 is used to display a first interface by calling program instructions stored in a memory, wherein the first interface is located to the left of a second interface and the second interface is a main screen interface; upon detecting a user's swiping up operation based on the first interface, the second interface is displayed, wherein: when the first interface is partially displayed and the second interface is partially displayed, the second interface is displayed based on the first zoom ratio, until the first interface is not displayed, and the second interface is displayed based on the original zoom ratio.

[0189] In some embodiments, the processor 110 may include one or more interfaces. The interface may include 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.

[0190] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0191] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0192] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0193] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0194] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects 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 that execute program instructions to generate or change display information.

[0195] The display screen 194 is used to display images, videos, etc. The display 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), MiniLED, MicroLED, Micro-oLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0196] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0197] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0198] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0199] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be arranged 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. A capacitive pressure sensor can be a parallel plate including at least two 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 based on 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 based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. For example: For example, when there is a touch operation in the first image area or in the first identification frame, it can be determined that the user has selected the content of the first image area, such as an image or text in the first image area.

[0200] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass 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 other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194. For example, the touch sensor 180K can detect the user's sliding up operation at the bottom of the screen.

[0201] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0202] Accordingly, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor for executing instructions of the above-mentioned interface switching method.

[0203] Accordingly, an embodiment of the present application provides a storage medium on which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the above-mentioned interface switching method.

[0204] A computer program product includes: a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium contains a computer program code for executing the above-mentioned interface switching method.

[0205] This specification provides method or process operation steps as shown in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one of many execution orders and does not represent the only execution order. In actual execution, the method or process shown in the embodiments or drawings may be executed in sequence or in parallel (for example, in a parallel controller or multi-threaded processing environment).

[0206] The embodiments disclosed in the present application may be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including 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.

[0207] Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0208] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0209] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical disk read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0210] As used herein, the term "module" may refer to, be a part of, or include: a memory (shared, dedicated, or group) for running one or more software or firmware programs, an application-specific integrated circuit (ASIC), an electronic circuit and / or processor (shared, dedicated, or group), a combinational logic circuit, and / or other suitable components that provide the functionality.

[0211] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order is not required. Instead, in some embodiments, these features may be described in a manner and / or order different from that shown in the illustrative drawings. In addition, the structural or method features included in a specific figure do not mean that all embodiments need to include such features. In some embodiments, these features may not be included, or these features may be combined with other features.

Claims

1. An interface switching method, characterized in that: Used in electronic equipment, including: Displaying a first interface, wherein the first interface includes a left-slide screen interface; Detecting a first operation of the user on the first interface; The interface switching is performed based on the first operation, wherein: The first operation is a first swipe-up operation, wherein the first swipe-up operation is used to indicate switching to the second interface, the second interface is displayed based on multiple zoom ratios during the execution of the first swipe-up operation, and a frame-by-frame sliding screen from the first interface to the second interface is displayed when the first swipe-up operation is completed, and the reduced second interface is restored to the unreduced second interface; Wherein, the second interface is the main screen interface; The sliding screen of each frame includes at least a part of the first interface and at least a part of the second interface; the first interface in each frame of the sliding screen is drawn by the main thread corresponding to the first interface according to the sliding distance of the sliding screen; the second interface in each frame of the sliding screen is drawn by the main thread corresponding to the second interface according to the parameter representing the sliding distance; the parameter representing the sliding distance is sent by the main thread corresponding to the first interface to the thread corresponding to the second interface; the priority of the main thread corresponding to the first interface is lower than the priority of the main thread corresponding to the second interface and the priority of the rendering thread corresponding to the second interface; During the execution of the first swipe-up operation, the zoom ratio of the second interface gradually decreases, and the zoom ratio is negatively correlated with the operation distance of the first swipe-up operation.

2. The method according to claim 1, characterized in that The performing interface switching based on the first operation also includes: Corresponding to the first operation being a second swipe-up operation, the second swipe-up operation is used to indicate switching to a third interface, and in the process of switching from the first interface to the third interface, the second interface is displayed, and the third interface includes a multitasking interface; Based on the animation of the second interface, controlling the displayed content of the second interface to gradually fade out; The third interface is displayed.

3. The method according to claim 2, characterized in that The animation of the second interface includes a zooming animation.

4. The method according to claim 2, characterized in that: The displaying of the third interface includes: Corresponding to the third interface including a multi-tasking card, the multi-tasking card and the animation of the multi-tasking card are displayed.

5. The method according to claim 4, characterized in that The animation of the multi-task card includes transparency animation and displacement animation, and The displaying of the multi-task card and the animation of the multi-task card includes: Based on the transparency animation of the multi-task card, controlling the third interface to gradually appear; Based on the displacement animation of the multi-task card, the third interface is controlled to move from an initial position to a target position.

6. The method according to any one of claims 2 to 5, characterized in that: The sliding parameters of the first sliding up operation and the second sliding up operation are different.

7. The method according to claim 6, characterized in that The sliding parameter includes at least one of a sliding distance, a sliding speed, and a sliding duration.

8. An electronic device, characterized in that: include: a memory for storing instructions to be executed by one or more processors of the electronic device, and The processor, when executing the instructions in the memory, can enable the electronic device to execute the method according to any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the method according to any one of claims 1 to 7.

10. A computer program product comprising: A non-volatile computer-readable storage medium comprising a computer program code for executing the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Interface display method and electronic equipment

    CN117827070A