Interface display method and device, electronic equipment and storage medium
By determining the display position of the new floating window in the electronic device based on the position of the existing floating window, the problem of floating window occlusion is solved, and the display effect and user experience are improved.
Patent Information
- Application Number
- CN202410920068.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, when the number of floating windows is increased in electronic devices, the floating windows are prone to obstruction, which affects the display effect and user experience.
By determining the display position of the new floating window based on the display position of the existing floating windows when increasing the number of floating windows, it is ensured that they do not overlap, thereby avoiding obstruction.
It effectively avoids obstruction between floating windows, improves the display effect, meets user habits, and enhances the user experience of the floating window function.
Smart Images

Figure CN118939357A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and more specifically, to an interface display method, device, electronic device and storage medium. Background Art
[0002] With the rapid advancement of technology and living standards, electronic devices (such as smart phones, tablet computers, etc.) have become one of the commonly used electronic products in people's lives. At present, the application programs in electronic devices are becoming more and more abundant. In order to facilitate users to perform operations such as multitasking, task switching, resource retrieval, etc., floating window functions are provided for users to use. However, when the number of floating windows displayed by electronic devices is increased, the additional floating windows are easily blocked by the original floating windows, affecting the display effect of the floating windows. Summary of the invention
[0003] The present application proposes an interface display method, device, electronic device and storage medium, which can avoid occlusion between floating windows when increasing the number of floating windows displayed on the electronic device and improve the display effect of the floating windows.
[0004] In a first aspect, an embodiment of the present application provides an interface display method, the method comprising: displaying a first interface, the first interface including at least one first floating window; in response to a trigger operation for adding a new floating window, displaying a second interface, the second interface including the first floating window and at least one second floating window, the second display position of the second floating window in the second interface being determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap with each other.
[0005] In a second aspect, an embodiment of the present application provides an interface display device, comprising: a first interface display module and a second interface display module, wherein the first interface display module is used to display a first interface, the first interface including at least one first floating window; the second interface display module is used to display a second interface in response to a trigger operation for adding a new floating window, the second interface including the first floating window and at least one second floating window, the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap with each other.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the interface display method provided in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the interface display method provided in the first aspect above.
[0008] The solution provided by the present application is to display a first interface, which includes at least one first floating window, and display a second interface in response to a trigger operation for adding a new floating window, wherein the second interface includes a first floating window and at least one second floating window, and the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap each other. Thus, when the number of floating windows displayed on the electronic device is increased, occlusion between the floating windows can be avoided, the display effect of the floating windows can be improved, and the display position of the newly added floating window is determined by the display position of the previously displayed floating window, thereby reducing the impact on the display position of the previously displayed floating window and better meeting the user's usage habits. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A schematic flow chart of an interface display method according to an embodiment of the present application is shown.
[0011] Figure 2 A flow chart of an interface display method according to another embodiment of the present application is shown.
[0012] Figure 3 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0013] Figure 4 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0014] Figure 5 A flow chart of an interface display method according to yet another embodiment of the present application is shown.
[0015] Figure 6 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0016] Figure 7 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0017] Figure 8A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0018] Fig. 9 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0019] Fig.10 A flow chart of an interface display method according to another embodiment of the present application is shown.
[0020] Fig.11 A schematic flow chart of an interface display method according to yet another embodiment of the present application is shown.
[0021] Fig.12 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0022] Fig.13 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0023] Fig.14 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0024] Fig.15 A schematic diagram of an interface provided in an embodiment of the present application is shown.
[0025] Fig.16 A flow chart of an interface display method according to yet another embodiment of the present application is shown.
[0026] Fig.17 A block diagram of an interface display device according to an embodiment of the present application is shown.
[0027] Fig.18 It is a block diagram of an electronic device according to an embodiment of the present application for executing the interface display method according to an embodiment of the present application.
[0028] Fig.19 It is a storage unit of an embodiment of the present application for storing or carrying program codes for implementing the interface display method according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0030] With the advancement of science and technology and the continuous improvement of the configuration of electronic devices, more and more applications are installed in electronic devices. When using applications, users often need to switch between applications, especially when performing multitasking, task switching, resource retrieval and other operations, the operations required by users are relatively cumbersome. For example, when a user needs to use multiple applications at the same time, it is necessary to switch back and forth between the applications running in the foreground; for another example, when a user is using an application and needs to retrieve resources, multiple steps are required to complete the resource retrieval. Therefore, in order to improve the efficiency of users when using electronic devices, more and more electronic devices support the floating window function, which displays the application interface of the application in the floating window, allowing users to perform in-application operations through the floating window.
[0031] Moreover, when operations need to be performed back and forth between multiple applications, the electronic device can display multiple floating windows to respectively show the application interfaces of different applications, thereby facilitating users to operate different applications and realizing the multitasking, task switching, resource retrieval and other operations required by users.
[0032] In the related art, when an electronic device originally displays floating windows, if it is necessary to increase the number of new floating windows, when the electronic device adds and displays the new floating windows, the new floating windows will usually overlap with the originally displayed floating windows, thereby blocking some of the contents of the floating windows, thereby affecting the display effect of the floating windows and even affecting the user's normal use of the floating windows.
[0033] In response to the above problems, the inventors have proposed an interface display method, device, electronic device, and storage medium provided in the embodiments of the present application, which can avoid occlusion between floating windows when increasing the number of floating windows displayed on the electronic device, improve the display effect of the floating windows, and the display position of the newly added floating window is determined by the display position of the previously displayed floating window, thereby reducing the impact on the display position of the previously displayed floating window and better meeting the user's usage habits. The specific interface display method is described in detail in the subsequent embodiments.
[0034] The interface display method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0035] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of an interface display method provided by an embodiment of the present application. In a specific embodiment, the interface display method is applied to Fig.17 The interface display device 700 and the electronic device 100 ( Fig.18). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, an e-book, etc., which is not limited here. Figure 1 The process shown is described in detail, and the interface display method may specifically include the following steps:
[0036] Step S110: displaying a first interface, wherein the first interface includes at least one first floating window.
[0037] Among them, the floating window is also called a floating window. The floating window is a window that is displayed floatingly on the screen of an electronic device. The floating window is used to display the application interface of the running application. The application interface displayed in the floating window is a reduced application interface, which may include all interface elements in the application interface; or, the floating window displays the core interface elements in the application interface, which are pre-set by the application. For example, for navigation applications, the electronic device can proportionally reduce the navigation interface in the full-screen display state, so that the reduced navigation interface is displayed in the floating window; for playback applications, the electronic device can extract the playback time and playback controls in the playback interface and use them as core interface elements, so that the playback time and playback controls are only displayed in the floating window.
[0038] The floating window displayed by the electronic device may have a first display state and a second display state. In the first display state of the floating window, the floating window is in a reduced display state, and its display size is smaller than the first target size, and the application interface displayed in the floating window is in an inoperable state, that is, even if the electronic device detects a related touch operation on the application interface in the floating window, the electronic device will not respond to it; in the second display state of the floating window, the floating window is in an enlarged display state, and its display size is larger than the second target size, and the second target size is larger than the above first target size, and the application interface displayed in the floating window is in an operable state, that is, the floating window at this time responds to the in-application operation of the displayed application interface, for example, when the reading interface of a reading application is displayed in the floating window, the electronic device can respond to the sliding operation on the application interface in the floating window to control the text content in the reading interface to update, and for another example, when the playback interface of an audio playback application is displayed in the floating window, the electronic device can respond to the operation of the playback control control in the application interface in the floating window to control the audio playback. In addition, when the floating window is in the second display state, when the electronic device detects an adjustment operation for the display size of the floating window, it adjusts the display size of the floating window in response to the adjustment operation to meet the user's usage requirements for the floating window.
[0039] Optionally, the application corresponding to the floating window may be running in the foreground, so that the application interface displayed in the floating window may be the real-time application interface of the application. Foreground running refers to the state in which the electronic device displays the application interface of the application on the screen. When the application is running in the foreground, the user can see the application interface of the application on the screen; the background running, which is opposite to the foreground running, refers to the state in which the electronic device does not display the application interface of the application on the screen, and the user cannot interact with the application interface of the application, but the application will still occupy the system resources of the electronic device when it is running in the background.
[0040] In an embodiment of the present application, the electronic device may display a first interface including a first floating window, and the application corresponding to the first floating window in the first interface may not be limited. For example, the first floating window may correspond to a chat application, a memo, an audio playback application, etc. Corresponding to the application corresponding to the first floating window, the first floating window may include an application interface of the application corresponding to the first floating window. In addition, the number of first floating windows displayed in the first interface is at least one, that is, the first floating window may be one or more.
[0041] In an embodiment of the present application, the electronic device can detect an operation in the first interface, and when a move operation for the first floating window is detected, the electronic device can respond to the move operation and control the first floating window to move along the track of the move operation. That is, after the electronic device displays the floating window, the position of the floating window in the display interface can be adjusted according to the user's operation, so as to meet the user's usage habits.
[0042] In some embodiments, the above first floating window can be displayed on the upper layer of the system main interface of the electronic device, on the upper layer of the full-screen application interface, or on the upper layer of the split-screen application interface. That is to say, the first interface can be the system main interface, or it can be the application interface of an application running in the foreground of the electronic device, or it can be a split-screen application interface, but the first floating window is displayed in these interfaces and is in the upper layer.
[0043] Step S120: In response to a trigger operation for adding a new floating window, a second interface is displayed, wherein the second interface includes the first floating window and at least one second floating window, and a second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap with each other.
[0044] In an embodiment of the present application, after the electronic device displays the above first interface, it can detect a trigger operation for adding a floating window and, in response to the trigger operation, display a second interface, wherein the displayed second interface includes the above first floating window and at least one newly added second floating window, and the application corresponding to the second floating window is different from the application corresponding to the above first floating window, thereby realizing that after the electronic device originally displays the first floating window, a new second floating window is added and displayed. When the electronic device displays the above second interface with the newly added second floating window, the second display position of the second floating window is determined according to the display position of the first floating window in the first interface, that is, it is determined based on the display position of the originally displayed first floating window in the interface, and the determined position makes no overlap between the first floating window and the second floating window displayed in the second interface, thereby avoiding the newly added second floating window from blocking the originally displayed first floating window and improving the display effect of the floating window.
[0045] In addition, it is understandable that after the electronic device displays a floating window, the display position of the floating window can usually be adjusted according to the user's habits and needs. Therefore, the previous display position of the first floating window usually meets the user's usage habits and needs. Therefore, determining the display position of the newly added second floating window based on the display position of the first floating window in the first interface can reduce the impact on the display position of the previously displayed floating window, thereby better meeting the user's usage habits.
[0046] In the embodiment of the present application, the number of the newly added second floating windows is at least one, that is, the newly added second floating windows can be one or more. In the case where there are multiple newly added second floating windows, the user's need to add multiple floating windows at one time can be met.
[0047] In some embodiments, the application corresponding to the second floating window may be different from the application corresponding to the first floating window, thereby meeting the user's need to open floating windows for different applications; the application of the second floating window may also be the same as the first floating window, thereby meeting the user's need to open multiple floating windows for the same application.
[0048] In some embodiments, when the electronic device displays the second interface in response to a trigger operation for adding a new floating window, it can determine, based on the above first display position of the first floating window, positions in the display interface where the first floating window and the second floating window do not overlap with each other, and then display the above second interface based on the determined position.
[0049] In a possible implementation, the display position of the first floating window in the second interface may be the same as the display position of the first floating window in the first interface, and the display position of the first floating window in the second interface may also be at a distance less than a distance threshold from the display position of the first floating window in the first interface, for example, less than 15 pixels (px), 25px, etc. In this way, the display position of the first floating window in the second interface can remain unchanged or change slightly relative to the previous display position of the first floating window (i.e., the first display position above), thereby better meeting the user's usage habits of floating windows.
[0050] In some embodiments, when the electronic device detects a floating window opening operation for a target application in the first interface, it can determine that the above trigger operation for adding a new floating window has been detected, and display the second interface, and the second floating window in the displayed second interface corresponds to the above target application.
[0051] In a possible implementation, the electronic device may display the sidebar in the first interface in response to a call operation for the sidebar in the first interface, and display the above second interface in response to a floating window opening operation for a target application in the sidebar. The target application may be an application that is already running on the electronic device, or an application that is not running on the electronic device. In the case where the target application is an application that is not currently running on the electronic device, the electronic device may run the target application and display the above second interface.
[0052] Optionally, in the case where there are multiple second floating windows, the electronic device can display a second interface including the first floating window and multiple second floating windows upon detecting a selection operation for multiple applications in the sidebar and a floating window opening operation for the selected multiple applications, and the multiple second floating windows correspond one-to-one to the multiple applications.
[0053] In one possible implementation, when the electronic device detects a calling operation for a multitasking interface in the first interface, in response to the calling operation, the electronic device may display a multitasking interface, the multitasking interface including applications that are being run by the electronic device; when the electronic device detects a floating window opening operation for a target application that is being run by the electronic device in the multitasking interface, the electronic device may display the above second interface.
[0054] Of course, in the embodiment of the present application, the specific operation method for triggering the addition of a new floating window may not be limited. For example, the first interface displayed by the electronic device may be an application interface corresponding to the target application, and the target application is different from the application corresponding to the above first floating window. When a touch operation that meets the target touch condition is detected in the first interface, the above second interface is displayed.
[0055] The interface display method provided in the embodiment of the present application can avoid occlusion between floating windows when increasing the number of floating windows displayed on an electronic device, thereby improving the display effect of the floating windows, and the display position of the newly added floating window is determined by the display position of the previously displayed floating window, thereby reducing the impact on the display position of the previously displayed floating window, better meeting the user's usage habits, and improving the user experience when using the floating window function.
[0056] See also Figure 2 , Figure 2 A flow chart of an interface display method provided by another embodiment of the present application is shown. The interface display method is applied to the above electronic device. Figure 2 The process shown is described in detail, and the interface display method may specifically include the following steps:
[0057] Step S210: displaying a first interface, wherein the first interface includes at least one first floating window.
[0058] In the embodiment of the present application, step S210 can refer to the contents of other embodiments and will not be repeated here.
[0059] Step S220: In response to a triggering operation for adding a floating window, based on the first display position, determining the second display position corresponding to a second floating window to be displayed.
[0060] In an embodiment of the present application, when the electronic device detects a trigger operation for adding a new floating window, when displaying the second interface, it can first determine the display position corresponding to the second floating window to be displayed based on the first display position of the first floating window in the first interface (that is, the original display position of the first floating window in the display interface), and use the determined display position as the second display position.
[0061] In some embodiments, the electronic device can determine a second display position of a newly added second floating window that does not overlap with the first floating window when displayed while keeping the first display position of the first floating window unchanged. That is, the second display position can be determined based on the first display position in the display interface. In this way, when the second interface is displayed, the display position of the first floating window can be kept unchanged, thereby better meeting the user's usage habits.
[0062] In a possible implementation, the electronic device may determine, based on the first display position of the first floating window and in accordance with the size to be displayed of the second floating window, a display position that can fully display the second floating window in an interface area other than the area where the first floating window is located, as the second display position.
[0063] Of course, in the embodiment of the present application, the specific manner in which the electronic device determines the display position of the newly added second floating window based on the display position of the first floating window is not limited.
[0064] Step S230: Based on the first display position and the second display position, display a second interface, wherein the second interface includes the first floating window and at least one second floating window, the position of the first floating window in the second interface remains at the first display position, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap each other.
[0065] In an embodiment of the present application, after determining the second display position corresponding to the second floating window to be displayed, the second interface can be displayed based on the first display position and the second display position, and when displaying the second interface, the display position of the first floating window is kept unchanged, that is, the first floating window is also in the first display position in the second interface, and the second floating window is in the second display position in the second interface that does not overlap with the first floating window, so that the newly added second floating window can be displayed without changing the original display position of the first floating window, and the second floating window will not block the first floating window, thereby improving the display effect of the floating window; and since the display position of the floating window can usually be adjusted by the user, the previous display position of the first floating window is usually the position that the user is accustomed to, so the display position of the first floating window is kept unchanged by the above method, and the user's usage habits of the floating window can be better met.
[0066] For example, please also refer to Figure 3 and Figure 4 , the number of the first floating window and the number of the second floating window are both 1, Figure 3 The interface schematic diagram of the first interface A1 including the first floating window A2 is shown. When a second floating window needs to be added for display, through the interface display method provided in the embodiment of the present application, after determining the second display position corresponding to the second floating window based on the position of the first floating window A2 in the first interface A1, the displayed second interface A3 can be as follows Figure 4 As shown, in Figure 4 In the interface schematic diagram of the second interface A3 shown, the position of the first floating window A2 in the second interface A3 remains unchanged relative to the position of the first floating window A2 in the first interface A1, and the second floating window A4 in the second interface A3 does not overlap with the first floating window A2, thereby avoiding obstruction between the floating windows and satisfying the user's usage habits of the floating windows.
[0067] The interface display method provided in the embodiment of the present application can, when adding a floating window displayed on an electronic device, ensure that there is no overlap between the newly added floating window and the previously displayed floating window, thereby avoiding occlusion between the floating windows and improving the display effect of the floating window; in addition, the display position of the newly added floating window is determined by the display position of the previously displayed floating window, and when the newly added floating window is displayed, the display position of the previously displayed floating window remains unchanged, thereby better meeting the user's usage habits of floating windows.
[0068] See also Figure 5 , Figure 5 A flow chart of an interface display method provided by another embodiment of the present application is shown. The interface display method is applied to the above electronic device. Figure 5 The process shown is described in detail, and the interface display method may specifically include the following steps:
[0069] Step S310: displaying a first interface, wherein the first interface includes at least one first floating window.
[0070] In the embodiment of the present application, step S310 can refer to the contents of other embodiments and will not be repeated here.
[0071] Step S320: In response to a triggering operation for adding a new floating window, based on the first display position, determining a first distance between the top of the first floating window and the status bar in the first interface.
[0072] In an embodiment of the present application, when the electronic device determines the second display position corresponding to the second floating window to be displayed based on the first display position of the first floating window in the first interface, it can determine the first distance between the top of the first floating window and the status bar in the first interface, so as to determine whether the newly added second floating window can be fully displayed in the area between the first floating window and the status bar according to the first distance. The status bar refers to the area at the top of the display interface for displaying information such as the operator, network, time, and power.
[0073] In some embodiments, the electronic device can determine the position coordinates of the top of the first floating window and the position coordinates of the bottom of the status bar through rendering data corresponding to the first interface, and then determine the above first distance based on the position coordinates of the top of the first floating window and the position coordinates of the bottom of the status bar.
[0074] In some embodiments, the electronic device can obtain an interface image of the first interface, for example, can obtain an interface screenshot of the first interface, and then identify the locations of the first floating window and the status bar in the interface image, and determine the above first distance based on the identified locations.
[0075] Of course, the specific manner in which the electronic device determines the first distance between the top of the first floating window and the status bar is not limited.
[0076] In some embodiments, when the number of first floating windows is one, the first distance between the top of the first floating window and the status bar can be directly determined; when the number of first floating windows is multiple, the first floating window closest to the status bar can be determined first, and then the first distance between the top of the first floating window and the status bar can be determined.
[0077] Step S330: Based on the first distance, determine the second display position corresponding to the second floating window to be displayed.
[0078] In an embodiment of the present application, after determining the above first distance, it can be determined based on the first distance whether the newly added second floating window can be fully displayed in the area between the first floating window and the status bar, and based on the determination result, the second display position corresponding to the second floating window to be displayed can be determined.
[0079] In some embodiments, when the number of second floating windows is 1, the above first distance can be compared with the target height of the second floating window to be displayed; according to the comparison result, if the first distance is greater than the target height of the second floating window to be displayed, it means that the second floating window can be fully displayed in the area between the first floating window and the status bar, so it can be determined that the second display position corresponding to the second floating window is above the first display position, and does not overlap with the above first floating window; according to the comparison result, if the above first distance is less than or equal to the target height of the second floating window to be displayed, it means that the second floating window cannot be fully displayed in the area between the first floating window and the status bar, so it can be determined that the second display position corresponding to the second floating window is below the first display position, and does not overlap with the above first floating window. In this way, it can be achieved that as long as the area between the first floating window and the status bar can fully display the second floating window, the newly added floating window is located above the above first floating window, so that the newly added floating window is closer to the top of the display interface, which is more in line with the user's usage habits.
[0080] In a possible implementation, the distance between the second display position and the first display position may be smaller than the first distance. For example, the first distance may be 20px, 25px, etc., so that after the second interface is subsequently displayed according to the first display position and the second display position, the first floating window and the second floating window in the second interface are closer to each other, so that the distribution of the floating windows viewed by the user is more compact, thereby improving the display effect of the floating windows.
[0081] In a possible implementation, the second display position may be located directly below the first display position, that is, the second display position and the first display position have the same position coordinates in the row direction. In this way, after the second interface is displayed, the first floating window and the second floating window may be aligned in the column direction, thereby better conforming to the user's visual habits and improving the display effect of the floating window.
[0082] For example, please refer again to Figure 3 and Figure 4 , the number of the first floating window and the second floating window are both 1. Figure 3 In the case where the distance between the first floating window A2 and the status bar in the first interface A1 shown is less than the target height of the second floating window, through the above implementation, the second display position of the second floating window can be determined to be located directly below the first display position and not overlapped with the first floating window A2, so that the electronic device can display the second floating window at the same time. Figure 4 After the second interface A3 is shown, the second floating window A4 may be located directly below the first floating window A2 without overlapping with the first floating window A2.
[0083] For example, see Figure 6 and Figure 7 , the number of the first floating window and the second floating window are both 1. Figure 6 In the case where the distance between the first floating window A2 and the status bar in the first interface A1 shown is greater than or equal to the target height of the second floating window, through the above implementation, the second display position of the second floating window can be determined to be located directly above the first display position and not overlapped with the first floating window A2, so that the electronic device can display the second floating window at the same time. Figure 7 After the second interface A3 is shown, the second floating window A4 may be located directly above the first floating window A2 without overlapping with the first floating window A2.
[0084] In a possible implementation, taking into account that the second floating window cannot be fully displayed in the area between the first floating window and the status bar, the second floating window may not be fully displayed in the area between the bottom of the first floating window and the bottom of the first interface due to the higher target height of the second floating window. Therefore, when the above first distance is less than or equal to the above target height, the electronic device may also determine the second distance between the bottom of the first floating window and the bottom of the first interface; then, compare the second distance with the above target height; according to the comparison result, if the second distance is greater than or equal to the target height, it means that the area between the bottom of the first floating window and the bottom of the first interface can fully display the second floating window, so the second display position can be determined as a position below the first display position and does not overlap with the above first floating window.
[0085] Optionally, after comparing the above second distance with the above target height, according to the comparison result, if the second distance is less than the above target height, it means that the area between the bottom of the first floating window and the bottom of the first interface cannot fully display the second floating window. In this case, the first display position can be updated to a third display position located above the first display position, that is, the display position of the first floating window is updated to the third display position, the third distance between the third display position and the first display position is less than the target distance threshold, and the sum of the second distance and the third distance is greater than or equal to the above target height, so that the area between the display position of the first floating window and the bottom of the display interface can fully display the above second floating window, so the second display position can be determined as a position below the third display position and not overlapping with the first floating window; after the display position of the first floating window is updated to the above third display position and the above second display position is determined, the second interface can be displayed based on the third display position and the second display position, the first floating window is located at the third display position in the second interface, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap with each other. Among them, the above target distance threshold can be 30px, 40px, etc. Through the above implementation, not only can the newly added second floating window not overlap with the first floating window, but also because the distance between the display position of the first floating window (i.e., the third display position) and the previous display position (i.e., the first display position) is less than the target distance threshold, the first floating window will not change too much relative to the previous display position, thereby satisfying the user's usage habits of floating windows.
[0086] In addition, if the second distance is smaller than the target height, and the first distance is exactly equal to the target height, it means that the second floating window cannot be fully displayed in the area below the first display position, while the second floating window can be fully displayed in the area above the first display position. Therefore, the second display position can be determined as a position above the first display position and does not overlap with the first floating window.
[0087] For example, see Figure 8 and Fig. 9 , the number of the first floating window and the second floating window are both 1. Figure 8 In the case where the distance between the first floating window A2 and the status bar in the first interface A1 shown is smaller than the target height of the second floating window, and the distance between the bottom of the first floating window A2 and the bottom of the first interface A1 is smaller than the target height of the second floating window, the display position of the first floating window A2 can be updated through the above implementation, and the second display position of the second floating window can be determined to be located below the updated display position of the first floating window A2 and not overlapped with the first floating window A2, so that the electronic device can display the second floating window A2. Figure 7After the second interface A3 is shown, the display position of the first floating window A2 will not change too much, and the second floating window A4 will not overlap with the first floating window A2.
[0088] Optionally, after comparing the above second distance with the above target height, according to the comparison result, if the second distance is smaller than the above target height, it means that the area between the bottom of the first floating window and the bottom of the first interface cannot fully display the second floating window. In this case, the second display position can also be determined as the position on the first side or the second side of the first display position in the row direction, that is, the position on the left or right side of the first display position when the user views the screen; then based on the first display position and the second display position, the second interface is displayed, and the first floating window in the displayed second interface is located at the above first display position, and the second floating window is located at the second display position, thereby achieving the display of the newly added first floating window while keeping the display position of the first floating window unchanged.
[0089] In some embodiments, when there are multiple second floating windows, the electronic device can obtain the ratio between the above first distance and the target height of a single second floating window; if the ratio is greater than or equal to 1, the integer part of the ratio can be determined as the first number of second floating windows that can be fully displayed in the area between the first floating window and the status bar, and the second display positions corresponding to the first number of second floating windows are determined to be above the first display position and not overlapped with the first floating window; if the total number of second floating windows is greater than the first number, the second display positions corresponding to each second floating window except the first number of all second floating windows can be determined to be below the first display position and not overlapped with the first floating window; if the ratio is less than 1, it means that any second floating window cannot be fully displayed in the area between the first floating window and the status bar, so the second display positions corresponding to each second floating window can be determined to be below the first display position and not overlapped with the first floating window. It should be noted that in the above embodiments, the second display positions corresponding to all second floating windows meet the requirement that each second floating window displayed subsequently does not overlap with each other.
[0090] In a possible implementation, when the second display positions corresponding to some or all of the above second floating windows are located below the first display position, if the distance between the bottom of the first floating window and the bottom of the first interface is less than the sum of the target heights of all second floating windows located below the first display position, the second display positions corresponding to some of the second floating windows can be determined as positions on the first side or second side of the first display position, that is, positions on the left or right side of the first display position when the user views the screen, so as to ensure that all floating windows in the second interface do not overlap with each other.
[0091] Step S340: Based on the first display position and the second display position, display a second interface, wherein the second interface includes the first floating window and at least one second floating window, the position of the first floating window in the second interface remains at the first display position, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap each other.
[0092] In the embodiment of the present application, step S340 can refer to the content of the previous embodiment and will not be repeated here.
[0093] The interface display method provided in the embodiment of the present application can increase the number of floating windows displayed on the electronic device without overlapping the newly added floating windows and the previously displayed floating windows, thereby avoiding occlusion between the floating windows and improving the display effect of the floating windows; and when displaying a newly added floating window, the display position of the previously displayed floating window remains unchanged, thereby better meeting the user's usage habits of floating windows; in addition, the display position of the newly added floating window is determined according to the distance between the top of the previously displayed floating window and the status bar, so that the newly added floating window can be displayed above the previously displayed floating window as much as possible, so that the newly added floating window is closer to the top of the display interface, and thus is more in line with the user's usage habits.
[0094] See also Fig.10 , Fig.10 A flow chart of an interface display method provided by another embodiment of the present application is shown. The interface display method is applied to the above electronic device. Fig.10 The process shown is described in detail, and the interface display method may specifically include the following steps:
[0095] Step S410: displaying a first interface, wherein the first interface includes at least one first floating window.
[0096] In the embodiment of the present application, step S410 can refer to the contents of other embodiments and will not be repeated here.
[0097] Step S420: In response to the trigger operation, based on the first display position, determine a fourth distance between an edge of the first side of the first floating window and an edge of the first side of the first interface.
[0098] Step S430: determining the second display position based on the fourth distance.
[0099] Step S440: Based on the first display position and the second display position, display a second interface, wherein the second interface includes the first floating window and at least one second floating window, the position of the first floating window in the second interface remains at the first display position, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap each other.
[0100] In the embodiment of the present application, different from the above-mentioned embodiment, in the embodiment of the present application, when determining the second display position corresponding to the second floating window, the fourth distance between the edge of the first side of the first floating window and the edge of the first side of the first interface is used, that is, based on the fourth distance, it is determined whether the second floating window can be completely displayed on the first side of the first floating window, and the second display position corresponding to the second floating window is determined according to the determination result. The first side is one of the sides in the row direction, that is, the left side or the right side when the user views the screen.
[0101] In some embodiments, when the number of second floating windows is 1, the fourth distance can be compared with the target width of the second floating window to be displayed; according to the comparison result, if the fourth distance is greater than the target width of the second floating window to be displayed, it means that the second floating window can be fully displayed in the area on the first side of the first floating window, so it can be determined that the second display position corresponding to the second floating window is located on the first side of the first display position, and does not overlap with the first floating window; according to the comparison result, if the fourth distance is less than or equal to the target width of the second floating window to be displayed, it means that the second floating window cannot be fully displayed in the area on the first side of the first floating window, so it can be determined that the second display position corresponding to the second floating window is located on the second side of the first display position, and does not overlap with the first floating window.
[0102] In a possible implementation, when the above fourth distance is less than or equal to the above target width, the electronic device may also determine a fifth distance between the second side of the first floating window and the second side of the first interface; then, compare the fifth distance with the above target width; according to the comparison result, if the fifth distance is greater than or equal to the target width, it means that the area on the second side of the first floating window can fully display the second floating window, so it can be determined that the second display position is located on the second side of the first display position and does not overlap with the above first floating window.
[0103] Optionally, after comparing the fifth distance with the target width, according to the comparison result, if the fifth distance is less than the target width, it means that the second floating window cannot be fully displayed in the area on the second side of the first floating window. In this case, the first display position can be updated to the fourth display position located on the first side of the first display position, that is, the display position of the first floating window is updated to the fourth display position, the sixth distance between the fourth display position and the first display position is less than the target distance threshold, and the sum of the fifth distance and the sixth distance is greater than or equal to the target width, so that the area on the second side of the display position of the first floating window can fully display the second floating window, so the second display position can be determined as a position located on the second side of the fourth display position and not overlapping with the first floating window; after updating the display position of the first floating window to the fourth display position and determining the second display position, the second interface can be displayed based on the fourth display position and the second display position, the first floating window is located at the fourth display position in the second interface, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap each other. Among them, the target distance threshold can be 30px, 40px, etc.
[0104] In addition, if the fifth distance above is smaller than the target height above, and the fourth distance above is exactly equal to the target width above, it means that the second floating window cannot be fully displayed in the area on the second side of the first display position, while the second floating window can be fully displayed in the area on the first side of the first display position. Therefore, the second display position can be determined as a position located on the first side of the first display position and does not overlap with the first floating window.
[0105] The interface display method provided in the embodiment of the present application can increase the number of floating windows displayed on an electronic device without overlapping the newly added floating windows and the previously displayed floating windows, thereby avoiding occlusion between the floating windows and improving the display effect of the floating windows; and when displaying a newly added floating window, the display position of the previously displayed floating window remains unchanged, thereby better meeting the user's usage habits of floating windows.
[0106] See also Fig.11 , Fig.11 A flow chart of an interface display method provided by another embodiment of the present application is shown. The interface display method is applied to the above electronic device. Fig.11 The process shown is described in detail, and the interface display method may specifically include the following steps:
[0107] Step S510: Display a third interface, where the third interface is an application interface corresponding to the first application.
[0108] Step S520: In response to a second trigger operation in the target area of the third interface, a fourth interface is displayed, wherein the fourth interface includes a first floating window, the number of the first floating window is 1, and the first floating window is a floating window corresponding to a first application.
[0109] Step S530: In response to the running operation of the second application in the fourth interface, the second application is run in the foreground and the first interface is displayed, the first interface is the application interface corresponding to the second application, and the first interface includes the first floating window.
[0110] Step S540: In response to a first trigger operation within the target area in the first interface, a second interface is displayed, wherein the second interface includes the first floating window and at least one second floating window, the number of the second floating windows is 1, the second floating window is a floating window corresponding to a second application, and the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap with each other.
[0111] In the embodiment of the present application, the first interface in the aforementioned embodiment may be an application interface corresponding to the second application, and the second application may be an application corresponding to the second floating window added later, that is, the first floating window is displayed in a stacked manner in the application interface corresponding to the second application. Prior to this, the electronic device may display a third interface, and the third interface may be an application interface corresponding to the second application, and the second application is the application corresponding to the first floating window in the aforementioned embodiment; when the electronic device detects a second trigger operation in the target area in the third interface, the fourth interface may display a fourth interface, and the fourth interface includes a first floating window corresponding to the first application; then the electronic device may respond to the operation of the second application in the fourth interface, run the second application in the foreground and display the first interface.
[0112] When the electronic device displays the application interface corresponding to the second application (i.e., the first interface above) and displays the first floating window corresponding to the first application, when the first trigger operation in the target area in the first interface is detected, the second interface can be displayed in response to the first trigger operation, and the second interface includes the first floating window above and the newly added floating window corresponding to the first application. That is to say, when the electronic device needs to newly display the floating window corresponding to the currently displayed application interface, the method of triggering the newly added floating window corresponding to the application interface can be the trigger operation in the target area in the application interface. Similarly, the operation of triggering the electronic device to display the first floating window above is also the trigger operation in the target area in the application interface corresponding to the first application, so that the electronic device can trigger the previously displayed floating window and the newly displayed floating window by the trigger operation in the target area in the application interface corresponding to the floating window. In the related art, when a new floating window needs to be added when a floating window is displayed, it is usually necessary to call out the sidebar and the multi-task interface, and then perform the corresponding operation to trigger the newly added corresponding floating window. Through the interface display method provided in the embodiment of the present application, the newly added floating window of the application interface can be directly triggered according to the trigger operation in the target area in the displayed application interface, thereby reducing user operations.
[0113] In some embodiments, the target area may be the middle area of the bottom position in the display interface, or the first side area or the second side area of the bottom position in the display interface, and the specific position of the target area may not be limited.
[0114] In some embodiments, the first trigger operation and the second trigger operation may be sliding operations in the target area that meet the target sliding conditions. The target sliding conditions may include the sliding direction being the target sliding direction and the sliding distance being greater than the target sliding distance. For example, the target sliding direction may be the vertical upward direction, and the target sliding distance may be 25px, 40px, 50px, etc.
[0115] The interface display method provided by this application is further described below by taking examples.
[0116] For example, see Fig.12 , the electronic device can display a third interface A5, the third interface is the application interface corresponding to the second application; please refer to Fig.13 When the electronic device detects a vertical upward sliding operation in the target area of the third interface A5, the third interface A5 can be displayed as a first transition interface A6 of the floating window. When the sliding operation is detected to be over, the electronic device can display Fig.14 The fourth interface A7 shown is the main interface, and the fourth interface A7 includes the first floating window A2; please refer to Figure 3When a running operation for the first application is detected in the fourth interface A7, the first application can be run in the foreground and the first interface A1 can be displayed in response to the running operation. The first interface A1 is an application interface corresponding to the first application, and the first interface A1 includes a first floating window A2; please refer to Fig.15 When the electronic device detects a vertical upward sliding operation in the target area of the first interface A1, the electronic device can display the second transition interface A8 of the first interface A1 switching to a floating window, and when the sliding operation is detected to be finished, the electronic device can display Figure 4 The second interface A3 shown includes the first floating window A2 and a second floating window A4 corresponding to the first application.
[0117] The interface display method provided in the embodiment of the present application can avoid occlusion between floating windows when the number of floating windows displayed on an electronic device is increased, thereby improving the display effect of the floating windows, and the display position of the newly added floating window is determined by the display position of the previously displayed floating window, thereby reducing the impact on the display position of the previously displayed floating window, better meeting the user's usage habits, and improving the user's experience when using the floating window function; in addition, when a new floating window is added when a floating window is already displayed, the newly added floating window of the application interface can be directly triggered according to the trigger operation in the target area of the displayed application interface, and the operation of triggering the electronic device to display the newly added floating window is the same as the trigger operation of triggering the display of the previously displayed floating window, thereby reducing user operations and improving the user's experience.
[0118] See also Fig.16 , Fig.16 A flow chart of an interface display method provided by yet another embodiment of the present application is shown. The interface display method is applied to the above electronic device. Fig.16 The process shown is described in detail, and the interface display method may specifically include the following steps:
[0119] Step S610: displaying a first interface, wherein the first interface includes at least one first floating window.
[0120] In the embodiment of the present application, step S610 can refer to the contents of the aforementioned embodiment and will not be described again here.
[0121] Step S620: In response to a trigger operation for adding a new floating window, a second interface is displayed, wherein the second interface includes the first floating window and at least one second floating window, the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap with each other, the display size of the first floating window and the second floating window is the first display size, and the proportion of the first floating window and the second floating window in the second interface is less than the target ratio.
[0122] In an embodiment of the present application, when the electronic device displays the above second interface in response to the above trigger operation, in the second interface displayed by the electronic device, the display size of the first floating window and the second floating window is the first display size, and the proportion of the first floating window and the second floating window in the second interface is less than the target proportion. Among them, the target proportion can be 30%, 40%, 50%, etc. In this way, the proportion of the first floating window and the second floating window in the second interface will not be too large, so as to avoid the displayed floating window affecting the user's viewing or operation of other content in the second interface except the floating window.
[0123] Step S630: In response to a third trigger operation on the first floating window and the target floating window in the second floating window, a fifth interface is displayed, wherein the fifth interface includes the target floating window having a second display size and other floating windows having a third display size, wherein the second display size is larger than the first display size, the third display size is smaller than the first display size, the other floating windows are the first floating window and the second floating window other than the target floating window, and the proportion of all floating windows in the fifth interface in the fifth interface is smaller than the target proportion.
[0124] In an embodiment of the present application, after the electronic device displays the second interface above, if a third trigger operation for the target floating window is detected, such as a click operation, a drag operation on the corner of the target floating window, etc., the fifth interface can be displayed. The fifth interface also includes the first floating window and the second floating window, except that the display size of the target floating window in the first floating window and the second floating window is changed to the second display size, and the other floating windows in the first floating window and the second floating window except the target floating window are changed to the third display size. In addition, the second display size is larger than the first display size above, and the third display size is smaller than the first display size above, so that the user can control the display size of the target floating window to be larger by performing the third trigger operation on the target floating window of the first display size displayed, so as to meet the user's operation requirements for the content in the target floating window. In addition, while increasing the display size of the target floating window, the display size of the other floating windows above is reduced, so that the proportion of all floating windows in the fifth interface in the fifth interface is still less than the target proportion, thereby avoiding the displayed floating window affecting the user's viewing or operation of other contents in the fifth interface except the floating window.
[0125] In some embodiments, the electronic device can determine a first proportion of all floating windows in the interface after the target floating window is increased to the second display size; then, obtain the difference between the first proportion and the target proportion; then, based on the difference, determine the second proportion that needs to be reduced for the other floating windows; based on the second proportion and the number of other floating windows, determine a third proportion that needs to be reduced for each of the other floating windows; based on the third proportion and the fourth proportion of the floating window in the interface when the floating window is the first display size, determine the third display size; finally, based on the second display size and the third display size, display the fifth interface.
[0126] The interface display method provided in the embodiment of the present application can avoid occlusion between floating windows when the number of floating windows displayed on the electronic device is increased, thereby improving the display effect of the floating windows, and the display position of the newly added floating window is determined by the display position of the previously displayed floating window, thereby reducing the impact on the display position of the previously displayed floating window, better meeting the user's usage habits, and improving the user's experience when using the floating window function; in addition, the proportion of all floating windows in the displayed interface in the interface is less than the target proportion, and after increasing the display size of any floating window, the display size of other floating windows is simultaneously reduced, and the proportion of all floating windows in the interface in the interface is always kept less than the target proportion, thereby better avoiding the displayed floating window affecting the user's viewing or operation of other content in the fifth interface except the floating window, thereby improving the user's experience of using the electronic device.
[0127] See also Fig.17 , which shows a structural block diagram of an interface display device 700 provided in an embodiment of the present application. The interface display device 700 applies the above-mentioned electronic device, and the interface display device 700 includes: a first interface display module 710 and a second interface display module 720. Among them, the first interface display module 710 is used to display a first interface, and the first interface includes at least one first floating window; the second interface display module 720 is used to respond to a trigger operation for adding a floating window, and display a second interface, and the second interface includes the first floating window and at least one second floating window, and the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap each other.
[0128] In some embodiments, the second interface display module 720 can be specifically used to: in response to the trigger operation, determine the second display position corresponding to the second floating window to be displayed based on the first display position; based on the first display position and the second display position, display the second interface, wherein the position of the first floating window in the second interface remains at the first display position, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap each other.
[0129] In a possible implementation, the second interface display module 720 can also be used to: in response to the trigger operation, determine, based on the first display position, a first distance between the top of the first floating window and the status bar in the first interface; and determine, based on the first distance, the second display position.
[0130] Optionally, the number of second floating windows is 1, and the second interface display module 720 can also be used to: if the first distance is greater than the target height of the second floating window to be displayed, determine the second display position to be above the first display position and not overlapping with the first floating window; if the first distance is less than or equal to the target height, determine the second display position to be below the first display position and not overlapping with the first floating window.
[0131] Optionally, the second interface display module 720 can also be used to: if the first distance is less than or equal to the target height, determine the second distance between the bottom of the first floating window and the bottom of the first interface; if the second distance is greater than or equal to the target height, determine the second display position to be below the first display position and not overlapping with the first floating window.
[0132] Optionally, the second interface display module 720 can also be used to, after determining that the bottom of the first floating window is at a second distance from the bottom of the first interface, if the second distance is less than the target height, update the first display position to a third display position, and determine the second display position to be a position below the third display position and not overlapping with the first floating window, wherein the third display position is above the first display position, a third distance between the third display position and the first display position is less than a target distance threshold, and the sum of the second distance and the third distance is greater than or equal to the target height; based on the third display position and the second display position, display the second interface, wherein the first floating window is located at the third display position in the second interface, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap with each other.
[0133] In a possible implementation, the second interface display module 720 can also be used to: in response to the trigger operation, determine, based on the first display position, a fourth distance between the edge of the first side of the first floating window and the edge of the first side of the first interface; and determine the second display position based on the fourth distance.
[0134] In some embodiments, the number of the first floating windows is 1, the first floating window is a floating window corresponding to the first application, the number of the second floating windows is 1, the second floating window is a floating window corresponding to the second application, and the first interface is an application interface corresponding to the second application. The interface display device 700 may also include a third interface display module and a fourth interface display module. The third interface display module is used to display a third interface before displaying the first interface, and the third interface is an application interface corresponding to the first application; the fourth interface display module is used to display a fourth interface in response to a second trigger operation in a target area in the third interface, and the fourth interface includes the first floating window. The first interface display module 710 can be specifically used to: in response to the running operation for the second application in the fourth interface, run the second application in the foreground and display the first interface. The second interface display module 720 can be specifically used to: in response to the first trigger operation in the target area in the first interface, display the second interface.
[0135] In some embodiments, the display size of the first floating window and the second floating window is a first display size, and the proportion of the first floating window and the second floating window in the second interface is smaller than a target proportion.
[0136] In a possible implementation, the interface display device 700 may further include a fifth interface display module. The fifth interface display module may be used to display a fifth interface in response to a third trigger operation for the first floating window and a target floating window in the second floating window after the second interface is displayed in response to the trigger operation for adding a floating window, wherein the fifth interface includes the target floating window with a display size of the second display size and other floating windows with a display size of the third display size, the second display size is larger than the first display size, the third display size is smaller than the first display size, the other floating windows are the first floating window and the second floating window except the target floating window, and the proportion of all floating windows in the fifth interface in the fifth interface is less than the target proportion.
[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0138] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0139] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0140] In summary, the solution provided by the present application displays a first interface, the first interface includes at least one first floating window, and in response to a trigger operation for adding a new floating window, displays a second interface, the second interface includes a first floating window and at least one second floating window, and the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap each other. As a result, when the number of floating windows displayed on the electronic device is increased, occlusion between the floating windows can be avoided, the display effect of the floating windows can be improved, and the display position of the newly added floating window is determined by the display position of the previously displayed floating window, thereby reducing the impact on the display position of the previously displayed floating window and better meeting the user's usage habits.
[0141] Please refer to Fig.18 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, a smart watch, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, a display screen 130, and one or more applications, wherein one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0142] The processor 110 uses various interfaces and lines to connect various parts within the entire electronic device 100, and performs various functions of the electronic device 100 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120.
[0143] The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.
[0144] The display screen 130 is a display component for displaying images and is usually disposed on the front panel of the electronic device 100 .
[0145] Please refer to Fig.19 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0146] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An interface display method, characterized in that: The method comprises: Displaying a first interface, wherein the first interface includes at least one first floating window; In response to a trigger operation for adding a new floating window, a second interface is displayed, wherein the second interface includes the first floating window and at least one second floating window, and the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap with each other.
2. The method according to claim 1, characterized in that: The displaying of the second interface in response to the triggering operation for adding a floating window includes: In response to the triggering operation, determining, based on the first display position, the second display position corresponding to the second floating window to be displayed; Based on the first display position and the second display position, the second interface is displayed, wherein the position of the first floating window in the second interface remains at the first display position, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap each other.
3. The method according to claim 2, characterized in that The determining, in response to the triggering operation, based on the first display position, the second display position corresponding to the second floating window to be displayed includes: In response to the triggering operation, determining a first distance between the top of the first floating window and a status bar in the first interface based on the first display position; Based on the first distance, the second display position is determined.
4. The method according to claim 3, characterized in that The number of the second floating windows is 1, and determining the second display position based on the first distance includes: If the first distance is greater than the target height of the second floating window to be displayed, determining that the second display position is located above the first display position and does not overlap with the first floating window; If the first distance is less than or equal to the target height, the second display position is determined to be a position below the first display position and not overlapping with the first floating window.
5. The method according to claim 4, characterized in that If the first distance is less than or equal to the target height, determining the second display position to be a position below the first display position and not overlapping with the first floating window includes: If the first distance is less than or equal to the target height, determining a second distance between the bottom of the first floating window and the bottom of the first interface; If the second distance is greater than or equal to the target height, the second display position is determined to be a position below the first display position and not overlapping with the first floating window.
6. The method according to claim 5, characterized in that If the first distance is less than or equal to the target height, after determining a second distance between the bottom of the first floating window and the bottom of the first interface, the method further includes: If the second distance is less than the target height, updating the first display position to a third display position, and determining that the second display position is a position below the third display position and does not overlap with the first floating window, wherein the third display position is above the first display position, a third distance between the third display position and the first display position is less than a target distance threshold, and a sum of the second distance and the third distance is greater than or equal to the target height; Based on the third display position and the second display position, the second interface is displayed, wherein the first floating window is located at the third display position in the second interface, the second floating window is located at the second display position in the second interface, and the first floating window and the second floating window do not overlap each other.
7. The method according to claim 2, characterized in that The determining, in response to the triggering operation and based on the first display position, the second display position corresponding to the second floating window to be displayed includes: In response to the trigger operation, determining, based on the first display position, a fourth distance between an edge of a first side of the first floating window and an edge of a first side of the first interface; Based on the fourth distance, the second display position is determined.
8. The method according to any one of claims 1 to 7, characterized in that: The number of the first floating windows is 1, and the first floating window is a floating window corresponding to the first application. The number of the second floating windows is 1, and the second floating window is a floating window corresponding to the second application. The first interface is an application interface corresponding to the second application. Before displaying the first interface, the method further includes: Display a third interface, where the third interface is an application interface corresponding to the first application; In response to a second trigger operation in the target area of the third interface, displaying a fourth interface, wherein the fourth interface includes the first floating window; The displaying of the first interface, and the displaying of the second interface in response to a triggering operation for adding a floating window, include: In response to a running operation on the second application in the fourth interface, running the second application in the foreground and displaying the first interface; In response to a first trigger operation in the target area in the first interface, the second interface is displayed.
9. The method according to any one of claims 1 to 7, characterized in that: The display size of the first floating window and the second floating window is a first display size, and the proportion of the first floating window and the second floating window in the second interface is smaller than a target proportion.
10. The method according to claim 9, characterized in that After displaying the second interface in response to the triggering operation for adding a floating window, the method further includes: In response to a third trigger operation on the first floating window and the target floating window in the second floating window, a fifth interface is displayed, wherein the fifth interface includes the target floating window having a second display size and other floating windows having a third display size, wherein the second display size is larger than the first display size, the third display size is smaller than the first display size, the other floating windows are the first floating window and the second floating window other than the target floating window, and the proportion of all floating windows in the fifth interface in the fifth interface is smaller than the target proportion.
11. An interface display device, characterized in that: The device comprises: a first interface display module and a second interface display module, wherein: The first interface display module is used to display a first interface, wherein the first interface includes at least one first floating window; The second interface display module is used to display a second interface in response to a trigger operation for adding a new floating window, wherein the second interface includes the first floating window and at least one second floating window, and the second display position of the second floating window in the second interface is determined based on the first display position of the first floating window in the first interface, and the first floating window and the second floating window do not overlap with each other.
12. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 10.
