Method and device for switching back to full screen of small window and electronic equipment
By detecting whether the drag operation is in the corner hot zone of the small window, and determining whether to switch back to the full screen based on the expected distance, the problem that the small window cannot return to the full screen in the middle of the screen is solved, improving the user experience.
Patent Information
- Application Number
- CN202311021190.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, when the small window is in the middle of the screen, it is difficult to meet the conditions for returning to the full screen, resulting in poor interactive experience.
By detecting whether the drag operation is in the corner hot zone of the small window. If it is in the hot zone, determine the full-screen turning back judgment condition for the target corner, and control the small window to switch back to full screen according to the expected distance is less than or equal to the full-screen trigger threshold. state.
Ensure that the small window can meet the conditions of switching back to full screen at any position, improve the user experience, and solve the pain point that the small window cannot trigger the full screen in the middle of the screen.
Smart Images

Figure CN119493507A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of system window management, and in particular to a method, device and electronic device for switching back to full screen of a small window. Background Art
[0002] In current mobile devices, the interaction of returning from a small window to a full screen is usually determined by the movement ratio. This method has limitations on the initial position of the small window. When the small window is in a relatively middle position, it is difficult to meet the conditions for returning to the full screen, and the interactive experience is poor. Summary of the invention
[0003] Embodiments of the present application provide a method, device, and electronic device for switching a small window back to full screen.
[0004] The first embodiment of the present application provides a method for switching back to full screen of a small window, including:
[0005] Detecting a drag operation and determining whether the drag operation is within a hot zone at any corner of the small window;
[0006] If the drag operation is in a hot zone of one of the target corners of the small window, determining a full screen switching back determination condition of the target corner;
[0007] If the dragging operation satisfies the full-screen switching back determination condition, the small window is controlled to switch back to the full-screen state.
[0008] In one embodiment of the present application, if the drag operation satisfies the full-screen switching back determination condition, controlling the small window to switch back to the full-screen state includes:
[0009] Obtaining a full-screen trigger threshold for the small window;
[0010] determining a target orientation of the target corner;
[0011] Tracking the coordinate values of the drag operation, and determining an estimated distance from the target corner to a corresponding target screen corner based on the coordinate values and the target orientation;
[0012] If the estimated distance is tracked to be less than or equal to the full-screen trigger threshold, the small window is controlled to switch to the full-screen state.
[0013] In one embodiment of the present application, determining the estimated distance from the target corner to the target screen corner based on the coordinate value and the target orientation includes:
[0014] If the target orientation indicates that the target corner is the left corner of the small window, a first difference between the screen height and the longitudinal coordinate value is obtained, and the estimated distance is determined based on the first difference and the transverse coordinate value.
[0015] In one embodiment of the present application, determining the estimated distance from the target corner to the target screen corner based on the coordinate value and the target orientation includes:
[0016] If the target orientation indicates that the target corner is the right corner of the small window, obtain the second difference between the screen width and the horizontal coordinate value and the third difference between the screen height and the vertical coordinate value, and determine the estimated distance based on the second difference and the third difference.
[0017] In one embodiment of the present application, obtaining the full-screen trigger threshold of the small window includes:
[0018] Based on the screen height and the screen width, a full-screen trigger threshold of the small window is obtained.
[0019] In one embodiment of the present application, acquiring the full-screen trigger threshold of the small window based on the screen height and the screen width includes:
[0020] Determining a minimum value from the screen height and the screen width;
[0021] The minimum value is reduced based on the set value to obtain the full-screen triggering threshold of the small window.
[0022] In one embodiment of the present application, the method further includes:
[0023] During the tracking process, if the estimated distance is greater than the full-screen trigger threshold, the small window is resized and displayed according to the coordinate value until the drag operation is released, or the estimated distance is less than or equal to the full-screen trigger threshold and switches to the full-screen state.
[0024] The second aspect of the present application provides a device for switching back to full screen of a small window, including:
[0025] A detection module, used to detect a drag operation and determine whether the drag operation is within a hot zone at any corner of the small window;
[0026] A first acquisition module is used to determine a full screen switching back judgment condition of one of the target corners of the small window if the drag operation is in a hot zone of the target corner of the small window;
[0027] The control module is used to control the small window to switch back to the full screen state if the drag operation meets the full screen switching back determination condition.
[0028] In one embodiment of the present application, the control module includes:
[0029] Obtaining a full-screen trigger threshold for the small window;
[0030] determining a target orientation of the target corner;
[0031] Tracking the coordinate values of the drag operation, and determining an estimated distance from the target corner to a corresponding target screen corner based on the coordinate values and the target orientation;
[0032] If the estimated distance is tracked to be less than or equal to the full-screen trigger threshold, the small window is controlled to switch to the full-screen state.
[0033] In one embodiment of the present application, the control module includes:
[0034] If the target orientation indicates that the target corner is the left corner of the small window, a first difference between the screen height and the longitudinal coordinate value is obtained, and the estimated distance is determined based on the first difference and the transverse coordinate value.
[0035] In one embodiment of the present application, the control module includes:
[0036] If the target orientation indicates that the target corner is the right corner of the small window, obtain the second difference between the screen width and the horizontal coordinate value and the third difference between the screen height and the vertical coordinate value, and determine the estimated distance based on the second difference and the third difference.
[0037] In one embodiment of the present application, the control module includes:
[0038] Based on the screen height and the screen width, a full-screen trigger threshold of the small window is obtained.
[0039] In one embodiment of the present application, the control module includes:
[0040] Determining a minimum value from the screen height and the screen width;
[0041] The minimum value is reduced based on the set value to obtain the full-screen triggering threshold of the small window.
[0042] In one embodiment of the present application, the device further comprises:
[0043] During the tracking process, if the estimated distance is greater than the full-screen trigger threshold, the small window is resized and displayed according to the coordinate value until the drag operation is released, or the estimated distance is less than or equal to the full-screen trigger threshold and switches to the full-screen state.
[0044] The third aspect embodiment of the present application proposes an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the full-screen switching back method of the small window proposed in the first aspect embodiment of the present application.
[0045] The fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by the processor of an electronic device, the electronic device can execute the method proposed in the first aspect embodiment of the present application.
[0046] The fifth aspect embodiment of the present application proposes a computer program product, including a computer program, which implements the method proposed in the first aspect embodiment of the present application when executed by a processor in a communication device.
[0047] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0048] In an embodiment of the present application, the full-screen switching back judgment conditions are adaptively determined for different target corners, so that different target corners have different full-screen switching back judgment conditions, which can ensure that the drag operation can meet the full-screen switching back conditions in different situations, and solve the pain point that the small window cannot be triggered to return to the full screen when it is in the middle of the screen, making the interaction between the small window and the full screen more convenient, and improving the user experience.
[0049] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0051] Figure 1 A schematic diagram of dragging a small window provided in an embodiment of the present application;
[0052] Figure 1A A schematic diagram of a process of switching back to full screen of a small window provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of a flow chart of another method for switching back to full screen of a small window provided in an embodiment of the present application;
[0054] Figure 2A A schematic diagram of a target corner provided in an embodiment of the present application, where the target corner is a left corner;
[0055] Figure 2B A schematic diagram of a target corner provided in an embodiment of the present application, where the target corner is a right corner;
[0056] Figure 3 A schematic diagram of a flow chart of another method for switching back to full screen of a small window provided in an embodiment of the present application;
[0057] Figure 4 A schematic diagram of the structure of a device for switching back to full screen of a small window provided in an embodiment of the present application;
[0058] Figure 5 A schematic diagram of the structure of an electronic device provided according to an embodiment of the present application;
[0059] Figure 6 It is a schematic diagram of the structure of another electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0061] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0062] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at..." or "when..." or "in response to determination".
[0063] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0064] It should be noted that the full-screen switching back method of a small window provided in any embodiment of the present application can be executed alone, or can be executed in combination with possible implementation methods in other embodiments, or can be executed in combination with any technical solution in the related technology.
[0065] In the current interactive process of switching from a small window to a full screen, it is usually determined whether to switch to a full screen based on the movement ratio of the small window. When the movement ratio is greater than a preset threshold, it is determined that the small window can return to a full screen operation and the small window is switched to a full screen. Figure 1 As shown, the four corners of the window area are a, b, c and d, the movable range corners of the window are A, B, C and D, the coordinates of the window starting point (x1, y1), the finger moving coordinates (x2, y2), the coordinates of the upper left corner of the window movable boundary (left, top) and the coordinates of the lower right corner of the finger movable boundary (right, bottom), where the finger moving coordinates are the position coordinates corresponding to the drag operation. The horizontal starting point ratio is calculated by the above multiple coordinates: The vertical starting point ratio is: The lateral movement point ratio is: And the vertical moving point ratio is: The horizontal movement ratio of the small window is obtained based on the horizontal movement point ratio and the horizontal starting point ratio, and the horizontal movement ratio of the small window is the difference between the horizontal movement point ratio and the horizontal starting point ratio; the vertical movement ratio of the small window is obtained based on the vertical movement point ratio and the vertical starting point ratio, and the vertical movement ratio of the small window is the difference between the vertical movement point ratio and the vertical starting point ratio. When the horizontal movement ratio of the small window is greater than 0.9 and the vertical movement ratio of the small window is greater than 0.9, it is determined that the small window can be switched to the full screen state.
[0066] It is understandable that the current method of judging whether to switch to full screen based on the movement ratio has high requirements for the starting position of the small window. For example, when the starting position of the small window is in the middle of the screen, it is basically impossible to meet the requirement that both the horizontal movement ratio and the vertical movement ratio of the small window are greater than 0.9, that is, the condition for returning to full screen cannot be met.
[0067] The following describes the method, device and electronic device for switching back to full screen of a small window in an embodiment of the present application with reference to the accompanying drawings.
[0068] Figure 1A The following is a flow chart of a method for switching back to full screen in a small window provided in an embodiment of the present application. Figure 1A As shown, the method includes but is not limited to the following steps:
[0069] S101, detecting a drag operation, and determining whether the drag operation is within a hot zone of any corner of the small window.
[0070] This application can be applied to mobile devices, tablet computers, car computers and other devices with touch screen and small window functions, and can realize convenient interaction between small windows and full screen.
[0071] In some implementations, the drag operation may be an operation to move or resize the small window based on a finger, a stylus, or a mouse.
[0072] In some implementations, the position of the click area of the finger, stylus, or mouse of the drag operation may be identified, such as coordinate information. Optionally, the drag operation area may be a border or corner of the small window.
[0073] Hotspots are interactive parts of the interface, and can also be understood as clickable parts of the interface. In order to facilitate operations such as moving or scaling the entire small window, operations are usually performed by dragging the corners of the window. Therefore, it is possible to determine whether the drag operation is within the hotspot of any corner of the small window, and based on this, determine whether the drag operation can be performed in full screen interaction.
[0074] Optionally, the hot zone at the corner may be a circular area or a rectangular area determined with the corner point of the small window as the center. In order to ensure the accuracy of the operation on the small window, the setting of the hot zone should not be too large.
[0075] S102: If the drag operation is in a hot zone of one of the target corners of the small window, determine a full screen switching back judgment condition of the target corner.
[0076] In some implementations, the target corner can be the target position for dragging the small window when scaling it or switching it back to full screen. That is, when the dragging operation is within the coverage of the target corner of the small window, the dragging operation can scale the small window or switch it back to full screen. Optionally, all four corners of the small window can be used as target corners, or the lower left corner and lower right corner of the small window can be used as target corners.
[0077] In some implementations, if the drag operation is within the coverage of one of the target corners of the small window, it can be considered that the drag operation can adjust the shape of the small window. For example, it may be an operation that requires returning to the full screen. Therefore, whether the requirement for the small window to return to the full screen is met during the drag operation is analyzed.
[0078] In some implementations, a full-screen switch back determination condition corresponding to the target corner may be set, and the full-screen switch back determination condition is used to determine whether the current drag operation can trigger a return to full screen. Optionally, the full-screen switch back determination condition may be determined based on the distance between the target corner and the screen border, for example, a distance threshold may be set, and when the distance between the target corner and the screen border is relatively close, it is determined that the full-screen switch back determination condition is met, and when the distance between the target corner and the screen border is relatively far, it is determined that the full-screen switch back determination condition is not met.
[0079] S103: If the dragging operation satisfies the full-screen switching back determination condition, control the small window to switch back to the full-screen state.
[0080] In some implementations, if the drag operation meets the full-screen switching back judgment conditions, it means that the current drag operation on the small window can trigger a return to full screen; when it is determined that the drag operation meets the full-screen switching back judgment conditions, the small window is controlled to switch back to the full-screen state.
[0081] Accordingly, if the drag operation does not meet the full screen switching back judgment condition, it can be determined that the drag operation is to adjust the size of the small window, etc., and the size of the small window can be adjusted to the size of the position where the drag operation stops. The embodiment of the present application can avoid the situation where the small window cannot meet the return to full screen when it is in the middle of the screen, so that the small window can meet the conditions for switching back to full screen at any position, thereby improving the user experience.
[0082] In the embodiment of the present application, by obtaining the position of the drag operation, it is determined whether it is in the hot zone of any corner of the small window. When it is in the hot zone of any corner, the full-screen switching back judgment condition corresponding to the target corner is determined, and whether the small window switches back to the full-screen state is controlled according to whether the drag operation satisfies the full-screen switching back judgment condition. The full-screen switching back judgment condition is adaptively determined for different target corners, so that different target corners have different judgment conditions, which can ensure that the full-screen switching back conditions can be met in different situations, solving the pain point that the small window cannot be triggered to return to the full screen when it is in the middle of the screen, making the interaction between the small window and the full screen more convenient, and improving the user experience.
[0083] Based on the above embodiment, the process of controlling the small window to switch back to the full screen state if the drag operation meets the full screen switch back determination condition is described. Figure 2 As shown, the method includes but is not limited to the following steps:
[0084] S201, obtaining a full-screen triggering threshold of a small window.
[0085] In some implementations, a full-screen trigger threshold of the small window may be obtained, and the full-screen trigger threshold may be used to determine whether the small window can trigger a return to full-screen operation.
[0086] In some implementations, the full screen triggering threshold of the small window can be a fixed value or a value that is adaptive based on the screen size. Optionally, the full screen triggering threshold can be set according to the height of the screen or the width of the screen.
[0087] In some implementations, the full screen trigger threshold of the small window can be obtained based on the screen height and the screen width. Optionally, a minimum value can be determined from the screen height and the screen width; the minimum value is reduced based on the set value to obtain the full screen trigger threshold of the small window.
[0088] For example, the minimum value is determined from the screen height and the screen width, and the product of the set value and the minimum value is used as the full-screen trigger threshold; for example, the minimum value is marked as f, and assuming the set value is 0.06, the full-screen trigger threshold of the small window is 0.06f.
[0089] S202, determining the target orientation of the target corner.
[0090] In some implementations, the target orientation of the target corner can represent the position of the target corner in the small window; for example, if the target corner is the left corner of the small window, the corresponding target orientation is the left; if the target corner is the right corner of the small window, the corresponding target orientation is the right.
[0091] S203, tracking the coordinate value of the drag operation, and determining the estimated distance from the target corner to the corresponding target screen corner based on the coordinate value and the target orientation.
[0092] It is understandable that during the dragging process, the position of the dragging operation is constantly changing, so the coordinates of the dragging operation are tracked, that is, the coordinate values of the position of the dragging operation are obtained in real time.
[0093] Furthermore, the height and width of the screen are obtained, and combined with the coordinate value of the position where the drag operation is located, the estimated distance from the target corner to the corresponding target screen corner is determined. Optionally, the target screen corner corresponding to the target corner can be a corner of the same mapping position. For example, if the target corner of the small window is the lower left corner, the corresponding target screen corner is the lower left corner of the screen; if the target corner of the small window is the lower right corner, the corresponding target screen corner is the lower right corner of the screen. In other words, the horizontal distance and vertical distance from the target corner to the corresponding target screen corner can be obtained based on the horizontal coordinate value, vertical coordinate value, screen height and screen width of the position where the drag operation is located, and the estimated distance from the target corner to the corresponding target screen corner can be determined based on the horizontal distance and vertical distance.
[0094] In some implementations, the estimated distance can be used to reflect the dragging status of the small window. For example, when the estimated distance is large, it indicates that the target corner of the current drag operation is far away from the target corner of the screen. The estimated distance at this time can be used to determine whether it meets the full-screen trigger threshold condition to determine whether the small window meets the conditions for returning to the full-screen operation.
[0095] In some implementations, a two-dimensional coordinate system may be constructed with the upper left corner of the screen as the origin to determine the coordinate values of the target corners.
[0096] In some implementations, the target screen corner is determined based on the position of the target corner. For example, if the target corner is the left corner, the corresponding target screen corner is the left corner; if the target corner is the right corner, the corresponding target screen corner is the right corner. For example, when the target corner is the lower left corner of the small window, the corresponding target screen corner is the lower left corner of the screen.
[0097] In some implementations, if the target orientation indicates that the target corner is the left corner of the small window, a first difference between the screen height and the longitudinal coordinate value is obtained, and a trigonometric function operation is performed on the first difference and the transverse coordinate value to determine an estimated distance.
[0098] In some implementations, if the target orientation indicates that the target corner is the right corner of the small window, a second difference between the screen width and the horizontal coordinate value and a third difference between the screen height and the vertical coordinate value are obtained, and trigonometric functions are performed on the second difference and the third difference to determine the estimated distance.
[0099] For an exemplary description, see Figure 2A and Figure 2B , which respectively show a schematic diagram of a target corner being the left corner of a small window and a schematic diagram of a target corner being the right corner of a small window; Figure 2A As shown, the small window includes target corners a, target corners b, target corners c and target corners d. When the target corner is the left corner c of the small window, the position to which the target corner is moved during the drag operation is marked as the finger movement coordinates (X1, Y1), and the difference between the screen height and the longitudinal coordinate value is obtained as the first difference. Based on the cosine theorem in trigonometric functions, the first difference and the transverse coordinate value are calculated to determine the length of the hypotenuse, which is the estimated distance from the target corner to the target screen corner.
[0100] like Figure 2B As shown, the small window includes target corners a, target corners b, target corners c and target corners d. When the target corner is the right corner d of the small window, the position to which the target corner is moved during the drag operation is marked as the finger movement coordinates (X1, Y1), and the difference between the screen width and the horizontal coordinate is obtained as the second difference, and the difference between the screen height and the vertical coordinate is obtained as the third difference. Based on the cosine theorem in trigonometric functions, the second difference and the third difference are calculated to determine the length of the hypotenuse, which is the estimated distance from the target corner to the target screen corner.
[0101] S204: If the estimated tracking distance is less than or equal to the full-screen trigger threshold, control the small window to switch to the full-screen state.
[0102] In an embodiment of the present application, whether to switch to full screen can be determined based on the estimated distance between the target corner and the target screen corner. During the continuous tracking of the coordinate values of the drag operation, the estimated distance from the target corner to the corresponding target screen corner can be continuously calculated based on the continuously updated position of the target corner.
[0103] In some implementations, if the estimated distance is less than or equal to the full-screen trigger threshold, it means that the distance between the target corner and the corresponding target screen corner is small, and it can be judged that the drag operation of the target corner meets the conditions for returning to the full screen, that is, the drag operation meets the full-screen switch back judgment conditions, and the small window can be controlled to switch to the full-screen state; correspondingly, when the estimated distance is greater than the full-screen trigger threshold, it can be judged that the drag operation of the target corner is to adjust the size of the small window. The embodiment of the present application can avoid the situation where the small window cannot meet the conditions for returning to the full screen when it is in the middle of the screen, so that the small window can meet the conditions for switching back to the full screen at any position, thereby improving the user experience.
[0104] In some implementations, during the tracking process, if the estimated distance is greater than the full-screen trigger threshold, the small window is resized and displayed according to the coordinate value until the drag operation is released, or the estimated distance is less than or equal to the full-screen trigger threshold and switches to the full-screen state.
[0105] That is to say, in the process of tracking the coordinate values of the drag operation, the estimated distance from the target corner of the drag operation to the target screen corner is obtained in real time. If the estimated distance is always greater than the full-screen trigger threshold, it is determined that the drag operation is only to adjust the size of the small window, and the small window is resized according to the coordinate values of the target corner of the drag operation, and displayed until the drag operation ends. It is understandable that if in the process of tracking the coordinate values of the drag operation, the estimated distance from the target corner of the drag operation to the target screen corner is less than or equal to the full-screen trigger threshold, the small window is switched to the full-screen state and displayed.
[0106] In an embodiment of the present application, a full-screen trigger threshold of a small window is obtained to assist in determining whether the small window can return to a full-screen state; the target position of the target corner is determined, and the target screen corner corresponding to the target corner is determined; the estimated distance between the target corner and the corresponding target screen corner under different target positions is calculated according to the coordinates of the target corner, the screen height, and the screen width. Trigonometric functions are used to increase the calculation speed, and the calculation of the estimated distance is relatively simple. Under different target positions, the estimated distance is adaptively obtained, and whether the drag operation meets the full-screen switching back judgment condition is determined according to the preset distance. The calculation cost is low and the accuracy is high.
[0107] Figure 3 A flowchart of another method for switching back to full screen of a small window provided in an embodiment of the present application is shown below. Figure 3 As shown, the method includes but is not limited to the following steps:
[0108] S301, detecting a drag operation, and determining whether the drag operation is within a hot zone of any corner of the small window.
[0109] In the embodiment of the present application, the implementation method of step S301 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.
[0110] S302: If the drag operation is in a hot zone of one of the target corners of the small window, determine a full screen switching back judgment condition of the target corner.
[0111] In the embodiment of the present application, the implementation method of step S302 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.
[0112] S303, obtaining a full-screen triggering threshold of the small window.
[0113] It is understandable that during the dragging process, the position of the dragging operation is constantly changing, so the coordinates of the dragging operation are tracked, that is, the coordinate values of the position of the dragging operation are obtained in real time.
[0114] S304, determining the target orientation of the target corner.
[0115] In the embodiment of the present application, the implementation method of step S304 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.
[0116] S305 , tracking the coordinate value of the drag operation, and determining the estimated distance from the target corner to the corresponding target screen corner based on the coordinate value and the target orientation.
[0117] In the embodiment of the present application, the implementation method of step S305 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.
[0118] S306: If the estimated tracking distance is less than or equal to the full-screen trigger threshold, control the small window to switch to the full-screen state.
[0119] In the embodiment of the present application, the implementation method of step S306 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.
[0120] In an embodiment of the present application, the position of the drag operation is obtained to determine whether it is within the coverage range of any corner of the small window. When it is within the coverage range of any corner, the full-screen trigger threshold of the small window is obtained, and the full-screen trigger threshold is determined by the minimum value between the screen width and the screen height to be suitable for switching full-screen operations on devices of different sizes; the estimated distance between the target corner and the corresponding target screen corner under different target orientations is calculated according to the coordinates of the target corner, the screen height and the screen width, and trigonometric functions are used to improve the calculation speed. When the estimated distance is less than or equal to the full-screen trigger threshold, the small window is controlled to switch to the full-screen state, with low calculation cost, so that the small window can be dragged at any position on the screen to return to the full-screen operation, thereby improving the user experience.
[0121] Figure 4 FIG. 1 is a schematic diagram of a structure of a device for switching back to full screen of a small window according to an embodiment of the present application. Figure 4 As shown, the full screen switching back device 400 of the small window includes:
[0122] The detection module 401 is used to detect the drag operation and determine whether the drag operation is within the hot zone of any corner of the small window;
[0123] The first acquisition module 402 is used to determine a full screen switching back determination condition of a target corner if the drag operation is in a hot zone of one of the target corners of the small window;
[0124] The control module 403 is used to control the small window to switch back to the full screen state if the drag operation meets the full screen switching back determination condition.
[0125] In some implementations, the control module 403 includes:
[0126] Get the full screen trigger threshold of the small window;
[0127] Determine the target orientation of the target corner;
[0128] Tracking the coordinate values of the drag operation, and determining the estimated distance from the target corner to the corresponding target screen corner based on the coordinate values and the target orientation;
[0129] If the estimated tracking distance is less than or equal to the full-screen trigger threshold, the small window is controlled to switch to the full-screen state.
[0130] In some implementations, the control module 403 includes:
[0131] If the target orientation indicates that the target corner is the left corner of the small window, a first difference between the screen height and the longitudinal coordinate value is obtained, and an estimated distance is determined based on the first difference and the transverse coordinate value.
[0132] In some implementations, the control module 403 includes:
[0133] If the target orientation indicates that the target corner is the right corner of the small window, obtain the second difference between the screen width and the horizontal coordinate value and the third difference between the screen height and the vertical coordinate value, and determine the estimated distance based on the second difference and the third difference.
[0134] In some implementations, the control module 403 includes:
[0135] Get the full screen trigger threshold of the small window based on the screen height and screen width.
[0136] In some implementations, the control module 403 includes:
[0137] Determine the minimum value from the screen height and screen width;
[0138] The minimum value is reduced based on the set value to obtain the full-screen trigger threshold of the small window.
[0139] In some implementations, the apparatus 400 further includes:
[0140] During the tracking process, if the estimated distance is greater than the full-screen trigger threshold, the small window is resized and displayed according to the coordinate value until the drag operation is released, or the estimated distance is less than or equal to the full-screen trigger threshold and switches to the full-screen state.
[0141] In the embodiment of the present application, by obtaining the position of the drag operation, it is determined whether it is in the hot zone of any corner of the small window. When it is in the hot zone of any corner, the full-screen switching back judgment condition corresponding to the target corner is determined, and whether the small window switches back to the full-screen state is controlled according to whether the drag operation satisfies the full-screen switching back judgment condition. The full-screen switching back judgment condition is adaptively determined for different target corners, so that different target corners have different judgment conditions, which can ensure that the full-screen switching back conditions can be met in different situations, solving the pain point that the small window cannot be triggered to return to the full screen when it is in the middle of the screen, making the interaction between the small window and the full screen more convenient, and improving the user experience.
[0142] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0143] like Figure 5As shown, the electronic device 500 includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a memory 506 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0144] The following components are connected to the I / O interface 505: a memory 506 including a hard disk, etc.; and a communication part 507 including a network interface card such as a LAN (Local Area Network) card, a modem, etc., and the communication part 507 performs communication processing via a network such as the Internet; a drive 508 is also connected to the I / O interface 505 as needed.
[0145] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 507. When the computer program is executed by the processor 501, the above-mentioned functions defined in the method of the present application are executed.
[0146] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by the processor 501 of the electronic device 500 to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0147] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0148] Figure 6 It is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 602. The memory 602 is used to store program codes, and the processor 601 is connected to the memory 602 to read the program codes from the memory 602 to implement the method for switching back to full screen of a small window in the above embodiment.
[0149] Optionally, the number of processors 601 may be one or more.
[0150] Optionally, the electronic device may further include an interface 603, and the number of the interface 603 may be multiple. The interface 603 may be connected to an application program and may receive data from an external device such as a sensor.
[0151] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0152] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for switching back to full screen of a small window, characterized in that: The method comprises: Detecting a drag operation and determining whether the drag operation is within a hot zone at any corner of the small window; If the drag operation is in a hot zone of one of the target corners of the small window, determining a full screen switching back determination condition of the target corner; If the dragging operation satisfies the full-screen switching back determination condition, the small window is controlled to switch back to the full-screen state.
2. The method according to claim 1, characterized in that If the drag operation satisfies the full-screen switching back determination condition, controlling the small window to switch back to the full-screen state includes: Obtaining a full-screen trigger threshold for the small window; determining a target orientation of the target corner; Tracking the coordinate values of the drag operation, and determining an estimated distance from the target corner to a corresponding target screen corner based on the coordinate values and the target orientation; If the estimated distance is tracked to be less than or equal to the full-screen trigger threshold, the small window is controlled to switch to the full-screen state.
3. The method according to claim 2, characterized in that The step of determining the estimated distance from the target corner to the corresponding target screen corner based on the coordinate value and the target orientation includes: If the target orientation indicates that the target corner is the left corner of the small window, a first difference between the screen height and the longitudinal coordinate value is obtained, and the estimated distance is determined based on the first difference and the transverse coordinate value.
4. The method according to claim 2, characterized in that: The step of determining the estimated distance from the target corner to the corresponding target screen corner based on the coordinate value and the target orientation includes: If the target orientation indicates that the target corner is the right corner of the small window, obtain the second difference between the screen width and the horizontal coordinate value and the third difference between the screen height and the vertical coordinate value, and determine the estimated distance based on the second difference and the third difference.
5. The method according to any one of claims 2 to 4, characterized in that: The obtaining of the full screen triggering threshold of the small window includes: Based on the screen height and the screen width, a full-screen trigger threshold of the small window is obtained.
6. The method according to claim 5, characterized in that The acquiring the full screen triggering threshold of the small window based on the screen height and the screen width includes: Determining a minimum value from the screen height and the screen width; The minimum value is reduced based on the set value to obtain the full-screen triggering threshold of the small window.
7. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: During the tracking process, if the estimated distance is greater than the full-screen trigger threshold, the small window is resized and displayed according to the coordinate value until the drag operation is released, or the estimated distance is less than or equal to the full-screen trigger threshold and switches to the full-screen state.
8. A device for switching back to full screen in a small window, characterized in that: include: A detection module, used to detect a drag operation and determine whether the drag operation is within a hot zone at any corner of the small window; A first acquisition module is used to determine a full screen switching back judgment condition of one of the target corners of the small window if the drag operation is in a hot zone of the target corner of the small window; The control module is used to control the small window to switch back to the full screen state if the drag operation meets the full screen switching back determination condition.
9. The device according to claim 8, characterized in that The control module comprises: Obtaining a full-screen trigger threshold for the small window; determining a target orientation of the target corner; Tracking the coordinate values of the drag operation, and determining an estimated distance from the target corner to a corresponding target screen corner based on the coordinate values and the target orientation; If the estimated distance is tracked to be less than or equal to the full-screen trigger threshold, the small window is controlled to switch to the full-screen state.
10. The device according to claim 9, characterized in that The control module comprises: If the target orientation indicates that the target corner is the left corner of the small window, a first difference between the screen height and the longitudinal coordinate value is obtained, and the estimated distance is determined based on the first difference and the transverse coordinate value.
11. The device according to claim 9, characterized in that The control module comprises: If the target orientation indicates that the target corner is the right corner of the small window, obtain the second difference between the screen width and the horizontal coordinate value and the third difference between the screen height and the vertical coordinate value, and determine the estimated distance based on the second difference and the third difference.
12. The device according to any one of claims 9 to 11, characterized in that The control module comprises: Based on the screen height and the screen width, a full-screen trigger threshold of the small window is obtained.
13. The device according to claim 12, characterized in that The control module comprises: Determining a minimum value from the screen height and the screen width; The minimum value is reduced based on the set value to obtain the full-screen triggering threshold of the small window.
14. The device according to any one of claims 9 to 11, characterized in that The device also includes: During the tracking process, if the estimated distance is greater than the full-screen trigger threshold, the small window is resized and displayed according to the coordinate value until the drag operation is released, or the estimated distance is less than or equal to the full-screen trigger threshold and switches to the full-screen state.
15. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 7.
17. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.