Content display method, electronic equipment, chip system and storage medium
By removing the dock's bounce animation and replacing it with a window animation, the lag issue during swiping on electronic devices was resolved, improving the user experience.
Patent Information
- Application Number
- CN202410941856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2026-01-23
AI Technical Summary
In electronic devices that use the dock, stuttering issues often occur, especially under high load during swiping operations.
By canceling the dock's bounce animation during swiping and replacing its hide animation with a window animation, the load on electronic devices can be reduced.
It effectively reduces lag on electronic devices during swiping operations, thus improving the user experience.
Smart Images

Figure CN121387162A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic devices, and in particular to a content display method, an electronic device, a chip system, and a storage medium. BACKGROUND
[0002] Electronic devices provide more and more functions, which can provide users with more convenient and fast ways to use electronic devices. For example, some tablets provide a dock bar, which can also be called a Taskbar. The dock bar can display a plurality of application icons, and users can implement some corresponding functions by operating the application icons in the dock bar. However, in some application scenarios related to the dock bar, the situation of lag often occurs. SUMMARY
[0003] The present application provides a content display method, an electronic device, a chip system, and a storage medium, which can reduce the situation of lag in some scenarios related to the dock bar.
[0004] To achieve the above object, the first aspect of the present application provides a content display method, which adopts the following technical solution:
[0005] During that the electronic device displays an interface of a first application, a first sliding operation is detected;
[0006] In response to the first sliding operation, the electronic device displays a system desktop;
[0007] Before the first sliding operation ends, the electronic device displays a taskbar;
[0008] After the first sliding operation ends, the electronic device displays a bounce animation of the taskbar, displays a system desktop, and the taskbar is displayed on the system desktop;
[0009] During that the electronic device displays the interface of the first application, a second sliding operation is detected;
[0010] In response to the second sliding operation, the electronic device displays a multi-task management interface;
[0011] Before the second sliding operation ends, the electronic device displays the taskbar;
[0012] After the first sliding operation ends, the electronic device does not display the bounce animation of the taskbar, displays a multi-task management interface, and cancels the display of the taskbar.
[0013] The method can display the dock bar (i.e., the task bar) at the bottom of the screen when the electronic device enters the system desktop scene triggered by the sliding operation, and then display the rebound animation of the dock bar when the hand is released; and display the dock bar on the system desktop.
[0014] The method can display the dock bar at the bottom of the screen when the electronic device enters the multi-task scene triggered by the sliding operation, cancel the rebound animation of the dock bar, hide the dock bar, and display the trash can at the bottom of the screen, so that the trash can can be displayed in the multi-task scene; at the same time, the load can be reduced by canceling the rebound animation of the dock bar; the process of hiding the view of the dock bar is modified to hide the dock bar window, which can also reduce the load; in the case of reducing the load, the situation of lag can be reduced; in addition, after hiding the dock bar, the delay reset can be performed, so as to reduce the situation of flashing screen.
[0015] As another implementation of the first aspect, the task bar is located in a first area of the screen of the electronic device, and the first area is located at the bottom of the screen; the first sliding operation and the second sliding operation are both upward sliding operations starting from a second area of the screen, and a coordinate of a center point of the second area on the y-axis is less than a coordinate of a center point of the first area on the y-axis.
[0016] The task bar is a bottom dock bar. The sliding operation of the user needs to be triggered from the bottom of the screen. In order to avoid the situation that the sliding operation cannot be recognized, the sliding operation starting from a smaller area (usually smaller than the dock bar area) at the bottom can be triggered.
[0017] As another implementation of the first aspect, the sliding speed of the first sliding operation is greater than or equal to a first threshold value; the sliding speed of the second sliding operation is less than the first threshold value, and the sliding distance of the second sliding operation on the y-axis is greater than a first distance.
[0018] As another implementation of the first aspect, the task bar includes at least one application icon of an application; during the display of the system desktop by the electronic device, the method further includes:
[0019] The electronic device detects a third operation acting on the application icon of the second application in the task bar;
[0020] In response to the third operation, the electronic device displays the interface of the second application.
[0021] As another implementation form of the first aspect, when the electronic device displays the interface of the second application in response to the third operation, the display form of the interface of the second application includes: a split-screen form, a floating window form, a full-screen form, etc., and the display form of the interface of the second application is related to the type of the third operation.
[0022] The dock bar of the present application can display application icons, so that different operations on the application icons in the dock bar trigger the display of different forms of the application, for example, clicking to display in full screen. Left swipe and right swipe trigger split-screen display and floating window display, respectively. Various functions are provided.
[0023] As another implementation form of the first aspect, after the end of the first sliding operation, the electronic device cancels the display of the task bar, and the method further includes:
[0024] The electronic device displays a trash icon.
[0025] As another implementation form of the first aspect, the first sliding operation includes a pressing operation, a moving operation and a lifting operation; before the end of the first sliding operation, it is before the lifting operation in the first sliding operation; after the end of the first sliding operation, it is after the lifting operation in the first sliding operation; the pressing operation has a first coordinate; the moving operation has a plurality of second coordinates, and the lifting operation has a third coordinate.
[0026] As another implementation form of the first aspect, before the end of the first sliding operation, the method further includes:
[0027] The electronic device determines a first sliding distance of the first sliding operation on the y-axis according to the second coordinate and the first coordinate;
[0028] When the first sliding distance is greater than a second distance and less than a third distance, the electronic device displays a partial area of the task bar, and during the display of the partial area of the task bar, the movement track of the task bar on the y-axis is the same as the movement track of the touch point of the first sliding operation on the y-axis;
[0029] When the first sliding distance is greater than the third distance and less than a fourth distance, the electronic device completely displays the task bar, and during the display of the task bar, the movement track of the task bar on the y-axis is the same as the movement track of the touch point of the first sliding operation on the y-axis;
[0030] When the first sliding distance is greater than the fourth distance, the electronic device reduces the window of the first application, and during the display of the window of the first application, a moving track of the window of the first application on the y-axis is the same as a moving track of the touch point of the first sliding operation on the y-axis, and the first distance is greater than the fourth distance.
[0031] In order to improve the user experience, different display modes can be set at different positions during the sliding process corresponding to the up sliding operation of the user.
[0032] As another implementation form of the first aspect, after the first sliding operation ends, the method further includes:
[0033] The electronic device determines, according to the third coordinate and the first coordinate, a second sliding distance of the first sliding operation on the y-axis when the first sliding operation ends;
[0034] The electronic device determines whether the second sliding distance is greater than a third distance;
[0035] If the second sliding distance is greater than the third distance, the electronic device starts to perform a bounce effect of the task bar, and determines whether a sliding speed before the hand-up operation is greater than or equal to a first threshold value;
[0036] If the sliding speed is less than the first threshold value, the electronic device determines whether the second sliding distance is greater than a first distance;
[0037] If the second sliding distance is greater than the first distance, the electronic device determines to display a multi-task management interface;
[0038] In the case of determining to enter the multi-task management interface, the electronic device cancels the bounce effect of the task bar being performed;
[0039] In the case of determining to enter the multi-task management interface, the electronic device hides the task bar according to a value of a first flag and a value of a second flag, the value of the first flag indicating that the current is in an application, and the value of the second flag indicating that the task bar is currently in a display state.
[0040] In this application, after the hand is released, diversified display modes can be set, for example, the system desktop can be entered, and the multi-task management interface can also be entered, and different conditions can be set for different display modes according to user behavior habits.
[0041] As another implementation form of the first aspect, a time length from detecting the lifting hand operation of the first sliding operation to starting to perform the bounce animation of the taskbar is a first time length; a time length from detecting the lifting hand operation of the first sliding operation to determining to display the multi-task management interface is a second time length; a difference between the second time length and the first time length is less than a second value.
[0042] In the present application, the time length during which the bounce animation is generally cancelled is slightly longer than the time length during which the bounce animation is started. From the perspective of a user, the bounce of such a short time is generally not perceived. Therefore, from the perspective of a user, the bounce animation of the taskbar is not displayed.
[0043] As another implementation form of the first aspect, the electronic device hides the window of the taskbar.
[0044] In the present application, the hiding animation of the taskbar is changed from the view level to the window level, thereby reducing the load and thus reducing the lag.
[0045] As another implementation form of the first aspect, during the process of hiding the window of the taskbar, an Alpha value of the window of the taskbar changes from a first value to a second value.
[0046] The electronic device sets the Alpha value of the window of the taskbar to the first value after a third time length of hiding the window of the taskbar. When the Alpha value of the window of the taskbar is at the first value, the window of the taskbar has the ability to display the taskbar.
[0047] Since the Alpha value of the window of the taskbar changes from the first value to the second value during the process of hiding the window of the taskbar, in order to enable the dock bar to be displayed again when the next time the taskbar is slid upward, the Alpha value of the taskbar needs to be reset to the first value. If the reset is performed immediately, a screen flashing phenomenon may occur. Therefore, the reset is delayed for the third time length.
[0048] In a second aspect, an electronic device is provided. The electronic device includes a processor configured to invoke a computer program stored in a memory to implement any of the methods of the first aspect.
[0049] In a third aspect, a chip system is provided. The chip system includes a processor coupled to a memory. The processor executes a computer program stored in the memory to cause the electronic device to implement any of the methods of the first aspect.
[0050] In a fourth aspect, a computer readable storage medium is provided. The computer readable storage medium stores a computer program. When computer instructions of the computer program are executed on an electronic device, the electronic device implements any of the methods of the first aspect.
[0051] Fifthly, embodiments of this application provide a computer program product that, when run on a device, causes the electronic device to execute the method of any one of the first aspects of this application.
[0052] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0053] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0054] Figure 2 A schematic diagram of an interface for accessing the system desktop within an application, provided as an embodiment of this application;
[0055] Figure 3 A schematic diagram of the interface corresponding to multiple functions of the dock bar provided in the embodiments of this application;
[0056] Figure 4 A schematic diagram of an interface for entering a multitasking management interface within an application, provided as an embodiment of this application;
[0057] Figure 5 A software architecture diagram of the content display method provided in the embodiments of this application;
[0058] Figure 6 A timing diagram for in-application access to the system desktop is provided in an embodiment of this application;
[0059] Figure 7 An embodiment provided in this application Figure 6 A schematic diagram of the various distances in the diagram;
[0060] Figure 8 A timing diagram for entering a multitasking management interface within an application, provided as an embodiment of this application;
[0061] Figure 9 A schematic diagram of multiple flag bits provided in the embodiments of this application;
[0062] Figure 10 This application provides a timing diagram of the DOWM event during the process of entering the multitasking management interface.
[0063] Figure 11 A timing diagram showing the display of the dock bar corresponding to the move event during the process of entering the multi-task management interface, as provided in the embodiments of this application;
[0064] Figure 12 A timing diagram showing the responsiveness of the dock bar corresponding to the dock event during the process of entering the multitasking management interface, as provided in the embodiments of this application.
[0065] Figure 13 The timing diagram for canceling the bounce animation and hiding the dock bar during the process of entering the multi-task management interface provided in the embodiments of this application;
[0066] Figure 14 The animation of the window hiding the dock bar and the timing diagram of the dock bar reset during the process of entering the multi-task management interface provided in the embodiments of this application;
[0067] Figure 15 A schematic diagram illustrating how the application window changes according to the swiping operation during the process of bringing up the dock, as provided in an embodiment of this application.
[0068] Figure 16 A schematic diagram illustrating the position change of the application window during left or right swipes provided in this embodiment of the application.
[0069] Figure 17 This is a schematic diagram illustrating the process of the application window's position change on the x-axis, as provided in an embodiment of this application.
[0070] Figure 18 A timing diagram showing the position change of the application window on the x-axis for embodiments of this application;
[0071] Figure 19 A schematic diagram of an interface for dragging application icons from the dock, provided for an embodiment of this application;
[0072] Figure 20 Two schematic diagrams illustrating two different interfaces when dragging an application icon from the dock, provided for embodiments of this application;
[0073] Figure 21 A flowchart illustrating the icon and mask change process provided in the embodiments of this application;
[0074] Figure 22 The various classes or functions in SystemUI provided in the embodiments of this application;
[0075] Figure 23 This is a timing diagram showing the changes in the position of the icon and mask as the user drags them, provided for an embodiment of this application. Detailed Implementation
[0076] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details.
[0077] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0078] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0079] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0080] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0081] This application provides a content display method that can be applied to electronic devices. These electronic devices can be tablets, mobile phones, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. This application does not limit the specific type of electronic device.
[0082] Figure 1A schematic diagram of an electronic device is shown. 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, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 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, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0083] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0084] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0085] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0086] Internal memory 121 can be used to store computer executable program code, including instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as image playback). Touch sensor 180K, also called a "touch panel," can be disposed on display screen 194. Touch sensor 180K and display screen 194 together form a touch screen, also called a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. Touch sensor can transmit the detected touch operation to application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be disposed on the surface of electronic device 100, in a different location than display screen 194.
[0087] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0088] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized display, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0089] This application does not specifically limit the structure of the execution subject of a content display method. As long as the code recording a content display method according to this application is executed, communication can be performed according to the content display method provided in this application. For example, the execution subject of a content display method provided in this application can be a functional module in an electronic device capable of calling and executing a program, or a communication device applied in an electronic device, such as a chip.
[0090] Electronic devices offer an increasing number of functions that provide users with more convenient and faster ways to use them.
[0091] For example, some mobile phones offer a sidebar that can display multiple app icons, allowing users to perform corresponding functions by interacting with these app icons.
[0092] Some tablets offer a bottom dock, also known as a taskbar. The bottom dock can display multiple app icons, and users can perform corresponding functions by interacting with these app icons.
[0093] Reference Figure 2 This is a schematic diagram of an interface for triggering the display of the bottom dock bar, provided in an embodiment of this application.
[0094] Reference Figure 2 In (a), the electronic device displays any application interface, and the user swipes their finger up from the bottom of the screen.
[0095] Reference Figure 2In (b), when the user's finger slides a distance greater than distance D, the dock bar begins to appear at the bottom of the screen. At this time, a portion of the dock bar is displayed at the bottom of the screen, and the dock bar moves upward as the user's finger moves. During the movement, the position of the upper edge of the dock bar is consistent with the position of the user's finger's touch point in the vertical direction, that is, the dock bar follows the user's hand.
[0096] Reference Figure 2 In (c), when the user's finger swipes a distance greater than distance C, the dock bar is fully displayed at the bottom of the screen.
[0097] Reference Figure 2 In (d), when the user's finger slides a distance greater than distance B, the application window displayed on the screen begins to shrink, and at the same time, the application window moves as the user's finger moves upward, that is, the application window follows the hand.
[0098] Reference Figure 2 In examples (e) and (f), when the user releases their finger at a speed exceeding a certain threshold, the electronic device displays the system desktop. Additionally, in this example, the user's finger slides a distance greater than distance A.
[0099] Reference Figure 2 In (e) and (f), the position of the dock moves down as the user releases their finger, which is the dock's bounce animation (or bounce effect).
[0100] In electronic device display Figure 2 In case (f), users can perform certain actions on the application icons in the dock to trigger corresponding functions.
[0101] Reference Figure 3 This is a schematic diagram of some of the functions provided by the dock.
[0102] Reference Figure 3 In (a) and (b), the electronic device displays a dock bar within the application. When the user clicks on the icon of any application in the dock bar (e.g., the printer application), the electronic device launches the application and displays its interface. In other words, the dock bar can enable the function of quickly launching applications.
[0103] Reference Figure 3 In (c) and (d), the electronic device displays a dock bar within the application, and the user drags the application icon of any application in the dock bar (e.g., the printer application) to the left side of the screen, and the application is displayed in split screen on the left side of the screen.
[0104] Reference Figure 3In (e) and (f), the electronic device displays a dock bar within the application. When the user drags the application icon of any application in the dock bar (e.g., the printer application) to the right side of the screen, the electronic device displays a floating window of that application.
[0105] The drag position and display method of the application described above are for illustrative purposes only. In actual applications, they can be set according to specific circumstances.
[0106] In this embodiment, the functionality of the dock is only for illustrative purposes. In practical applications, the dock may provide more or fewer functions than those described above. This embodiment does not limit the specific functions of the dock.
[0107] In practical applications, when an electronic device displays an application interface, users can swipe up from the bottom of the screen to access the multitasking management interface (hereinafter referred to as multitasking). Multitasking displays application cards and a trash can for background applications. Users can perform various operations on the application cards to achieve corresponding functions. For example, an application card can be dragged into the trash can to delete the application running in the background; or an application card can be clicked to quickly launch and display the application.
[0108] After entering multitasking mode, both the trash can and the dock can be displayed. Normally, both the dock and the trash can are located at the bottom of the screen, which can cause a positional conflict. To avoid this conflict, this application provides a process for entering multitasking mode.
[0109] Reference Figure 4 This is a schematic diagram of the interface for entering multitasking provided in an embodiment of this application.
[0110] Reference Figure 4 (a) and Figure 4 In (b), the electronic device displays any application interface. The user's finger slides upwards from the bottom of the screen. When the sliding distance of the user's finger is greater than distance D, the dock bar begins to appear at the bottom of the screen. At this time, a portion of the dock bar is displayed at the bottom of the screen, and the dock bar moves upwards as the user's finger moves. During the movement, the position of the upper edge of the dock bar is aligned vertically with the position of the user's finger's touch point.
[0111] Reference Figure 4 In cases (c) and (d), when the user releases their finger after sliding a distance greater than distance A and at a speed less than or equal to a certain speed, the electronic device displays multitasking. The dock bar also exhibits a bounce animation when multitasking is displayed, which is understandable. Figure 4 Compared to the dock in (d) Figure 4The dock in (c) is positioned further down.
[0112] Reference Figure 4 In section (e), since the system desktop can already trigger the display of the dock on electronic devices, and multitasking is more related to background applications, from the perspective of actual user application, multitasking tends to set up a trash can. Therefore, this embodiment of the application sets up a hidden dock, that is, a hiding animation for the dock.
[0113] Reference Figure 4 The (f) option, when the dock is hidden, displays the trash can at the bottom of the screen.
[0114] In the above example, in Figure 4 (b) and Figure 4 Between (c) there is also Figure 2 (c) and Figure 2 (d) in the middle. Figure 4 Not shown.
[0115] It should be noted that after entering multitasking mode, application cards for multiple applications can be displayed in one horizontal row or in two horizontal rows. This embodiment of the application does not limit the display method of application cards for applications running in the background during multitasking.
[0116] During the process of entering multitasking, the animations performed include: animations of the multitasking application cards, the bounce animation of the dock, and the hiding animation of the dock. Under high load, stuttering or lag is more likely to occur.
[0117] To address this issue, this application provides a content display method that, when entering multitasking mode, cancels the dock bar's bounce animation to reduce load and changes the dock bar view's hide animation to the window's hide animation, thereby reducing lag.
[0118] The above example uses a tablet computer as an example. In practical applications, the dock bar can also be applied to other electronic devices, such as foldable screen phones.
[0119] The content display method provided in the embodiments of this application is described in detail below.
[0120] Reference Figure 5 This is a technical architecture diagram of the content display method provided in the embodiments of this application.
[0121] The application layer includes: launcher.
[0122] The launcher includes a gesture navigation module, which contains several sub-modules, such as Taskbar window management (for managing Taskbar windows), Taskbar state management (for managing Taskbar state), application interface call-up (for calling up the application interface), multi-task switching animation, multi-task display, Taskbar click to launch application (for launching application animation from the taskbar), and Taskbar application forming multiple windows, etc.
[0123] The launcher also includes a global dock module, which contains several sub-modules: All Apps (used to display all apps in the dock), Taskbar (the dock itself), long press to take a screenshot, click to launch an app (used to launch apps from the taskbar with an animation), drag to split screen (used to drag apps from the taskbar to display them in a split screen), three-button navigation, etc.
[0124] The "All Apps" option displays all apps in the dock and also manages apps whose icons can be displayed in the Taskbar. The Taskbar manages the windows in the dock. "Long-press screenshot" takes a screenshot after a long-press action. "Tap to launch app" launches the app pointed to by the app icon in the Taskbar after a tap action. "Drag to split screen" splits the app pointed to by the app icon in the Taskbar into two screens after a drag action.
[0125] The Launcher also includes other modules, such as those related to interaction: global gestures, multitasking & application launch, card-based functions, etc.; those related to desktop layout: standard mode, drawer mode, simple mode, split-screen mode, super power-saving mode, global search & negative one screen, etc.; those related to features: layout & styles, home interface icon management, widget management, folders, edit mode, etc.; and those related to basic capabilities: data management, internationalization, customization, motion effects engine, device adaptation, and DFX. The embodiments in this application will not describe the functions of these modules in detail.
[0126] The application framework layer includes the input & output event subsystem (input), the window subsystem (window manager service, WMS), and the display subsystem.
[0127] The native layer (native framework layer) includes InputDispatcher and SurfaceFlinger.
[0128] The driver layer includes the touch panel (TP) and the display.
[0129] The TP (Touch Panel) can detect user gestures on the touchscreen and report the coordinates of the gestures to the input dispatcher. The input dispatcher generates an input event based on the received coordinates and reports the event to the input device. The input device needs to distribute this input event to various applications; therefore, the input event needs to be sent to the WMS (Web Management System). The WMS determines the currently foreground application and then distributes the input event to that application via the input device, for example, to the Launcher. The Launcher can then respond accordingly to the input event.
[0130] When refreshing the screen display content, the application layer sends the display content to the display subsystem, which then sends the refreshed content to SurfaceFlinger. SurfaceFlinger then synthesizes an image based on the display content and sends it to the display, which controls the screen to display the corresponding image.
[0131] Reference Figure 6 This is a timing diagram of entering the system desktop provided in an embodiment of this application.
[0132] S101, input receives a touch operation from the bottom of the screen.
[0133] In this embodiment of the application, when the electronic device displays any application interface, the user can trigger the entry into the system desktop containing the dock bar by swiping up from the bottom of the screen, or trigger the entry into multitasking by swiping up from the bottom of the screen.
[0134] Swiping up from the bottom of the screen includes three events: down, move, and up. For example, a down event is generated when the user's finger touches the bottom of the screen, a move event is generated when the user swipes up from the bottom of the screen, and an up event is generated when the user lifts their finger (or releases their finger) after swiping up.
[0135] S102, after receiving a touch operation at the bottom of the screen, the input sends a down event to the Launcher, which carries the coordinate 0.
[0136] In this embodiment of the application, the coordinate 0 corresponding to the down event is the coordinate of the touch point position during the user's touch operation.
[0137] S103, after receiving the down event, the Launcher determines that the position of the down event is in the preset area at the bottom of the screen based on the coordinate 0 carried by the down event, and records the coordinate 0 of the down event.
[0138] In this embodiment of the application, the Launcher can determine whether the down event is an operation that starts from the bottom of the screen by using the coordinate 0 of the down event.
[0139] In practical implementation, a vertical range (the horizontal range is not limited) starting from the bottom of the screen can be set as a preset area. If coordinate 0 is within this preset area, it means that the down event is located in the preset area at the bottom of the screen.
[0140] During the user's subsequent swipe-up operation, the swipe distance of the finger needs to be determined by coordinate 0. Therefore, coordinate 0 also needs to be recorded.
[0141] S104, the input receives a swipe-up operation from the bottom of the screen.
[0142] In this embodiment, as the user swipes up, the position of the user's finger on the screen changes.
[0143] S105, after receiving a swipe-up action from the bottom of the screen, the input sends a move event to the Launcher, carrying coordinates 11.
[0144] In this embodiment, as the user's finger slides across the screen, the TouchPanel can detect the touch point position at a certain frequency and then report the touch point position at that frequency. Therefore, in practical applications, before the user lifts their hand off the screen, the step of sending move events will be executed at a certain frequency, only the coordinates of each move event are different.
[0145] In this context, coordinate 1 can represent the coordinate carried by the move event, indicating the position of the touch point during the swipe. The Input may send coordinates to the Launcher at a certain frequency, for example, sending coordinate 11 at time 1, coordinate 12 at time 2, coordinate 13 at time 3, and so on. That is, one swipe-up operation starting from the screen corresponds to: coordinate 0 for a down event, multiple coordinates 1 for multiple move events, and of course, coordinate 2 for an up event.
[0146] Multiple coordinates 1 can be used to represent coordinates 1 with multiple different values.
[0147] S106. After receiving the move event, the Launcher calculates the moving distance of the swipe operation based on the coordinate 11 carried by the move event: that is, the difference between coordinate 11 and coordinate 0 in the vertical direction.
[0148] In this embodiment of the application, each time a move event is received, the difference in the vertical direction between the coordinate 1i carried by the move event and the coordinate 0 in the down event is calculated, thereby determining the vertical sliding distance of the user's finger.
[0149] S107, when the moving distance is greater than distance D, the Launcher displays the dock bar, and the top edge of the dock bar moves with the coordinates in the move event.
[0150] In this embodiment, the top edge of the dock follows the hand movement by changing the vertical coordinate of the touch point position during the move event. For details, please refer to... Figure 2 (b) in the middle.
[0151] Of course, the above example of the top edge of the dock following hand movement is just one example. In actual applications, other hand-following methods can also be set.
[0152] S108, after the input detects the touch position again at a certain frequency, it sends a move event to the Launcher, carrying coordinates 12.
[0153] S109, after receiving the move event, the Launcher calculates the moving distance of the swipe operation based on the coordinate 12 carried by the move event: that is, the difference between coordinate 12 and coordinate 0 in the vertical direction.
[0154] S110, when the moving distance is greater than distance C, the Launcher fully displays the dock.
[0155] For details, please refer to Figure 2 As shown in (c) in the figure.
[0156] S111, after the input detects the touch point position again at a certain frequency, it sends a move event to the Launcher, carrying coordinates 13.
[0157] S112, after receiving the move event, the Launcher calculates the moving distance of the swipe operation based on the coordinate 13 carried by the move event: that is, the difference between coordinate 13 and coordinate 0 in the vertical direction.
[0158] S113, when the moving distance is greater than distance B, the Launcher displays an application window shrinking animation: the application window moves and shrinks with the hand.
[0159] In this embodiment, when the moving distance is greater than distance B, the application window displaying the application interface can move with the user's hand, and the application window shrinks simultaneously. See details in [reference needed]. Figure 2 As shown in (b) of the diagram.
[0160] S114, input receives a hand-raise operation.
[0161] S115, after receiving the hand-raise operation, the input sends an up event to the Launcher, carrying coordinates 2.
[0162] S116, after receiving the up event, the Launcher calculates the distance moved by the swipe operation: that is, the difference between coordinates 2 and 0 in the vertical direction.
[0163] S117, when the movement distance is greater than distance C, the Launcher sets a bounce animation for the dock bar.
[0164] In this embodiment, it is first determined whether the movement distance is greater than C. If it is greater than C, the bounce animation of the dock is set. Then, it is further determined which state to enter (e.g., system desktop or multitasking).
[0165] S118, Launcher calculates movement speed: the ratio of the distance to the time of the two most recently received coordinates. If the movement speed is greater than a preset value, Launcher displays the system desktop. In this embodiment, the movement speed can be calculated based on the two most recently determined coordinates, or it can be calculated based on the n most recently determined coordinates.
[0166] In practical applications, each move and up event carries a timestamp, which is the moment when the corresponding touch point was captured. Therefore, the movement distance can be determined based on the coordinates, the time can be determined based on the timestamp, and the movement speed can be obtained from the movement distance and time.
[0167] S119, after the Launcher enters the system desktop, it continues to execute the dock bar bounce animation.
[0168] The image after the dock bar bounce effect is applied can be referenced. Figure 2 As shown in (f) in the figure.
[0169] It's understandable that the dock has a bounce animation when entering the system desktop.
[0170] The above embodiments involve distances D, C, B, and A. In practical applications, the corresponding positions can also be used as references.
[0171] Reference Figure 7 The lines defined in this application embodiment are: the D-line corresponding to distance D, the C-line corresponding to distance C, the B-line corresponding to distance B, and the A-line corresponding to distance A.
[0172] In this embodiment of the application, if the touch point position of the down event is taken as the lowest point of the screen, then the line corresponding to distance D is line D, the line corresponding to distance C is line C, the line corresponding to distance B is line B, and the line corresponding to distance A is line A.
[0173] In specific implementation, distances A, B, C, and D can be used as the determination conditions in the above embodiments, such as S107, S110, and S113 in the above steps.
[0174] Of course, the vertical coordinates corresponding to lines A, B, C, and D can also be used as the determination conditions in the above embodiments. For example, in step S107, the relationship between the vertical coordinate of coordinate 11 and the vertical coordinate of line D is determined; in step S110, the relationship between the vertical coordinate of coordinate 12 and the vertical coordinate of line C is determined, and so on.
[0175] As an example of the vertical coordinates of the lines, line D could be 40 pixels upwards from the bottom of the screen, line C could be 88 pixels upwards from the bottom of the screen, line B could be 120 pixels upwards from the bottom of the screen, line A could be 156 pixels upwards from the bottom of the screen, and so on. Of course, these numbers are just examples to illustrate that pixels can be used as the vertical coordinates of the lines.
[0176] Reference Figure 8 This provides a timing diagram for entering multiple tasks in the implementation of this application.
[0177] The steps S101 to S117 can be referred to Figure 7 As shown, it will not be repeated here. Following S117, it also includes:
[0178] S201, If the moving speed is less than the preset value, calculate the moving distance.
[0179] S202, when the moving distance is greater than distance A, the Launcher displays multiple tasks.
[0180] S203, Launcher disables the bounce animation of the dock bar.
[0181] In this embodiment, since the dock's bounce animation has already been set, canceling the dock's bounce animation in this step can prevent it from starting at the beginning. This reduces the load by not continuing to execute the dock's bounce animation. The time between steps S117 and S203 is usually short, and from a user experience perspective, it is considered that no dock bounce animation is displayed.
[0182] S204, Launcher executes the hide animation of the dock.
[0183] In this embodiment, the dock can be hidden by the window hiding animation of the dock, and the loading of the window hiding animation of the dock is smaller than that of the view hiding animation of the dock.
[0184] S205, the Launcher displays a trash can icon.
[0185] In all the above embodiments, the process of releasing the hand when the sliding distance is greater than distance A is the same as the process of displaying the system desktop or displaying multitasking.
[0186] In practical applications, when the user releases their finger after moving a distance greater than distance C but less than distance A, the dock bar's bounce animation is displayed, and the dock bar is shown. Further examples are not provided here.
[0187] To determine whether to enter the desktop or enter multitasking mode, relevant flags are needed to mark each state.
[0188] Reference Figure 9 These are multiple markers provided in the embodiments of this application.
[0189] The `mLauncherStatus` flag is set in `TaskbarLauncherStatusController` to monitor the launcher's status. A value of `Normal` indicates the launcher is either within the application or on the system desktop; when within the application, the screen typically displays the application's interface. A value of `Overview` indicates the launcher is in multitasking mode.
[0190] In practical applications, this flag can be used to determine whether to display the dock.
[0191] As an example, when entering multitasking from the system desktop or within an application, mlauncherStatus changes from Normal to Overview.
[0192] When entering the system desktop or application from multitasking, mlauncherStartus changes from Overview to Normal.
[0193] In practical applications, when you release your finger, you can listen to the value of mAuncherStartus. If the value of mAuncherStartus switches to Overview, it means that you are currently in multitasking. You can then cancel the dock's bounce animation and execute the dock's hide animation.
[0194] However, this approach may have the following problems:
[0195] The process upon releasing the button is lengthy. Only after this process is complete will the value of `mLauncherStatus` be changed to `Overview`. And only after the value is changed to `Overview` will the dock's bounce animation be canceled and the dock's hide animation begin. This could result in the dock's bounce animation completing before the cancel bounce animation has even started.
[0196] The embodiments of this application can also use other flag bits to cancel the dock's bounce animation and execute the dock's hide animation.
[0197] The TaskbarStashController has a flag set to mlsStashed, which is used to listen to the display status of the Taskbar, i.e. whether the Taskbar is displayed.
[0198] The value of this flag is determined by two other status bits: in_APP and Stasher_in_app_auto. in_APP indicates whether the app is currently active, while Stasher_in_app_auto indicates whether the dock is hidden or shown.
[0199] A value of 1 for `in_app` indicates that the dock is within the application, while a value of 0 indicates that it is not within the application. The presence of `Stasher_in_app_auto` or a value of 1 for `Stasher_in_app_auto` indicates that the dock is currently displayed, while a value of 0 for `Stasher_in_app_auto` or the absence of this flag indicates that the dock is currently hidden.
[0200] You can set: mIsStashed = in_app & stashed_in_app_auto.
[0201] When `in_app` is 1 and `stashed_in_app_auto` is 1 (or this flag exists), `mlsStashed` being 1 indicates that the app is currently active and the dock is currently visible. A hiding animation can then be executed.
[0202] If `in_app` is 0, or `stashed_in_app_auto` is 0 (or this flag does not exist), then `mlsStashed` is 0, indicating that the app is not currently in use or the dock is currently hidden. No hiding animation is needed.
[0203] In this embodiment, the dock is displayed by swiping up while the application interface is shown.
[0204] During the swipe-up process, as the dock appears, the first thing to do is to change the value of Stasher_in_app_auto to 1, indicating that the dock is now in a displayed state.
[0205] Then, when you release your finger, check if you are currently in the application and if the dock is currently in the display state.
[0206] If the app is currently in use (in_app is 1) and the dock is currently visible (stashed_in_app_auto is 1), then the dock can be hidden (mIsStashed is 1). In other words, the dock can be hidden based on mIsStashed being 1.
[0207] Of course, after hiding the dock, you can disable Stasher_in_app_auto or set the Stasher_in_app_auto value to 0.
[0208] For details, please refer to the steps corresponding to S618 and S619 in the subsequent embodiments. In this way, the effect of quickly hiding the dock bar when releasing the hand can also be achieved.
[0209] Additionally, the `appliedStatus` flag is set in `TaskbarAutohideSuspendController` to indicate the persistent state of the Taskbar. If this flag exists:
[0210] Autohide_suspend_transient_Taskbar means that the dock bar is currently automatically hidden.
[0211] Autohide_suspend_in_launcher indicates that the dock is on the system desktop or in multitasking.
[0212] Autohide_suspend_touching indicates that the dock is suspending touch.
[0213] Furthermore, in specific applications, the states entered in S201 and S202 of the above embodiments can be determined based on the moving distance, moving speed, etc. Therefore, other state bits also exist in this application embodiment, and the values of the state bits include:
[0214] LAST_TASK: Return to the previous application window.
[0215] HOME: Enter the system desktop.
[0216] NEW_TASK: Entering a new task.
[0217] RECENTS (or recent): Enter multitasking.
[0218] Accordingly, after step S202, the value of the status bit is determined to be RECENTS. Subsequently, the bounce effect of quickly canceling the dock can be triggered based on the change in this status, as detailed in step S610 of a later embodiment.
[0219] To make the above process clearer, the following will illustrate it more clearly. Figures 10 to 13 This application provides a detailed description of the timing diagram inside the Launcher when entering multitasking, as provided in the embodiments of this application.
[0220] It should be noted that the scenario in this application embodiment is triggered by the user swiping up from the bottom of the screen when the electronic device displays the interface of any application.
[0221] Reference Figure 10 As shown, the down event during the swipe-up operation triggers the electronic device to perform the following:
[0222] S301, TouchInteractionService received a down event.
[0223] In this embodiment of the application, TouchInteractionService is a gesture service in Launcher that can receive down events sent by input.
[0224] S302, TouchInteractionService determines the preset area at the bottom of the screen where the touch point is located based on the coordinates carried by the down event.
[0225] S303, TouchInteractionService creates TaskbarUnstashInputConsumer if it determines that the touch point is in a preset area at the bottom of the screen.
[0226] S304, After TaskbarUnstashInputConsumer is successfully created, it continues to create TaskbarActivityContext.
[0227] S305, TaskbarActivityContext sends a release callback function registration request to AbsSwipeUpHandler.
[0228] S306, AbsSwipeUpHandler registers a release callback function. This embodiment of the application registers a release callback function through S304 to S306, so that when the user releases their finger to enter multitasking, the status bit is obtained through this release callback function, and the function is used to quickly cancel the dock bar bounce animation based on the status bit. See the description of the following embodiments for details.
[0229] S307, when TouchInteractionService determines that the touch point is in a preset area at the bottom of the screen, TouchInteractionService creates otherActivityInputConsumer.
[0230] In this embodiment, otherActivityInputConsumer is used to control the changes in the window of the current application (the window corresponding to the application interface displayed on the electronic device when swiping up).
[0231] This application focuses on describing the changes in the dock bar. Therefore, the operations performed by otherActivityInputConsumer as the hand slides upward and is released will not be drawn in the illustrations or described in detail.
[0232] Of course, when TouchInteractionService determines that the touch point is in the preset area at the bottom of the screen, it executes S303 to create a Taskbar consumer class and controls the relevant changes of the Taskbar through the TaskbarActivityContext under the Taskbar consumer class. On the other hand, it executes S307 to create an application window consumer class and controls the relevant changes of the application window through the application window consumer class.
[0233] S308, after successfully creating TaskbarUnstashInputConsumer and otherActivityInputConsumer, TouchIntenactionService sends a down event to TaskbarUnstashInputConsumer.
[0234] S309, TaskbarUnstashInputConsumer receives a down event and sends a down event to TransitionCallback.
[0235] S310, after receiving the down event, the TransitionCallback initializes.
[0236] Initialization allows for the execution of corresponding process controls to change the Taskbar after receiving subsequent move and up events.
[0237] S311, TaskbarUnstashInputConsumer receives a down event and sends a down event to otherActivityInputConsumer.
[0238] S312, otherActivityInputConsumer initializes after receiving the down event.
[0239] Initialization can be used to execute the corresponding process control for changes in the application window after receiving move and up events.
[0240] Reference Figure 11 The move event during the swipe-up operation triggers the display of the dock bar on the electronic device.
[0241] As mentioned earlier, as the user moves their hand, the input will detect a move event and send it to the Launcher.
[0242] S401, TouchInteractionService received a move event.
[0243] S402, TouchIntenactionService sends a move event to TaskbarUnstashInputConsumer.
[0244] S403, TaskbarUnstashInputConsumer determines that the swipe distance exceeds distance D based on the coordinates carried by the move event and the coordinates carried by the down event, and sets the Autohide_suspend_touching flag to indicate that the dock bar moves with the hand.
[0245] S404, TaskbarUnstashInputConsumer sends a move event to otherActivityInputConsumer.
[0246] The otherActivityInputConsumer executes relevant processes based on the move event, which will not be described further in this embodiment.
[0247] S405, TaskbarUnstashInputConsumer sends a message to TaskbarActivityContext that the Taskbar will no longer be hidden.
[0248] S406, after receiving the message that the Taskbar will no longer be hidden, TaskbarActivityContext sends a command to TaskbarStashController to display the Taskbar at the bottom of the screen.
[0249] In S407, after receiving this instruction, TaskbarStashController refreshes the value of Stasher_in_app_auto to 0, or cancels the Stasher_in_app_auto flag. This indicates that the dock is currently hidden and needs to be displayed immediately.
[0250] S408, TaskbartranslationController triggers the Taskbar display process based on the flag bit.
[0251] S409, TaskbartranslationController sends information to TaskbartranslationController to display Taskbar.
[0252] S410, TaskbarStashControllerEX sends information to TaskbarDragLayerController to set alpha.
[0253] S411, TaskbarStashControllerEX sends information to TaskbarViewController to set the alpha.
[0254] Reference Figure 12 Following the move event, the dock bar will be updated accordingly.
[0255] Following S403, it also includes:
[0256] S501, TaskbarUnstashInputConsumer sends a message to TransitionCallback to start following.
[0257] S502, TransitionCallback sends a message to TaskbartranslationController to start translating.
[0258] S503, TaskbartranslationController creates TaskbarTrackSpringAnimation.
[0259] S504, the coordinates at which TaskbarUnstashInputConsumer sends a move event to TransitionCallback.
[0260] S505, TransitionCallback sends the coordinates of the move event to TaskbartranslationController.
[0261] S506, TaskbartranslationController sends the transformation coordinate information to TaskbarTrackSpringAnimation.
[0262] S507, TaskbarTrackSpringAnimation converts the coordinates of the move event into coordinates in the y-direction.
[0263] S508, TaskbarTrackSpringAnimation returns the coordinates in the y-direction to TaskbartranslationController.
[0264] S509, TaskbartranslationController adjusts the height of the Taskbar based on the coordinates in the y-direction to achieve a responsive feel.
[0265] S510, TaskbartranslationController sends information to TaskbarDragLayerController to set the y-coordinate.
[0266] S511, TaskbartranslationController sends information to TaskbarviewController to set the y-coordinate.
[0267] Reference Figure 13 When the user moves their finger to a certain position, they will release it.
[0268] S601, TouchInteractionService received an up event.
[0269] S602, TouchInteractionService sends an up event to TaskbarUnstashInputConsumer.
[0270] S603, TaskbarUnstashInputConsumer determines that the sliding distance is greater than distance C based on the coordinates of the up event.
[0271] S604, TaskbarUnstashInputConsumer sends a message to TransitionCallback to set the bounce effect if it determines that the sliding distance is greater than C.
[0272] S605, TransitionCallback sends information to TaskbartranslationController to set the bounce animation.
[0273] S606, TaskbartranslationController begins executing the Taskbar's bounce animation.
[0274] Following S603, it also includes:
[0275] S607, TaskbarUnstashInputConsumer sends an up event to otherActivityInputConsumer.
[0276] It can trigger the application window to execute related processes.
[0277] S608, otherActivityInputConsumer sends the up event to AabsSwipeUpHandler.
[0278] In S306, the release callback function registered by AbsSwipeUpHandler will determine the state bit change to multitasking.
[0279] For details, please refer to S609 and S610.
[0280] S609, confirm that the speed when releasing the hand is less than the preset value.
[0281] In practical applications, if the speed at which the hand is released is greater than or equal to a preset value, the process of entering the desktop will be executed.
[0282] S610, determine that the sliding distance exceeds the distance A, and determine the status bit as recent.
[0283] In practical applications, if the speed at which the hand is released is less than the preset value and the sliding distance is not greater than distance A, the desktop process will also be initiated.
[0284] In practical applications, the status bits include the following states:
[0285] LAST_TASK: Return to the previous application window.
[0286] HOME: Enter the system desktop.
[0287] NEW_TASK: Entering a new task.
[0288] RECENTS: Enter multitasking.
[0289] S611, AbsSwipeUpHandler sends status bits to TaskbarActivityContext (multitasking).
[0290] S612, TaskbarActivityContext sends a status bit (multitasking) to TaskbarUnstashInputConsumer.
[0291] S614, after receiving the status as multitasking, TaskbarUnstashInputConsumer sends a command to TaskbartranslationController to cancel the dock bar bounce.
[0292] S615, TaskbartranslationController removes the bounce effect from the dock.
[0293] In practical applications, when the S606TaskbartranslationController just starts executing the dock bar bounce animation, it will receive the S615's command to cancel the dock bar bounce.
[0294] Following S614, it also includes:
[0295] S616, TaskbarUnstashInputConsumer sends an animation type to TaskbarActivityContext to perform in-place hiding.
[0296] S617, TaskbarActivityContext sends the animation type for in-place hiding to TaskbartranslationController. S618, after receiving the animation type for in-place hiding, TaskbartranslationController sets the value of Stasher_in_app_auto to 1.
[0297] In S408, the value of Stasher_in_app_auto has already been set to 0. In this step, the value of Stasher_in_app_auto needs to be set to 1 first.
[0298] S619, TaskbartranslationController determines that in_app is 1 and statsh in app auto is 1, and then determines that mlsStashed is 1.
[0299] As mentioned earlier, when mlsStashed is 1, the Taskbar is hidden. S620, TaskbartranslationController sends a command to TaskbarStashControllerEX to execute the hide animation. S621, TaskbarStashControllerEX sends a command to TaskbartranslationController to execute the hide animation. S622, TaskbartranslationController executes the hide animation to hide the Taskbar in place.
[0300] S623, TaskbarStashControllerEX sends information to TaskbarDragLayerController to set alpha.
[0301] S624, TaskbarStashControllerEX sends information to TaskbarViewController to set the alpha.
[0302] In practical applications, to further reduce the load, the hide animation of the dock can be set as a window hide animation.
[0303] Reference Figure 14 The provided window hiding animation process was implemented for this application.
[0304] Before the Taskbar is displayed, TaskbarStashControllerEX creates and adds a TaskbarView in the WindowManager.
[0305] When releasing the handle, the process from S620 to S624 is described below.
[0306] Following the S620, it also includes:
[0307] S701, TaskbarStashControllerEX sends a Taskbar window retrieval request to WindowManager.
[0308] S702, WindowManager sends a Taskbar window to TaskbarStashControllerEX.
[0309] When S621 is executed, TaskbarStashControllerEX sends a command to TaskbartranslationController to perform a hide animation on the Taskbar window. When S622 is executed, TaskbartranslationController performs a hide animation on the Taskbar window.
[0310] The execution of S623 and S624 both require the SurfaceControl to function. That is, after S622, it also includes:
[0311] S703, TaskbartranslationController sends a command to SurfaceControl to set alpha reset.
[0312] S704, SurfaceControl sends information to TaskbarDragLayerController to set alpha.
[0313] S705, SurfaceControl sends information to TaskbarViewController to set alpha.
[0314] Normally, the Taskbar needs an alpha value of 1 to be displayed. During the Taskbar window hiding animation in S622, the Taskbar window's alpha value is changed from 1 to 0. If the Taskbar window's alpha value remains 0, the Taskbar will not be displayed the next time the user swipes up from the bottom of the screen within the application. Therefore, after the Taskbar window hiding animation in S622 ends, the Taskbar window's alpha value needs to be reset to 1.
[0315] In practical applications, resetting immediately after the animation ends may cause screen flickering. This embodiment of the application sets the window to reset within a certain time after the hiding animation of the Taskbar window executed in S622 ends. This avoids screen flickering without affecting the next swipe-up operation to trigger the display of the Taskbar. Based on experience, this time can be set to around 100ms, for example, 50ms, 80ms, 120ms, 150ms, etc.
[0316] The above example demonstrates how to cancel the dock's bounce animation and update the dock's view hide animation to the dock's window animation. Of course, to avoid screen flickering and without affecting the next swipe-up action to display the Taskbar, the Taskbar window's alpha can be reset some time after the hide animation ends.
[0317] In practical applications, refer to Figure 2 and Figure 4 As shown, as the user swipes up from the bottom of the screen, in addition to the change in the dock, the application window also changes with the change in hand position.
[0318] Reference Figure 15 As shown in the illustration, this application also provides another application scenario: dragging the application window to the left triggers split-screen display of the application, while dragging it to the right triggers it to display as a floating window. Of course, the dock (not shown in the illustration) or its bounce effect can be displayed during this process; this application does not impose any limitations. The specific form in which the application window is displayed when dragged to the left or right is merely an example and not intended to limit the scope; it is mainly for illustrative purposes. The application window can be swiped left and right. Swiping left and right may trigger different forms of application window display. For example, it is also possible to set a left swipe to display the application's split-screen window on the left and a right swipe to display the application's split-screen window on the right.
[0319] Reference Figure 16 As shown, since we need to implement multiple possible display states along the y-axis (taskbar, application window) and also consider at least two display states along the x-axis (split screen or floating window), in order to determine which display state to enter, we not only set lines A, B, C, and D (or distances to A, B, C, and D), but also set a horizontal x-axis threshold, and specifically executed it as follows:
[0320] If the sliding distance of the touch point in the x-axis direction is less than the x-axis threshold, the application window will respond to the touch in real time on the y-axis; the position of the application window on the x-axis will remain unchanged. (See reference...) Figure 16As shown, as the user swipes to the right, the user's touch point moves from coordinate 1 to coordinate 3 on the x-axis, while the application window remains at coordinate 1 on the x-axis. If the user releases their finger, the user enters a state according to lines A, B, C, and D in the example above.
[0321] If the touch point slides to the right a distance greater than or equal to the x-axis threshold, the application window can continue to follow the touch on the y-axis (or it can choose not to). The application window's position on the x-axis will first change before it begins to move, as shown in the reference. Figure 16 As the user's touch point moves from coordinate 4 to coordinate 6, the application window's x-axis coordinates first jump directly from coordinate 1 to coordinate 4, and then follow the touch. Releasing the touch triggers the application to display in split-screen or as a floating window.
[0322] If the distance the touch point slides to the left along the x-axis is greater than or equal to the x-axis threshold, no further examples will be provided; the operation is similar to sliding to the right.
[0323] However, this presents a problem: as the user slides their finger to the left or right, the application window sometimes jumps suddenly from coordinate 1 to coordinate 4 before responding to the finger. From the user's perspective, this is a lag.
[0324] To address the aforementioned lag issues and improve user experience, this application also provides another content display method.
[0325] You can configure the application window to respond in real-time along the y-axis when the sliding distance on the x-axis is less than the x-axis threshold, and simultaneously respond in real-time along the x-axis when the sliding distance on the x-axis is less than the x-axis threshold. When the sliding distance on the x-axis is less than the x-axis threshold, you can continue to respond in real-time along the x-axis when the sliding distance on the x-axis is less than the x-axis threshold. This means that as the user slides, the application window responds in real-time along the x-axis, thus preventing application window lag.
[0326] Another example is setting the application window to move in real-time along the y-axis when the sliding distance on the x-axis is less than an x-axis threshold, while maintaining its position on the x-axis. When the sliding distance is greater than or equal to the x-axis threshold, the application window can be moved along the x-axis by subtracting the x-axis threshold from the sliding distance and adding one pixel each time its position is updated. Assuming the x-axis threshold is the length corresponding to m pixels, after m updates, the application window can achieve real-time movement along the x-axis. This way, the application window doesn't move abruptly; instead, each movement's offset is one pixel greater than the user's finger's touch offset. From the user's perspective, the application window gradually changes from position 1 to position 6.
[0327] From the user's perspective, the above sliding process includes at least three time periods, which are illustrated below using movement and coordinates on the x-axis as examples:
[0328] In time period 1, the hand moves from coordinate 1 to coordinate 4; taking the period before reaching coordinate 4 as an example, the hand moves but the application window does not move.
[0329] Time period 2: Hand coordinates 4 to 6; the hand moves, the application window moves, and the distance the application window moves each time is greater than the distance the hand moves each time; however, the sliding distance of the application window starting from coordinate 1 is less than the sliding distance of the hand starting from coordinate 1.
[0330] Time period 3: Hand coordinates 6 to 7; the application window moves with the hand, and the distance the application window moves each time is equal to the distance the hand moves each time; the sliding distance of the application window starting from coordinate 1 is equal to the sliding distance of the hand starting from coordinate 1.
[0331] Of course, the one pixel in the above example is only for illustration and can make the application window change process more delicate and smooth. In actual applications, more pixels can be added each time to make the application window achieve a responsive effect more quickly, but the window movement process may be more laggy.
[0332] In practical applications, the appropriate number of pixels can be set according to the frequency of the touchpad's touch detection points and the refresh rate of the electronic device, thereby achieving a balance between the smoothness and responsiveness of window movement.
[0333] Reference Figure 17 The diagram shown is a flowchart illustrating the content display method provided in an embodiment of this application.
[0334] S801, swipe-up gesture detected.
[0335] S802, determine whether the sliding distance in the x-axis direction is less than the x-axis threshold;
[0336] S803, if the sliding distance in the x-axis direction is less than the x-axis threshold, then the application window will move in real time on the y-axis based on the sliding distance on the y-axis, while the position of the application window on the x-axis remains unchanged.
[0337] S804, if the sliding distance in the x-axis direction is greater than or equal to the x-axis threshold, then determine the sliding direction.
[0338] S805 increments the offset in the x-axis direction by one pixel each time the application window position needs to be updated based on a reported touch point position.
[0339] When calculating the offset, you can do so as follows:
[0340] Initialize the Tmp variable to the x-axis threshold.
[0341] When the sliding distance is greater than the x-axis threshold, the x-axis offset = sliding distance - x-axis threshold + 1 pixel.
[0342] Additionally, the Tmp variable needs to be subtracted by one pixel. Later, you can check if the Tmp value is equal to 0 to determine if the application window has moved smoothly along the X-axis.
[0343] S806, move the application window based on the offset.
[0344] Move the application window in the determined sliding direction according to the x-axis offset.
[0345] Repeat steps S805 and S806 until the x-axis coordinate of the application window is the same as the x-axis coordinate of the touch point, or until the user releases the touch.
[0346] After looping through the Tmp variable (m pixels) a certain number of times (m times), it's equivalent to adding m pixels, meaning the X-axis threshold has been filled. This means the application window's X-axis coordinates are the same as the touch point's X-axis coordinates, achieving responsiveness. Furthermore, upon the user releasing their touch, regardless of whether responsiveness has been added, the corresponding interface is displayed, ending the process.
[0347] S807 determines whether the x-axis coordinates of the application window and the x-axis coordinates of the touch point are the same.
[0348] In practical applications, it can also be used to determine whether the Tmp variable becomes 0, indicating whether the x-axis coordinates of the application window and the touch point are the same.
[0349] S808 cancels the judgment of sliding distance and x-axis threshold after the x-axis coordinates of the application window and the touch point are the same. No matter how you slide afterwards, you can follow the touch in real time on the x-axis.
[0350] Of course, if the x-axis coordinates of the application window and the x-axis coordinates of the touch point are different, continue to execute S805 to S807 in a loop.
[0351] like Figures 10 to 13 As shown, input events (down, move, and up events) are all sent to TouchInteractionService by InputDispatcher. TouchInteractionService then distributes the events to TaskbarActivityContext and OtherActivityInputConsumer via TaskbarUnstashInputConsumer.
[0352] TaskbarActivityContext is used to control changes to the Taskbar, while OtherActivityInputConsumer is used to control changes to the application window.
[0353] Figures 10 to 13 The embodiments shown all describe the changes in the Taskbar.
[0354] This application has been approved. Figure 18 The illustrated embodiment describes the process of how the application window changes as the sliding operation in the above embodiment occurs.
[0355] S901, after TaskbarUnstashInputConsumer receives the move event, it sends the move event to OtherActivityInputConsumer.
[0356] S902, after receiving the move event, OtherActivityInputConsumer sends the coordinates of the move event to AbsSwipeUpHandler.
[0357] S903, AbsSwipeUpHandler determines the relationship between the coordinates of the move event and the distance B mentioned above (the application window will only move along the y-axis if it exceeds B), thereby determining the y-axis offset or the target position of the application window.
[0358] S904, AbsSwipeUpHandler refreshes the real-time tethering animation information on the x and y axes through its onCurrentShiftUpdated method. onCurrentShiftUpdated is used to execute the real-time tethering animation.
[0359] S905, AbsSwipeUpHandler retrieves the application window's x-axis offset from RecentsView.
[0360] S906, AbsSwipeUpHandler sends the application window's x-axis offset and y-axis offset (or y-axis target position) to TaskViewSimulator.
[0361] The process of calculating the x-axis offset in this step can be found in [reference]. Figure 17 S802 to S805 in the series.
[0362] S907, TaskViewSimulator controls the window offset based on the current y-axis offset (or y-axis target position) and x-axis offset.
[0363] In practical applications, the following settings can also be configured:
[0364] If the touch point is less than line B, the displayed content is determined by the distance on the y-axis (e.g., multiple display states of the Taskbar).
[0365] If the touch point is located above line B, the display format of the application window, which allows for left and right sliding, needs to be considered.
[0366] Therefore, it can be set that the contact point will only proceed according to the above embodiment after it exceeds line B. Figure 17 The flow of the illustrated embodiment determines the movement of the application window along the X-axis. If the touch point does not exceed line B in the above embodiment, it proceeds according to... Figure 16 The method shown controls the movement of the application window on the x-axis. That is, if the sliding distance is less than the x-axis threshold, the position of the application window on the x-axis remains unchanged. If the sliding distance is less than the x-axis threshold, there is first a jump from coordinate 1 to coordinate 4, and then the window moves in real time to follow the movement.
[0367] In the example above, the changes are described from two aspects: the dock bar and the application window, as the user swipes up from the bottom of the screen.
[0368] In practical applications, refer to Figure 3 As shown, after the dock is brought up, the user's actions on the icons in the dock will trigger the display of the interface related to the action.
[0369] Reference Figure 19As shown, refer to Figure 19 The image shown is a schematic diagram of an interface when dragging an application icon from the dock, as provided in an embodiment of this application.
[0370] When a user drags an app icon from the dock to trigger the app's split-screen or floating window display, a drag mask is usually displayed below the app icon to indicate to the user what form the app will take (split-screen or floating). This mask tells the user how the app will be displayed after they release the drag.
[0371] Of course, in practical applications, multiple application icons can be dragged continuously to display multiple applications, and the display format of each application may be different. In addition, the split-screen and floating display formats described above are only examples, and electronic devices may also display the application in other forms. This application embodiment does not limit the specific operation or the display method corresponding to the operation.
[0372] Reference Figure 19 As shown in (a), this is the dragging path of the printer icon in the dock. A mask is displayed below the icon as the user drags it.
[0373] Reference Figure 19 As shown in (b), this is the position of the icon and the mask when the user drags the printer icon to the position shown in the illustration.
[0374] To maintain the same positional relationship between the mask and the icon during dragging, you can place the icon and mask on the same layer and move them together. However, this presents a problem. Icons are typically displayed above the dock, so when the mask and icon are on the same layer, the mask might obscure the dock area. See [link to documentation] for details. Figure 20 As shown in (a), the user experience is poor.
[0375] Reference Figure 20 As shown in (b) of the example, in this embodiment, the mask and icon can be set to different layers, with the icon layer located above the dock bar, allowing the icon to obscure the dock bar, and the mask layer located below the dock bar, so that the mask does not obscure the dock bar. This avoids... Figure 20 The occlusion problem is shown in (a) above.
[0376] Typically, having icons and masks on different layers can lead to a situation where their positional relationship cannot remain constant. In this embodiment, the icon movement is controlled by the Systemserver, which originally controls icon movement, before the SystemUI appears. After the SystemUI appears but before the mask appears, the icon movement is controlled by the SystemUI. After the mask appears, the icon position is updated based on the mask position while the SystemUI controls the mask movement. This ensures that the positional relationship between the icon and the layer remains constant.
[0377] Reference Figure 21 This describes the flow of the content display method provided in this application embodiment. The flow begins with the Launcher receiving a drag-and-drop notification from the input, starting from the dock. Then, the Taskbar in the Launcher continues the drag-and-drop process. Initially, the server handles the movement of the drag icon; later, the shell under the System UI displays the drag mask and moves the icon.
[0378] (1) Launcher initiates a drag-and-drop process to Systemserver.
[0379] (2) The Systemserver sends a start drag event to the Launcher.
[0380] (3) The Systemserver sends a start drag event to the System UI.
[0381] In steps (2) and (3), Systemserver determines whether the drag event is a drag of an application icon in the Taskbar; if so, it sends the coordinates of the drag event along with the layer where the icon is located. Otherwise, it does not send the layer where the icon is located.
[0382] (4) The framework sends the coordinates of the drag event to the Systemserver.
[0383] After receiving the coordinates of the drag event, Systemserver determines whether an application icon in the Taskbar was dragged and whether the focus has switched to the System UI (whether a mask has appeared). If so, it exits and leaves the subsequent movement of the icon to System; otherwise (e.g., if the mask has not appeared), Systemserver updates the position of the dragged icon.
[0384] (5) The input or inputEventReceiver in the framework sends the coordinates of the drag event to the system UI.
[0385] Typically, the system UI takes some time to appear, so step (5) is later than step (6).
[0386] After SystemUI receives the coordinates of the drag event, it first modifies the mask position, then adds a refresh frame callback. This callback enables the icon to be dragged while the mask is being dragged, and finally updates the position of the dragged icon. See the subsequent timing section for details.
[0387] (6) The system UI sends the release processing result to the Systemserver.
[0388] (7) The Systemserver sends the release result to the Launcher.
[0389] Reference Figure 22 The shell in the system UI contains multiple modules. Among them, Figure 22 The various classes or functions in the code work together to achieve this. Figure 23 The functions corresponding to the shell in Chinese. For details, please refer to... Figure 23 Description of the shell.
[0390] As examples, see DragAndDropController, DragLayout, and TaskbarBaseAnimationHelper for details. Figure 23 As shown.
[0391] As Figure 23 Examples of its class or function (not shown): TaskbarBaseHotArea, used to determine the basic variables and functions of a hotspot (e.g., a mask area). DragAndDropPolicyEX is used to retrieve the state data of DragAndDropPolicy. TaskbarFreeformOnFullHotArea is used to customize the hotspot (mask) for the application state during dragging. For example, the shape and size of the mask.
[0392] Reference Figure 23 This is a timing diagram of the interaction between the system server and the shell in SystemUI provided in an embodiment of this application.
[0393] S1000, input sends a start drag-and-drop event to Systemserver.
[0394] In step (3), Systemserver sends a start drag-and-drop event to the system UI. This includes the following:
[0395] S1001, after receiving the drag event sent by input, Systemserver sends the start drag information to DragAndDropController in the shell.
[0396] In this step, if the drag event is a Taskbar drag event, the information can carry the layer (surface) where the icon is located.
[0397] S1002, after DragAndDropController saves the icon surface, it sends the icon surface to TaskbarDragLayout.
[0398] S1003, DragAndDropController sends an initialization command to TaskbarDragLayout.
[0399] After receiving the initialization command, TaskbarDragLayout initializes the content required for the current drag event.
[0400] S1004, TaskbarDragLayout initialization.
[0401] Corresponding to steps (4) and (5), the following content is included:
[0402] S1005, Systemserver receives the coordinate information during the drag-and-drop process sent by input and begins to control the movement of the icon.
[0403] In this embodiment, since the shell initialization process is slower and typically acquires the corresponding coordinate information later than Systemserver, the icons are initially moved by DragState in Systemserver. DragState in Systemserver can first create the icon layer and then set the icon layer to have the highest priority, thus allowing the icon layer to be displayed above the Taskbar.
[0404] When moving specific icons, this is achieved in the following way:
[0405] The drag gesture includes three operations: long press, drag, and release.
[0406] When a user long-presses an icon, their finger may not be pressing the center point of the icon. Therefore, it is necessary to set offset variables mRegistrationX and mRegistrationY between the touch point and the icon's center point. Subsequently, the icon's center point and the finger's touch point will always maintain this offset. See the description of the following embodiments for details.
[0407] As the dragging process transmits the coordinates of the user's touch point, DragState can move the icon and the finger touch point while maintaining their positional relationship based on the real-time coordinates of the touch point and the offset (for example, if the finger was originally at the bottom of the icon, it will remain at the bottom of the icon during the dragging process).
[0408] S1006, the DragAndDropController in the shell receives the coordinate information during the drag-and-drop process sent by the input.
[0409] In practical applications, after the systemUI appears, the input will send the coordinate information of the dragging process to all current windows (including the systemUI, and possibly other windows). The systemserver will be able to respond to this coordinate information first; however, the shell in the systemUI has not yet been fully initialized, so it will not respond to this coordinate information for the time being.
[0410] When the Shell in systemUI has the ability to respond to the coordinate information (i.e., after systemUI appears and a drag event is received), S1007 will be executed, thereby triggering Systemserver to stop responding to the coordinate information.
[0411] S1007, after receiving the coordinate information during the dragging process sent by the input, DragAndDropController sends a message to Systemserver to stop the icon movement.
[0412] Once the DragAndDropController in the shell is responsive and receives the coordinate information during the drag process sent by the input, it can be moved by the shell. The DragState in Systemserver no longer needs to move the icon. Therefore, it is necessary to notify the DragState in Systemserver to stop moving the icon.
[0413] Therefore, in S1005, before the Systemserver receives the stop movement coordinates, it can control the icon's movement.
[0414] In step S1008, after DragAndDropController sends a message to Systemserver to stop icon movement, it sends a message to TaskbarDragLayout to move the icon before the mask appears. This message indicates that SurfaceControl.Transaction should be used to control icon movement.
[0415] In this application, the mask layer is created by TaskbarBaseAnimationHelper. Before the mask is actually initialized, it takes a while. Therefore, even if the shell can start controlling the icon movement, since the mask has not yet appeared, SurfaceControl.Transaction is needed to control the icon movement.
[0416] Of course, DragAndDropController can determine whether the mask has been created by interacting with TaskbarBaseAnimationHelper. (Not shown in the diagram.)
[0417] S1009, the DragAndDropController in the shell continues to receive coordinate information from the input during the drag-and-drop process.
[0418] The time interval for sending drag events is related to the frequency with which the touchpad detects the touch point position. This application uses only a few coordinates as examples in its embodiments.
[0419] In S1010, after the mask appears, DragAndDropController sends a message to TaskbarDragLayout to stop moving the icon.
[0420] Accordingly, as time goes on, the mask will be created, and then the mask can be updated and drawn by using View.invalidate.
[0421] S1011, after receiving the message that the icon has stopped moving, TaskbarDragLayout sends a command to TaskbarBaseAnimationHelper to update the mask through the view.
[0422] In this embodiment, TaskbarDragLayout sets a layer of type TYPE_APPLICATION_OVERLAY to display the mask. This layer is lower than the Taskbar, so that the mask does not obscure the Taskbar.
[0423] S1012, after TaskbarBaseAnimationHelper moves the mask position, it sends an applicationTransactionOnDraw to TaskbarDragLayout, causing SurfaceFlinger to move the icon while controlling the mask.
[0424] As mentioned earlier, when a user presses an icon, they may not be pressing the center point of the icon. Therefore, there is an offset between the finger's touch point and the icon's center point. This necessitates determining the exact amount of offset between the icon's center point and the finger's touch point.
[0425] When a long press event of a drag gesture is received, the offset of the finger touch point relative to the center point of the icon (the center point of the mask and the center point of the icon are the same) is calculated.
[0426] mSufaceOffsetX = mRegistrationX (coordinates with the top left corner as the origin) – (icon width / 2).
[0427] mSufaceOffsetY = mRegistrationY (coordinates with the top left corner as the origin) – (icon height / 2).
[0428] Upon receiving the coordinates of the drag event in the drag gesture, the position of the mask area (the top-left corner of the mask area) is calculated, where the center point of the mask coincides with the center point of the icon. drageventX and drageventY represent the coordinates during the dragging process.
[0429] The x-coordinate of the top-left corner of the mask area: drageventX-mSufaceOffsetX-(mask width / 2).
[0430] The y-coordinate of the top-left corner of the mask area is: drageventY - mSufaceOffsetY - (mask height / 2).
[0431] or,
[0432] The x-coordinate of the top-left corner of the mask area is: drageventX - mSufaceOffsetX + (mask width / 2).
[0433] The x-coordinate of the top-left corner of the mask area is: drageventY - mSufaceOffsetY + (mask height / 2).
[0434] The coordinates of the top-left corner of the mask area can be calculated using the method described above.
[0435] During the icon movement process, the position of the top-left corner of the icon is calculated as follows:
[0436] The x-coordinate of the top left corner of the icon: drageventX-mSufaceOffsetX-(icon width / 2).
[0437] The y-coordinate of the top left corner of the icon is: drageventY - mSufaceOffsetY - (icon height / 2).
[0438] or,
[0439] The x-coordinate of the top left corner of the icon is: drageventX - mSufaceOffsetX + (icon width / 2).
[0440] The y-coordinate of the top left corner of the icon is: drageventY - mSufaceOffsetY + (icon height / 2).
[0441] After obtaining the mask and icon position coordinates, ViewRootImpl.applyTransactionOnDraw causes SurfaceFlinger to move the icon via a callback during drawing. The callback function View.DragShadowBuilder in the example above can also set a touch offset, which controls icon movement through the touch offset in the callback function.
[0442] As can be seen from the above example, the movement of the icon is controlled by Systemserver; in order to make the positions of the mask and the icon consistent, the icon position is moved to SystemUI for execution, so that when SystemUI updates the mask position, the icon position is updated together through a callback.
[0443] Of course, when dragging an app icon from the dock, you can mark the icon that moves with your hand during the drag as a floating icon.
[0444] This application also provides a content display method, including:
[0445] During the display of the interface of the first application on the electronic device, a first swipe operation is detected;
[0446] In response to the first swipe operation, the electronic device displays the system desktop;
[0447] Before the first swipe operation ends, the electronic device displays the taskbar;
[0448] After the first swipe operation ends, the electronic device displays the bounce effect of the taskbar and displays the system desktop, with the taskbar displayed on the system desktop;
[0449] During the display of the interface of the first application on the electronic device, a second swipe operation was detected;
[0450] In response to the second swipe operation, the electronic device displays a multitasking management interface;
[0451] Before the second swipe operation ends, the electronic device displays the taskbar;
[0452] After the first swipe operation ends, the electronic device does not display the bounce effect of the taskbar, displays the multitasking management interface, and cancels the display of the taskbar.
[0453] In this application, reference is made to Figure 2 As shown, the first application can be any application, and the first swipe operation can be... Figure 2 The sliding operation shown; refer to Figure 4 As shown, when entering the multitasking management interface, the taskbar is displayed before the multitasking management interface is shown. In the actual implementation, the taskbar bounce animation can be canceled to reduce the load; the taskbar can also be canceled during the process of entering the multitasking management interface.
[0454] As another embodiment of this application, the taskbar is located in a first area of the screen of the electronic device (refer to any area where the taskbar is located in the figure), and the first area is located at the bottom of the screen; the first sliding operation and the second sliding operation are both upward sliding operations starting from the second area of the screen (usually a small area at the bottom of the screen, for example, within a few dozen pixels vertically), and the coordinate of the center point of the second area on the y-axis is less than the coordinate of the center point of the first area on the y-axis.
[0455] In another embodiment of this application, the sliding speed of the first sliding operation is greater than or equal to a first threshold (this value can be referred to as...). Figure 6 and Figure 8 (a preset value compared with speed); the sliding speed of the second sliding operation is less than the first threshold, and the sliding distance of the second sliding operation on the y-axis is greater than the first distance (e.g., distance A).
[0456] As another embodiment of this application, the taskbar includes an application icon for at least one application; during the display of the system desktop by the electronic device, the method further includes:
[0457] The electronic device detects a third operation, which is performed on the application icon of the second application in the taskbar.
[0458] In response to the third operation, the electronic device displays the interface of the second application.
[0459] As another embodiment of this application, when the electronic device displays the interface of the second application in response to the third operation, the display form of the interface of the second application includes: split-screen form, floating window form, full-screen form, etc., and the display form of the interface of the second application is related to the type of the third operation.
[0460] Reference Figure 3 As shown, Figure 3The operation in the middle can be a third operation, and the printer application can be used as an example of a second application.
[0461] As another embodiment of this application, after the first swipe operation ends and the electronic device cancels the display of the taskbar, the method further includes:
[0462] The electronic device displays a trash can icon. See details for further information. Figure 4 As shown in (f) in the figure.
[0463] As another embodiment of this application, the first sliding operation includes a pressing operation, a moving operation, and a lifting operation; before the end of the first sliding operation is before the lifting operation in the first sliding operation; after the end of the first sliding operation is after the lifting operation in the first sliding operation; the pressing operation has a first coordinate (e.g., coordinate 0); the moving operation has a plurality of second coordinates (e.g., coordinate 0); and the lifting operation has a third coordinate (e.g., coordinate 2).
[0464] As another embodiment of this application, before the first sliding operation ends, the method further includes:
[0465] The electronic device determines the first sliding distance of the first sliding operation on the y-axis based on the second coordinate and the first coordinate;
[0466] When the first sliding distance is greater than the second distance (D line) and less than the third distance (C line), the electronic device displays a portion of the taskbar, and during the display of the portion of the taskbar, the movement trajectory of the taskbar on the y-axis is the same as the movement trajectory of the touch point of the first sliding operation on the y-axis.
[0467] When the first sliding distance is greater than the third distance (C line) and less than the fourth distance (B line), the electronic device fully displays the taskbar, and during the display of the taskbar, the movement trajectory of the taskbar on the y-axis is the same as the movement trajectory of the touch point of the first sliding operation on the y-axis.
[0468] When the first sliding distance is greater than the fourth distance (line B), the electronic device shrinks the window of the first application, and during the display of the window of the first application, the movement trajectory of the window of the first application on the y-axis is the same as the movement trajectory of the touch point of the first sliding operation on the y-axis, and the first distance (line A) is greater than the fourth distance (line B).
[0469] In another embodiment of this application, after the first sliding operation ends, the method further includes:
[0470] The electronic device determines, based on the third coordinate and the first coordinate, the second sliding distance of the first sliding operation on the y-axis when the first sliding operation ends;
[0471] The electronic device determines whether the second sliding distance is greater than the third distance (C line);
[0472] If the second sliding distance is greater than the third distance, the electronic device starts to execute the taskbar bounce effect and determines whether the sliding speed before the hand lift operation is greater than or equal to the first threshold (e.g., a preset value compared with the speed).
[0473] If the sliding speed is less than the first threshold, the electronic device determines whether the second sliding distance is greater than the first distance;
[0474] If the second sliding distance is greater than the first distance, the electronic device determines to display the multitasking management interface;
[0475] Once the multitasking management interface is accessed, the electronic device cancels the pop-up animation of the currently running task bar;
[0476] Upon determining that the multitasking management interface has been accessed, the electronic device uses a first flag (e.g., Figure 9 The value of in_APP) and the second flag bit (e.g., Figure 9 The value of Stasher_in_app_antu in the value indicates that the taskbar is currently hidden. The value of the first flag indicates that the application is currently active, and the value of the second flag indicates that the taskbar is currently displayed.
[0477] In another embodiment of this application, the time from when the electronic device detects the first swipe operation (raise-hand operation) to when it begins to execute the taskbar's bounce animation is defined as a first duration; the time from when the electronic device detects the first swipe operation (raise-hand operation) to when it determines to display the multitasking management interface is defined as a second duration; the difference between the second duration and the first duration is less than a second value. The second value indicates that the difference between the first duration and the second duration is very small.
[0478] In another embodiment of this application, the electronic device hides the taskbar window.
[0479] As another embodiment of this application, during the process of hiding the window of the taskbar, the alpha value of the window of the taskbar changes from a first value (e.g., 1) to a second value (e.g., 0).
[0480] After the taskbar window is hidden for a third period of time, the electronic device sets the alpha value of the taskbar window to a first value. When the alpha value of the taskbar window is at the first value, the electronic device has the ability to display the taskbar.
[0481] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0482] This application also provides a computer-readable storage medium storing a computer program that, when run on an electronic device, can implement the steps in the above-described method embodiments.
[0483] This application also provides a computer program product that, when run on an electronic device or a wireless router, enables the electronic device to perform the steps described in the various method embodiments above.
[0484] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0485] This application also provides a chip, which includes a processor coupled to a memory. The processor calls a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip can be a single chip or a chip module composed of multiple chips.
[0486] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0487] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0488] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A content display method, characterized in that, include: During the display of the interface of the first application on the electronic device, a first swipe operation is detected; In response to the first swipe operation, the electronic device displays the system desktop; Before the first swipe operation ends, the electronic device displays the taskbar; After the first swipe operation ends, the electronic device displays the bounce effect of the taskbar and displays the system desktop, with the taskbar displayed on the system desktop; During the display of the interface of the first application on the electronic device, a second swipe operation was detected; In response to the second swipe operation, the electronic device displays a multitasking management interface; Before the second swipe operation ends, the electronic device displays the taskbar; After the first swipe operation ends, the electronic device does not display the bounce effect of the taskbar, displays the multitasking management interface, and cancels the display of the taskbar.
2. The method as described in claim 1, characterized in that, The taskbar is located in a first area of the screen of the electronic device, and the first area is located at the bottom of the screen; the first swipe operation and the second swipe operation are both upward swipe operations starting from the second area of the screen, and the center point of the second area has a smaller y-axis coordinate than the center point of the first area.
3. The method as described in claim 1 or 2, characterized in that, The sliding speed of the first sliding operation is greater than or equal to a first threshold; the sliding speed of the second sliding operation is less than the first threshold, and the sliding distance of the second sliding operation on the y-axis is greater than a first distance.
4. The method as described in claim 1, characterized in that, The taskbar includes an application icon for at least one application. During the display of the system desktop on the electronic device, the method further includes: The electronic device detects a third operation, which is performed on the application icon of the second application in the taskbar. In response to the third operation, the electronic device displays the interface of the second application.
5. The method as described in claim 4, characterized in that, When the electronic device displays the interface of the second application in response to the third operation, the display form of the interface of the second application includes: split-screen form, floating window form, full-screen form, etc., and the display form of the interface of the second application is related to the type of the third operation.
6. The method as described in claim 1, characterized in that, After the first swipe operation ends and the electronic device cancels the display of the taskbar, the method further includes: The electronic device displays a trash can icon.
7. The method as described in claim 3, characterized in that, The first sliding operation includes a pressing operation, a moving operation, and a lifting operation; before the end of the first sliding operation is before the lifting operation in the first sliding operation; after the end of the first sliding operation is after the lifting operation in the first sliding operation; the pressing operation has a first coordinate; the moving operation has multiple second coordinates; and the lifting operation has a third coordinate.
8. The method as described in claim 7, characterized in that, Before the first sliding operation ends, the method further includes: The electronic device determines the first sliding distance of the first sliding operation on the y-axis based on the second coordinate and the first coordinate; When the first sliding distance is greater than the second distance and less than the third distance, the electronic device displays a portion of the taskbar, and during the display of the portion of the taskbar, the movement trajectory of the taskbar on the y-axis is the same as the movement trajectory of the touch point of the first sliding operation on the y-axis. When the first sliding distance is greater than the third distance and less than the fourth distance, the electronic device fully displays the taskbar, and during the display of the taskbar, the movement trajectory of the taskbar on the y-axis is the same as the movement trajectory of the touch point of the first sliding operation on the y-axis. When the first sliding distance is greater than the fourth distance, the electronic device shrinks the window of the first application, and during the display of the window of the first application, the movement trajectory of the window of the first application on the y-axis is the same as the movement trajectory of the touch point of the first sliding operation on the y-axis, and the first distance is greater than the fourth distance.
9. The method as described in claim 8, characterized in that, After the first sliding operation ends, the method further includes: The electronic device determines, based on the third coordinate and the first coordinate, the second sliding distance of the first sliding operation on the y-axis when the first sliding operation ends; The electronic device determines whether the second sliding distance is greater than the third distance; If the second sliding distance is greater than the third distance, the electronic device starts to execute the taskbar bounce effect and determines whether the sliding speed before the hand-raising operation is greater than or equal to the first threshold. If the sliding speed is less than the first threshold, the electronic device determines whether the second sliding distance is greater than the first distance; If the second sliding distance is greater than the first distance, the electronic device determines to display the multitasking management interface; Once the multitasking management interface is accessed, the electronic device cancels the pop-up animation of the currently running task bar; Upon entering the multitasking management interface, the electronic device hides the taskbar based on the values of a first flag bit and a second flag bit. The value of the first flag bit indicates that the device is currently in an application, and the value of the second flag bit indicates that the taskbar is currently in a display state.
10. The method as described in claim 9, characterized in that, The first duration is the time from when the electronic device detects the first swipe gesture to when it starts executing the taskbar's bounce animation; the second duration is the time from when the electronic device detects the first swipe gesture to when it determines to display the multitasking management interface; the difference between the second duration and the first duration is less than the second value.
11. The method as described in claim 9, characterized in that, The electronic device hides the window in the taskbar.
12. The method as described in claim 11, characterized in that, During the process of hiding the window in the taskbar, the alpha value of the window in the taskbar changes from a first value to a second value. After the taskbar window is hidden for a third period of time, the electronic device sets the alpha value of the taskbar window to a first value. When the alpha value of the taskbar window is at the first value, the electronic device has the ability to display the taskbar.
13. An electronic device, characterized in that, The device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program that, when executed by the one or more processors, causes the electronic device to perform the method as described in any one of claims 1-12.
14. A chip system applied to an electronic device, the chip system comprising one or more processors, characterized in that, The processor is configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-12.
15. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-12.
Citation Information
Patent Citations
Task switching method and terminal
CN103229133A
Method and equipment for executing operation of plurality of users in calculation task
CN104572133A
Display method and terminal
CN110134318A
Device, method, and graphical user interface for navigating between user interfaces
CN111694482A
Upper sliding effect exception handling method and electronic equipment
CN116991274A