Free window interaction method and device and storage medium
By using a custom window handling interface and animation technology, the display anomaly of free window interaction operations in smart terminal devices was resolved, improving the user experience and enabling smooth switching of free windows and associated display of application icon windows.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALLWINNER TECH CO LTD
- Filing Date
- 2025-12-08
- Publication Date
- 2026-05-05
AI Technical Summary
In existing technologies, the user experience of free window interaction on smart terminal devices is poor, especially when switching between foreground and background, problems such as offset, shadow residue, and failure to keep the device on top do not meet the requirements.
By using a custom window handling interface and an animation interpolator and total animation duration, the frame-by-frame movement and attribute changes of the free window are realized. Combined with the animation display of the application icon window, the display abnormality problem of the free window during the foreground-background switching process is solved.
It improves the user experience of free window interaction, keeps the window running continuously without affecting other windows, and enhances the association between the application icon window and the free window, thus improving the user interaction experience.
Smart Images

Figure CN121979421A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method, device and storage medium for free window interaction. Background Technology
[0002] On smart terminal devices (such as mobile phones), operations related to free windows are typically implemented using functional interfaces provided by the operating system, which are based on Google's native code. However, as scenarios involving multiple free windows interacting on smart terminal devices become increasingly common, the user experience provided by the native functional interfaces in the operating system, based on Google's native code, is poor when implementing operations related to free windows. Therefore, there is an urgent need for a way to improve the user experience of free window interaction operations on smart terminal devices. Summary of the Invention
[0003] The main objective of this application is to propose a method, device, and storage medium for free window interaction, which can improve the user experience of free window interaction on smart terminal devices.
[0004] To achieve the above objectives, a first aspect of this application proposes a method for free window interaction, applied to a smart terminal device, the method comprising: Upon receiving a foreground / background switching command, the system redirects to the custom window handling interface and executes the following steps based on the command: Obtain the target free window of the injected application icon window corresponding to the foreground / background switching command; Determine the animation interpolator and total animation duration for creating multi-frame animations within the region formed from the current position of the target free window to the preset target position; Based on the animation interpolator and the total animation duration, the target free window injected into the application icon window is displayed in a time-division manner at different positions within the area formed from the current position to the target position; the target free window at different positions has a different size; In response to the target free window being injected with the application icon window being displayed at the target position, when the foreground / background switching command is a background running command, only the application icon window is displayed; In response to the target free window being displayed at the target position in the application icon window, when the foreground / background switching command is a foreground running command, only the target free window is displayed; The foreground / background switching command is triggered by the native operation interface for free windows provided by the operating system deployed on the smart terminal device.
[0005] To achieve the above objectives, a second aspect of the present application provides an intelligent terminal device, the intelligent terminal device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the free window interaction method described in any of the first aspects. To achieve the above objectives, a third aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the free window interaction method described in any of the first aspects.
[0006] The free window interaction method, device, and storage medium proposed in this application embodiment achieve foreground / background switching of a target free window with an injected application icon window through a custom window processing interface. During the switching process, an animation interpolator and the total animation duration are used to move the target free window with the injected application icon window to the target position frame by frame in the form of animation and change it to the desired window attributes at the target position. This solves the problem of display abnormalities (such as offset / shadow residue) caused by calling the operating system's native interface for scaling. Moreover, when the foreground / background switching command is a background running command, the target free window with the injected application icon window is hidden after it moves to the target position, which keeps the target free window running continuously without affecting other windows. Furthermore, since the application icon window moves with the target free window during the animation display, it can increase the association between the application icon window and the target free window, further improving the user experience. Therefore, compared with related technologies, this application embodiment replaces the original foreground / background switching process by displaying the target free window with changed attributes and the corresponding application icon window in the form of animation, thereby improving the user experience of free window interaction operation on smart terminal devices. Attached Figure Description
[0007] Figure 1 This is a flowchart illustrating an embodiment of the free window interaction method provided in this application; Figure 2 This is a schematic diagram of the program framework of an embodiment of the free window interaction method provided in this application; Figure 3 This is a schematic diagram of the background running instruction switching process in one embodiment of the free window interaction method provided in this application; Figure 4 This is a schematic diagram showing the results before and after switching the foreground running command in one embodiment of the free window interaction method provided in this application; Figure 5 This is a schematic diagram of the application flow of another embodiment of the free window interaction method provided in this application; Figure 6This is a schematic diagram of the hardware structure of the smart terminal device corresponding to the free window interaction method provided in this application. Detailed Implementation
[0008] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0009] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0010] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0011] The following is a description of the terminology used in the embodiments of this application: Free-form windows are a multi-window interaction mode provided by the operating system of smart terminal devices (such as mobile phones, tablets, and foldable screens). They refer to application window forms that can be freely resized, positioned, and layered, and can run in parallel with other windows and interact independently.
[0012] On smart terminal devices (such as mobile phones), operations related to free windows are typically implemented using functional interfaces provided by the operating system, which is based on Google's native code. However, as scenarios involving multiple free windows interacting on smart terminal devices become increasingly common, the user experience provided by the native functional interfaces in the operating system, based on Google's native code, is poor when implementing free window operations. Issues include the inability to reactivate a free window after it has been moved to the background, flickering / offset / shadow residue during the background process, and the inability to keep a free window on top. Existing technologies typically address issues like offset / shadow residue by setting removal animation effects, which, while solving the problem, provide a poor user experience. Similarly, while improving device performance can reduce the probability of flickering, it still occurs under high device load. For keeping a free window on top, existing technologies usually force it to be on top and launch the application as a free window, but this obscures split-screen windows, failing to meet the required specifications. Therefore, there is an urgent need for a method to improve the user experience of free window interaction on smart terminal devices. Based on this, this application provides a method, device, and storage medium for free window interaction, which can improve the user experience of free window interaction on smart terminal devices.
[0013] Reference Figure 1 As shown, a free-window interaction method provided in an embodiment of this application is applied to a smart terminal device, the method comprising: Upon receiving a foreground / background switching command, the system redirects to the custom window handling interface and executes the following steps: Step S100: Obtain the target free window of the injected application icon window corresponding to the foreground / background switching command; Step S200: Determine the animation interpolator and total animation duration for creating multi-frame animations in the region formed from the current position of the target free window to the preset target position; Step S300: Based on the animation interpolator and the total animation duration, display the target free window of the injected application icon window at different positions in the area formed from the current position to the target position in a time-division manner; the size of the target free window is different at different positions; Step S400: In response to the target free window display position of the injected application icon window being the target position, the current background switching command is the background running command, and only the application icon window is displayed; Step S500: In response to the target free window of the injected application icon window being displayed at the target position, the current background switching command is changed to a foreground running command, and only the target free window is displayed; The foreground / background switching command is triggered by the native operation interface for free windows provided by the operating system deployed on the smart terminal device, and the size of the target free window at the target location matches the size of the corresponding application icon window.
[0014] Therefore, by implementing a custom window processing interface to switch between foreground and background operations of a target free window with an injected application icon window, and using an animation interpolator and total animation duration to move the target free window with the injected application icon window to the target position frame by frame and change it to the desired window attributes at the target position, this solves the display anomalies (such as offset / shadow residue) caused by calling the operating system's native interface for scaling. Furthermore, when the foreground / background switching command is a background running command, the target free window with the injected application icon window is hidden after moving to the target position, ensuring that the target free window continues to run without affecting other windows. Since the application icon window moves with the target free window during the animation, the association between the application icon window and the target free window is enhanced, further improving the user experience. Therefore, this embodiment replaces the original foreground / background switching process by displaying the target free window with changed attributes and the corresponding application icon window in the form of animation, thereby improving the user experience of free window interaction on smart terminal devices.
[0015] The target free window that displays the injected application icon window will simultaneously display the application icon window and the corresponding target free window.
[0016] In some embodiments, if the current background switching command is a background run command and the target free window does not contain an application icon window, then it is necessary to call the corresponding interface injection in the operating system. If this is the first time the target free window has triggered the background run command, then the corresponding interface is called to inject the corresponding application icon window. In some embodiments, if the target free window is executing the background run command for the Nth time, and the previous foreground run command only hid the application icon window, then it can be obtained directly.
[0017] Displaying only the application icon window indicates that the corresponding target free window is hidden. Displaying only the target free window can mean either hiding the corresponding application icon window or deleting the corresponding application icon window; this embodiment of the application does not impose any limitations on this.
[0018] Steps S100 to S400 are the process implemented by the custom window processing interface after the foreground / background switching command is triggered in the embodiment of this application. The custom window processing interface is a custom interface implemented by reassembling different native interfaces in the operating system. In this way, the problem caused by the native operation interface for free window interaction provided by the operating system implemented with Google's native code is solved through this process.
[0019] This application does not limit the target location. For example, for a background running command, the target location can be the top of the screen of the smart terminal device, so that the target free window is placed on top after scaling. The target location can also be a preset location or a user-specified location. In some other embodiments, after completing the background running command, the application icon window can be dragged to the top of the smart terminal screen. At this time, the target free window will move accordingly, so that the position of the scaled-down target free window is adjustable. This application does not limit this, and those skilled in the art can selectively set it according to the actual situation.
[0020] This application does not limit the initial size of the application icon window injected into the target free window. In some embodiments, it can be set to the size of the application icon window displayed after the background running command is completed. In this case, in multi-frame animation, only the window properties of the target free window need to be adjusted so that the application icon window moves with the target free window. In other embodiments, the size of the application icon window can be maintained at a preset ratio with the size of the target free window. In this case, during the animation creation process, the application icon window can scale together with the target free window, thereby further improving the user experience. Therefore, this application does not limit the initial size of the application icon window.
[0021] In some embodiments, an application icon window corresponding to the application icon can be created in the target free window using WindowManager.addView, and the token of the application icon window can be determined using WindowManager.LayoutParams.token. Then, a layer for the application icon window can be created using the SurfaceControl layer of the target free window. SurfaceFlinger's Layer Tree manages the hierarchy of the application icon window in the target free window, so that the application icon window can be displayed on the top layer of the target free window after being injected into the target free window.
[0022] This application does not limit the total animation duration (it can be set based on human experience). In some embodiments, the total animation duration varies depending on the current position of the target free window; in other embodiments, the total animation duration remains the same regardless of the current position of the target free window. Those skilled in the art can selectively set this according to the actual situation. The animation interpolator is used to determine the rate of change for each frame of animation based on the total animation duration. By monitoring the generated rate of change, it triggers adjustments to the attributes of the window formed by the target free window injected into the application icon window. Attributes include size, display position, and shape, etc., and can include attributes of both the target free window and the application icon window.
[0023] For example, such as Figure 2 As shown, after the target free window triggers the foreground / background switching command, the operating system's framework layer is invoked. At this point, the framework layer calls the animation module (ValueAnimator) and the layer operation module (SurfaceControl.Transaction). If the application icon window is not injected into the target free window, the window management module (WindowManager) is invoked. ValueAnimator is used to configure the interpolator and the total animation duration to determine the speed ratio (rate of change) of each frame of animation. The rate of change generated by the interpolator can be monitored using the addUpdateListener method. SurfaceControl.Transaction is used to call the SurfaceControl.Transaction.apply method after the target free window's properties are changed. This calls the SurfaceComposerClient to the SurfaceFlinger service via the layer composition client SurfaceComposerClient. SurfaceComposerClient acts as a bridge between the framework and the SurfaceFlinger service, allowing SurfaceFlinger to display both the modified target free window and the application icon window on the smart terminal screen when the rate of change changes.
[0024] For example, such as Figure 3 As shown, taking a "smiley face" as the application icon window as an example, where, Figure 3 This is a schematic diagram illustrating the execution process of a background run instruction triggered by a target free window. In practical applications, only one window is displayed at any given time. When the background run instruction for target free window ① is triggered at time t, the application icon window is injected at time t, but it is not yet displayed. At time t1, the target free window ②, which carries the application icon window, is displayed. At time t2, the application icon window is displayed. Figure 3 The target free window, shown in the third window ③, carrying the application icon window, is displayed at time t3. Figure 3 The fourth window (④) shows the target free window carrying the application icon window; displayed at time t4. Figure 3 The application icon window shown in the fifth window (⑤) is in a hidden state, where the target free window corresponding to this application icon window is hidden. In some embodiments, such as... Figure 3 As shown, the application icon window scales proportionally with the corresponding target window. Therefore, at time t, the size of the application icon window and the size of the target free window at time t are set in a preset ratio. The position of the application icon window relative to the target window remains unchanged.
[0025] Understandably, based on the animation interpolator and the total animation duration, the target free-form window, which injects the application icon window, is displayed in a time-division manner at different positions within the area formed from the current position to the target position, including: Based on the animation interpolator and the total animation duration, generate the rate of change for each frame corresponding to the region formed from the current position to the target position; Based on the rate of change, determine the window display parameters that correspond one-to-one with the rate of change; The display position and size of the target free window injected into the application icon window are adjusted frame by frame using multiple window display parameters, and the outer contour of the target free window is also adjusted frame by frame. Specifically, the outer contour of the target free window located at the target position matches the outer contour of the corresponding application icon window, and the size of the target free window matches the size of the corresponding application icon window.
[0026] The outer contour (i.e., shape) of the application icon window remains constant. In some embodiments, the adjustment of the window size during frame-by-frame adjustment of the display position and window size of the target free window injected into the application icon window is limited to the window size of the target free window. In other embodiments, the adjustment of the window size includes both the window size of the target free window and the window size of the application icon window. Frame-by-frame adjustment of the display position of the target free window injected into the application icon window includes the synchronous adjustment of the display positions of both the application icon window and the target free window, so that the relative positions of the application icon window and the corresponding target free window remain unchanged. This application does not limit the outer contour of the application icon window; those skilled in the art can selectively set it according to actual needs. Figure 3 As shown, the application icon window is circular. In other embodiments, the application icon window may also be square, flower-shaped, etc.
[0027] This application does not restrict how the external outline, display position, and window size are adjusted by calling the operating system's interfaces. Those skilled in the art can selectively set these parameters according to actual needs. For example, taking the Android operating system as an example, since each window is represented by a Surface to indicate layer information, and SurfaceControl is a class used to control the Surface, when changes in window shape and size require a series of attribute changes to the Surface (such as scale, position, and transparency), the inner class Transaction of SurfaceControl can be used to control these attribute changes. Specifically, Transaction.setCrop is used to set the layer's clipping region; rect represents the clipping region, which determines which parts of the layer will be rendered on the screen, and content exceeding the clipping region will be discarded. Transaction.setPosition is used to set the layer's position. Transaction.setCornerRadius is used to set the layer's rounded corners, thereby changing the layer's shape.
[0028] Window display parameters may include clipping region, window position, scaling ratio, and corner radius. In this embodiment, the clipping region, window position, scaling ratio, and corner radius can be combined according to actual needs to obtain window display parameters that meet display requirements. The corner radius is used to change the shape of the outer contour. The scaling ratio is used to determine the actual size of the window.
[0029] The rate of change is different in different frames.
[0030] Understandably, the window display parameters include the clipping region, which is determined through the following steps: In response to the detection of a new rate of change, the current background switching command is changed to a foreground running command, and the effective clipping length is determined based on the width, width-to-height difference, and rate of change of the currently displayed target free window; In response to the detection of a new rate of change, the current background switching command is changed to a background running command, and the effective clipping length is determined based on the height, width-to-height difference, and rate of change of the currently displayed target free window; Based on the effective cutting length, determine the boundary coordinates of the preset cutting shapes to obtain the cutting area; The width-to-height difference represents the length between the width and height of the currently displayed target free window.
[0031] The clipping region is used to define the area to be displayed; content outside the clipping region will not be displayed.
[0032] For example, for Figure 4Since the free window of application A corresponds to the foreground running command, the effective clipping length = target free window width + percent * (target free window height - target free window width); see reference Figure 3 As shown, for the first window ①~⑤, which corresponds to the background running instructions, the effective clipping length = target free window height + percent * (target free window width - target free window height); where percent represents the rate of change of the target free window displayed in the next frame. (target free window width - target free window height) represents the width-to-height difference. Target free window width represents the width of the target free window; target free window height represents the height of the target free window.
[0033] This method further ensures that the area displayed in the target free window matches the scaled effect.
[0034] Understandably, window display parameters include window position, which is determined through the following steps: In response to the detection of a new rate of change, the current background switching command is changed to a foreground running command. The target horizontal coordinate is determined based on the horizontal coordinate of the application icon window corresponding to the currently displayed target free window, the horizontal coordinate spacing of the first window, and the rate of change; the target vertical coordinate is determined based on the vertical coordinate of the application icon window corresponding to the currently displayed target free window and the vertical coordinate spacing of the first window. In response to the detection of a new rate of change, the current background switching command is changed to a background running command. The target horizontal coordinates are determined based on the horizontal coordinates of the currently displayed target free window, the horizontal coordinate spacing of the second window, and the rate of change; the target vertical coordinates are determined based on the vertical coordinates of the currently displayed target free window and the vertical coordinate spacing of the second window. The first window's horizontal coordinate spacing represents the difference between the horizontal coordinates of the currently displayed target free window and the horizontal coordinates of the corresponding application icon window; the first window's vertical coordinate spacing represents the difference between the vertical coordinates of the currently displayed target free window and the vertical coordinates of the corresponding application icon window; the second window's horizontal coordinate spacing represents the difference between the horizontal coordinates of the application icon window corresponding to the currently displayed target free window and the horizontal coordinates of the target free window; the second window's vertical coordinate spacing represents the difference between the vertical coordinates of the application icon window corresponding to the currently displayed target free window and the vertical coordinates of the target free window; both the target vertical coordinates and the target horizontal coordinates are parameters of the window position.
[0035] For example, refer to Figure 4 As shown, the free window of application A corresponds to the foreground running command. Figure 4 The target horizontal coordinate of each target free window is defined as: `left = (int) (application icon window left + percent * (target free window left - application icon window left));` and the target vertical coordinate is defined as: `top = (int) (application icon window top + percent * (target free window top - application icon window top));`. (Refer to...) Figure 3 As shown, Figure 3 The middle windows ①~⑤ are illustrations of the display windows for background running commands. Figure 3 The target horizontal coordinate of windows ②~⑤ is defined as: `left = (int)(target free window left + percent * (application icon window left - target free window left))`; the target vertical coordinate is defined as: `top = (int) (free window top + percent * (application icon window top - target free window top))`; where `percent` represents the rate of change of the displayed window in the next frame, such as the current display being... Figure 3 The third window in the middle, then percent represents Figure 3 The fourth window in the middle. The `left` coordinate of the application icon window is the horizontal coordinate of the application icon window corresponding to the currently displayed target free window; the `top` coordinate of the application icon window is the vertical coordinate of the application icon window corresponding to the currently displayed target free window; `left` represents the width of the currently displayed target free window; `top` represents the vertical coordinate of the currently displayed target free window. `(left - left)` represents the horizontal coordinate spacing of the first window; `(top - top)` represents the vertical coordinate spacing of the first window. `(left - left)` represents the horizontal coordinate spacing of the second window; `(top - top)` represents the vertical coordinate spacing of the second window.
[0036] The target's vertical and horizontal coordinates, combined with the scaling factor, determine the size and position of the target freeform window. This method of position determination ensures that the relative positions of the application icon window and the target freeform window remain fixed.
[0037] Understandably, window display parameters include scaling, which is determined through the following steps: In response to the detection of a new rate of change, the current background switching command is changed to a background running command. The target horizontal change interval is determined based on the width of the currently displayed target free window, the difference in the horizontal length of the window, and the rate of change. In response to the detection of a new rate of change, the current background switching command is changed to a background running command. The target horizontal change interval is determined based on the width of the application icon window corresponding to the currently displayed target free window, the difference in the horizontal length of the window, and the rate of change. The scaling ratio is determined based on the target horizontal variation spacing and the width of the currently displayed target free window.
[0038] For example, refer to Figure 3 As shown, Figure 3 The middle windows ①~⑤ correspond to the display windows of the background running instructions. The target horizontal variation spacing of the target free window is calculated as: width = (int) (application icon window width + percent * (target free window width - application icon window width)); see reference. Figure 4 As shown, Figure 4 The target horizontal variation interval for each target free window is defined as: width = (int) (target free window width - (target free window width - application icon window width) * percent). (target free window width - application icon window width) represents the difference in the horizontal length of the windows. Therefore, for the application icon window, this scaling ratio can be directly used for scaling.
[0039] Understandably, in some embodiments, only the application icon window corresponding to the most recently triggered background running command is displayed on the screen of the smart terminal device to improve the user experience. In such embodiments, the method further includes: In response to a window query request triggered by an application icon window, the task window area is displayed, and all application icon windows corresponding to background run instructions triggered by meeting preset window management conditions are displayed in the task window area.
[0040] Multiple target free windows can be managed simultaneously by setting the task window area. The free space represents the position of the target free window in the task window area that has not been scaled.
[0041] This application embodiment does not restrict how the window query request is triggered. For example, clicking the application icon window can trigger the window query request, double-clicking the application icon window can restore the corresponding target free window, or long-pressing the right button to display the menu bar for selection. This application embodiment does not show this, and those skilled in the art can selectively set it according to actual needs.
[0042] This application does not limit the specific background running instructions triggered by the preset window management conditions. These instructions can be background running instructions triggered within a preset historical time period, or a preset number of recently triggered background running instructions. For example, if the current time is t and the historical time period is 2 minutes, then the application icon windows for background running instructions triggered after t-2 minutes will all be displayed. Similarly, if the preset number is 5, then the application icon windows for the 5 most recently triggered background running instructions will be displayed.
[0043] The application icon window corresponding to the background running command indicates that the application icon window of the corresponding target free window is hidden.
[0044] For example, a task window area is provided on the right side of the terminal smart device. In some embodiments, the task window area can also be manually hidden after being displayed, thereby further improving the user experience. In some embodiments, when the task window area is already displayed and a new background running command is triggered, the scaled-down target window containing the application icon window will be directly displayed in the task window area (that is, the target position will be updated to an empty space in the task window area).
[0045] At this point, managing multiple target free windows simultaneously within the same task window area is more convenient. Since the target application window is not closed but merely hidden within the task window area, the application response of the target free window on the terminal smart device is more timely when a restore is triggered, thereby improving user efficiency.
[0046] Understandably, the method also includes at least one of the following: In response to detecting a window display command for the first application icon window in the task window area, the first target free window corresponding to the first application icon window is unhidden; In response to the task window hide command, show the application icon window that was most recently shrunk based on the background running command in the task window area and hide the task window area.
[0047] In some embodiments, after unhiding, the first application icon window and the corresponding target free window are displayed separately. For example, see... Figure 4 As shown, when the application icon window of application A is clicked (which triggers a window display command; in some embodiments, it may be triggered in other ways, but this application does not impose any restrictions), the hiding of the target free window of application A is canceled, and the target free window and the application icon window of application A are displayed separately.
[0048] Understandably, the method also includes at least one of the following: In response to receiving a batch delete command in the task window area, delete the multiple second target free windows and the corresponding second application icon windows corresponding to the batch delete command; In response to receiving a single-window deletion command in the task window area, delete the third target free window and the corresponding third application icon window corresponding to the single-window deletion command.
[0049] For example, refer to Figure 4 As shown, each application A has a delete icon. The display of the delete icon triggers a single-window delete command, which can delete the corresponding target free window. In some embodiments, the delete icon can be displayed on the application icon window. In this case, single-window deletion can be achieved without expanding the target free window. In other embodiments, the delete icon can be displayed in the target free window in the task window area, so that deletion can be performed based on the target free window, resulting in a better user experience.
[0050] Batch deletion commands can be configured by setting individual deletion controls, such as... Figure 4 As shown, a "Clear All" control is displayed at the bottom of the task window area.
[0051] For example, see below. Figure 5 The interaction method of the free window in the embodiments of this application is described as follows: S1. Trigger a background execution command for the target free window to create an application icon window for the target free window and bind it to the top of the free window before the startup animation is executed. In some embodiments, the location may also be other, and this application embodiment does not limit this.
[0052] S2, Startup Animation: Continuously changes the properties of the display window containing the target free window and the application icon window according to a preset algorithm formula. The properties include position, scaling ratio, clipping area, etc., and then displays the display window after the properties have been changed.
[0053] S3, Update Animation: Monitor the rate of change of each frame of the animation. If no new rate of change is generated, jump to S4; otherwise, jump to S2 to start a new animation to display the window. S4. End Animation: After the animation ends, hide the target free window and show the application icon window.
[0054] S5. Click the application icon window; S6: Determine whether to display the task window area based on whether the number of target free windows currently running in the background exceeds a preset threshold (e.g., threshold set to 1). If the number of target free windows running in the background is greater than 1, proceed to S7; otherwise, proceed to S2 and refer to the application icon window. Figure 3 Magnify from right to left to obtain Figure 4Display windows outside the central task window area.
[0055] S7. Display the task window area.
[0056] At this point, you can click on the sub-item in the task window area (i.e., the first application icon window) to restore the corresponding target free window and hide the task window area.
[0057] Please see Figure 6 , Figure 6 The hardware structure of another embodiment of a smart terminal device is illustrated. The smart terminal device includes: The processor 601 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 602 can be a NAND flash memory. The relevant program code is stored in the memory 602 and is called by the processor 601 to execute the methods described in the embodiments of this application. The input / output interface 603 is used to implement information input and output; The communication interface 604 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 605 transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601, memory 602, input / output interface 603, and communication interface 604 are connected to each other within the device via bus 605.
[0058] This application also provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements the above-described method.
[0059] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0060] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0061] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0062] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0063] The terms “comprising” and “having”, and any variations thereof, in the specification and accompanying drawings of this application are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are expressly listed, but may include other steps or units that are not expressly listed or that are inherent to such process, method, product, or apparatus.
[0064] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0065] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0066] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0067] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0068] 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, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for free window interaction, characterized in that, Applied to smart terminal devices, the method includes: Upon receiving a foreground / background switching command, the system redirects to the custom window handling interface and executes the following steps based on the command: Obtain the target free window of the injected application icon window corresponding to the foreground / background switching command; Determine the animation interpolator and total animation duration for creating multi-frame animations within the region formed from the current position of the target free window to the preset target position; Based on the animation interpolator and the total animation duration, the target free window injected into the application icon window is displayed in a time-division manner at different positions within the area formed from the current position to the target position; the target free window at different positions has a different size; In response to the target free window being injected with the application icon window being displayed at the target position, when the foreground / background switching command is a background running command, only the application icon window is displayed; In response to the target free window being displayed at the target position in the application icon window, when the foreground / background switching command is a foreground running command, only the target free window is displayed; The foreground / background switching command is triggered by the native operation interface for free windows provided by the operating system deployed on the smart terminal device.
2. The method for free window interaction according to claim 1, characterized in that, The step of displaying the target free window injected into the application icon window at different positions within the region formed from the current position to the target position, based on the animation interpolator and the total animation duration, includes: Based on the animation interpolator and the total animation duration, generate the rate of change for each frame corresponding to the region formed from the current position to the target position; Based on the rate of change, determine the window display parameters that correspond one-to-one with the rate of change; The display position and window size of the target free window injected into the application icon window are adjusted frame by frame using multiple window display parameters, and the outer contour of the target free window is also adjusted frame by frame. When the foreground / background switching command is a background running command, the outer contour of the target free window located at the target position matches the outer contour of the corresponding application icon window, and the size of the target free window matches the size of the corresponding application icon window.
3. The method for free window interaction according to claim 2, characterized in that, The window display parameters include the clipping region, which is determined through the following steps: In response to the detection of a new rate of change, when the foreground / background switching instruction is a foreground running instruction, the effective clipping length is determined based on the width, width-to-height difference, and rate of change of the currently displayed target free window; In response to the detection of a new rate of change, when the foreground / background switching instruction is a background running instruction, the effective clipping length is determined based on the height of the currently displayed target free window, the width-to-height difference, and the rate of change. Based on the effective cutting length, the boundary coordinates of the preset cutting shapes are determined to obtain the cutting area; Wherein, the width-to-height difference represents the length value between the width and height of the currently displayed target free window.
4. The method for free window interaction according to claim 2 or 3, characterized in that, The window display parameters include the window position, which is determined through the following steps: In response to the detection of a new rate of change, when the foreground / background switching instruction is a foreground running instruction, the target horizontal coordinate is determined based on the horizontal coordinate of the application icon window corresponding to the currently displayed target free window, the horizontal coordinate spacing of the first window, and the rate of change; the target vertical coordinate is determined based on the vertical coordinate of the application icon window corresponding to the currently displayed target free window and the vertical coordinate spacing of the first window. In response to the detection of a new rate of change, when the foreground / background switching instruction is a background running instruction, the target horizontal coordinates are determined based on the currently displayed horizontal coordinates of the target free window, the horizontal coordinate spacing of the second window, and the rate of change; the target vertical coordinates are determined based on the currently displayed vertical coordinates of the target free window and the vertical coordinate spacing of the second window. Wherein, the first window horizontal coordinate spacing represents the difference between the horizontal coordinate of the currently displayed target free window and the horizontal coordinate of the corresponding application icon window; the first window vertical coordinate spacing represents the difference between the vertical coordinate of the currently displayed target free window and the vertical coordinate of the corresponding application icon window; the second window horizontal coordinate spacing represents the difference between the horizontal coordinate of the application icon window corresponding to the currently displayed target free window and the horizontal coordinate of the target free window; the second window vertical coordinate spacing represents the difference between the vertical coordinate of the application icon window corresponding to the currently displayed target free window and the vertical coordinate of the target free window; the target vertical coordinate and the target horizontal coordinate are both parameters of the window position.
5. The method for free window interaction according to claim 2 or 3, characterized in that, The window display parameters include the scaling ratio, which is determined through the following steps: In response to the detection of a new rate of change, when the foreground / background switching instruction is a background running instruction, the target horizontal change interval is determined based on the width of the currently displayed target free window, the difference in the horizontal length of the window, and the rate of change. In response to the detection of a new rate of change, when the foreground / background switching instruction is a foreground running instruction, the target horizontal change interval is determined based on the width of the application icon window corresponding to the currently displayed target free window, the difference in the horizontal length of the window, and the rate of change. The scaling ratio is determined based on the target horizontal variation spacing and the width of the currently displayed target free window.
6. The method for free window interaction according to claim 1, characterized in that, The method further includes: In response to a window query request triggered by the application icon window, the task window area is displayed, and the application icon windows corresponding to background running instructions triggered by satisfying preset window management conditions are all displayed in the task window area.
7. The method for free window interaction according to claim 6, characterized in that, The method further includes at least one of the following: In response to detecting a window display command for the first application icon window in the task window area, the first target free window corresponding to the first application icon window is unhidden; In response to a task window hiding command, the application icon window that was most recently shrunk based on a background running command is displayed in the task window area, and the task window area is hidden.
8. The method for free window interaction according to claim 7, characterized in that, The method further includes at least one of the following: In response to receiving a batch delete command in the task window area, delete the multiple second target free windows and the corresponding second application icon windows corresponding to the batch delete command; In response to receiving a single-window deletion command in the task window area, the third target free window and the corresponding third application icon window corresponding to the single-window deletion command are deleted.
9. A smart terminal device, characterized in that, The intelligent terminal device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the free window interaction method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the free window interaction method as described in any one of claims 1 to 8.