Method for displaying floating window and electronic equipment

By synchronously adjusting the horizontal and vertical display status of the floating window and the display status of the terminal equipment, the problem that the floating window in the prior art cannot adapt to the horizontal display is solved, and better space utilization and user experience are achieved.

CN119179405APending Publication Date: 2024-12-24HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310749903.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The display status of the existing floating window on the terminal device is always in a vertical screen state, and the display space cannot be fully utilized, which affects the user's viewing and usage experience, especially in the horizontal screen display scenario.

Method used

By detecting the display status of the electronic device, automatically or manually switch the horizontal and vertical display status of the floating window to keep it synchronized with the display status of the device, ensuring that the floating window is displayed horizontally when it is horizontally when it is horizontally when it is vertically when it is vertically, so Make full use of the display space.

Benefits of technology

It improves the user's viewing and usage experience, and by adapting to different display states, the scaling degree of floating window content is reduced and the utilization of display space is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179405A_ABST
    Figure CN119179405A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a floating window display method and electronic device.The method comprises the steps that in response to operation, triggered by a user, of displaying a first floating window on a screen of first electronic equipment, the display state of the first electronic equipment is determined, and the display state of the first electronic equipment comprises horizontal screen display or vertical screen display; when the display state of the first electronic equipment is horizontal screen display, displaying a first floating window on a screen of the first electronic equipment in a horizontal screen manner; or, when the display state of the first electronic equipment is vertical screen display, the first floating window is displayed on the screen of the first electronic equipment in a vertical screen mode; when the display state of the first electronic equipment is switched, the display state of the first floating window is switched synchronously. Thus, when the electronic equipment is in the horizontal screen display state, the floating window displayed on the screen is also in the horizontal screen display state, the display space of the floating window can be fully utilized, the zooming degree of the content in the floating window is reduced, and therefore the use experience of a user is obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of terminal display, and more specifically, to a method and electronic device for displaying a floating window. Background Art

[0002] With the diversification of terminal devices' functions, floating windows enable users to use different device functions on one screen at the same time. However, the display state of existing floating windows on terminal devices is always in vertical display state, and the design mode is relatively rigid. It is unable to make full use of the display space of the floating window, and the content display accounts for a small proportion. It is not well suited to the scenario where the terminal device is in horizontal display state, thus affecting the user's viewing and usage experience. Summary of the invention

[0003] The present application provides a method for displaying a floating window and an electronic device. Through the method and the electronic device, when the electronic device is in a horizontal screen display state, the floating window displayed on its screen is also in a horizontal screen display state, which can fully utilize the display space of the floating window and reduce the scaling degree of the content in the floating window, thereby significantly improving the user experience.

[0004] In a first aspect, a method for displaying a floating window is provided, the method comprising: in response to an operation triggered by a user to display a first floating window on a screen of a first electronic device, determining a display state of the first electronic device, the display state of the first electronic device comprising a horizontal display or a vertical display; when the display state of the first electronic device is a horizontal display, displaying the first floating window in a horizontal manner on the screen of the first electronic device; or, when the display state of the first electronic device is a vertical display, displaying the first floating window in a vertical manner on the screen of the first electronic device.

[0005] The horizontal screen display of the first electronic device refers to the horizontal screen display of the content displayed on the screen of the first electronic device, and the vertical screen display of the first electronic device refers to the vertical screen display of the content displayed on the screen of the first electronic device.

[0006] Similarly, the display state of the first floating window also includes horizontal display or vertical display, wherein horizontal display refers to the first floating window being displayed horizontally on the screen of the electronic device, and the content displayed in the first floating window is relative to the horizontal display of the first floating window, and vertical display refers to the first floating window being displayed vertically on the screen of the electronic device, and the content displayed in the first floating window is relative to the vertical display of the first floating window.

[0007] In some embodiments, the user triggers the operation of displaying the first floating window on the screen of the first electronic device, which may be triggering the display of the first floating window corresponding to the application through the recent task list; or triggering the display of the first floating window through the setting function of the first electronic device; or automatically triggering the display of the first floating window when the application retreats to the background; or other operations that trigger the display of the first floating window, such as projecting or expanding the first floating window to the screen of the first electronic device, which is not limited in the present application.

[0008] The operation of extending the first floating window to the screen of the first electronic device may also be described as: the operation of migrating the first floating window to the screen of the first electronic device.

[0009] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window triggered to be displayed on the electronic device is the same as the current horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the zoom level of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0010] In combination with the first aspect, in a possible implementation, the method also includes: when the display state of the first electronic device is switched from horizontal screen display to vertical screen display, the display state of the first floating window is switched from horizontal screen display to vertical screen display; or, when the display state of the first electronic device is switched from vertical screen display to horizontal screen display, the display state of the first floating window is switched from vertical screen display to horizontal screen display.

[0011] That is, the display state of the first floating window displayed on the first electronic device is switched synchronously with the switching of the display state of the first electronic device.

[0012] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window displayed on the screen of the electronic device is the same as the horizontal or vertical screen display state of the electronic device, and will adaptively switch with the switching of the horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the vertical screen display state, the floating window is also in the vertical screen display state, which can well adapt to the user's viewing habits; and, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the scaling degree of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0013] In combination with the first aspect, in a possible implementation, the first floating window includes a first control, and the method also includes: in response to the user clicking the first control, the display state of the first floating window is switched, and the display state of the first floating window is locked to the display state after the switch.

[0014] It should be understood that when the display state of the first floating window is switched through the first control, the display state of the first electronic device may remain unchanged. After the display state of the first floating window is locked to the switched display state, the display state of the first floating window no longer switches with the switching of the display state of the first electronic device.

[0015] In an embodiment of the present application, a user can manually switch the horizontal or vertical display state of the floating window, and lock it after manual switching, thereby enabling the floating window to be displayed horizontally when the display state of the electronic device is in vertical display, and enabling the floating window to be displayed vertically when the display state of the electronic device is in horizontal display. This can adapt to the user's various viewing or usage needs, thereby improving the user's usage experience.

[0016] In combination with the first aspect, in a possible implementation method, in response to the user clicking the first control, the display state of the first floating window switches, including: when the display state of the first electronic device and the display state of the first floating window are both vertical screen displays, in response to the user clicking the first control, the display state of the first floating window switches from vertical screen display to horizontal screen display.

[0017] In the embodiment of the present application, the user can manually switch the horizontal and vertical screen display states of the floating window, and lock it after manual switching, so that the horizontal screen display of the floating window can be achieved when the display state of the electronic device is vertical screen display. Similarly, the vertical screen display of the floating window can also be achieved when the display state of the electronic device is horizontal screen display. This can adapt to the user's various viewing or usage needs, thereby improving the user's usage experience.

[0018] In combination with the first aspect, in a possible implementation manner, the display state of the first floating window is in a locked state, and when the display state of the first electronic device is switched, the display state of the first floating window remains unchanged.

[0019] In combination with the first aspect, in a possible implementation, the method further includes: in response to the user clicking the first control again, the display state of the first floating window is synchronized with the display state of the first electronic device.

[0020] In an embodiment of the present application, after manually switching the display state of the floating window, in order to adapt to the user's usage needs, the display state of the floating window will be adaptively locked to the switched state, and the user can unlock the floating window at any time to restore it to a state that switches synchronously with the display state of the electronic device. In this way, it can meet the user's various viewing and usage needs and further enhance the user's usage experience.

[0021] In combination with the first aspect, in a possible implementation manner, the first floating window includes a second control, and the method further includes:

[0022] In response to the user clicking the second control, the display state of the first floating window is locked as the current display state.

[0023] In an embodiment of the present application, the user can lock the horizontal or vertical screen display state of the floating window so that the display state of the floating window remains in the current display state and no longer switches with the switching of the display state of the electronic device. This can adapt to the user's various viewing or usage needs, thereby improving the user's usage experience.

[0024] In combination with the first aspect, in a possible implementation, the method further includes: in response to the user clicking the second control again, the display state of the first floating window is synchronized with the display state of the first electronic device.

[0025] In an embodiment of the present application, after locking the floating window to the current display state, the user can unlock the floating window at any time to restore it to a state that switches synchronously with the display state of the electronic device. In this way, it can meet the user's various viewing and usage needs and further enhance the user's usage experience.

[0026] In combination with the first aspect, in a possible implementation, the method also includes: in response to a first operation of the user, sending first display information to a second electronic device, the first display information is used to display a second floating window on the screen of the second electronic device, the display state of the second floating window is the same as the display state of the second electronic device, and the display content of the second floating window is generated based on the display content of the first floating window.

[0027] The display content of the second floating window is generated according to the display content of the first floating window, which can also be described as: the display content of the second floating window is the same as the display content of the first floating window.

[0028] It should be understood that: the display content of the floating window displayed in portrait and the floating window displayed in landscape are the same, that is, the floating window displayed in landscape displays the content of the original floating window displayed in portrait in landscape form, and the content displayed by the floating window displayed in portrait and the floating window displayed in landscape are the same, but due to display space reasons, the actual display content on the floating window displayed in portrait and the actual display content on the floating window displayed in landscape may not be completely consistent. For example, the actual display content on the floating window displayed in landscape may be more than the actual display content on the floating window displayed in portrait because the display space is larger in landscape display state.

[0029] In an embodiment of the present application, when a floating window displayed on a first electronic device is displayed on a second electronic device, the display state of the floating window displayed on the second electronic device is consistent with the display state of the second electronic device, rather than being consistent with the display state of the first electronic device. In this way, the display space of the floating window can be fully utilized, so that the user has a better viewing experience.

[0030] In combination with the first aspect, in a possible implementation, the method also includes: receiving device information of a second electronic device sent by a second electronic device, the device information of the second electronic device including a display status of the second electronic device; and generating the first display information based on the device information of the second electronic device and the display interface of the first electronic device.

[0031] In one implementation, the first electronic device sends a first request message to the second electronic device, where the first request message is used to request device information of the second electronic device, and the second electronic device sends the device information of the second electronic device to the first electronic device in response to the first request message.

[0032] In an embodiment of the present application, an electronic device can obtain the display status of other electronic devices, and determine the display status of the floating window on the other electronic devices based on the obtained display status, thereby laying a foundation for ensuring that the display status of the floating window on the other electronic devices is consistent with the display status of the other electronic devices.

[0033] In combination with the first aspect, in one possible implementation method, the first operation is an operation of projecting the display interface of the first electronic device onto the screen of the second electronic device, the first display information includes a video stream corresponding to the interface of the first virtual screen, the display state of the first virtual screen is the same as the display state of the second electronic device, and the display content of the first virtual screen is generated based on the display content of the first electronic device.

[0034] Optionally, the first electronic device creates the first virtual screen according to the display state of the second electronic device and the display interface of the first electronic device.

[0035] Optionally, the display state of the second floating window can be switched or locked through a specific control on the first electronic device.

[0036] In an embodiment of the present application, in a screen projection scenario, the display status of the floating window displayed on the projected end is consistent with the display status of the projected end device, rather than being consistent with the display status of the projection source end device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0037] In combination with the first aspect, in a possible implementation method, the first operation is an operation of migrating the first floating window to the screen of the second electronic device, the first display information includes a video stream corresponding to the interface of the third virtual screen, the display state of the third virtual screen is the same as the display state of the second electronic device, and the display content of the third virtual screen is generated based on the display content of the first floating window.

[0038] Among them, migration can also be understood as expansion.

[0039] Optionally, the first electronic device creates the third virtual screen according to the display state of the second electronic device and the display interface of the first electronic device.

[0040] Optionally, the display state of the second floating window can be switched or locked through a specific control on the second electronic device.

[0041] In an embodiment of the present application, in a multi-screen collaboration scenario, the display status of the floating window displayed on the extended screen is consistent with the display status of the extended screen, rather than consistent with the display status of the source device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0042] In a second aspect, a method for displaying a floating window is provided, the method comprising: a current display state of a first electronic device is a first display state, and when the display state of the first electronic device is switched from the first display state to the second display state, the display state of a first floating window displayed on the screen of the first electronic device is switched from the first display state to the second display state, wherein the first display state includes horizontal screen display or vertical screen display, the second display state includes horizontal screen display or vertical screen display, and the first display state and the second display state are different.

[0043] In one implementation, when the display state of the first electronic device is switched from portrait display to landscape display, the display state of the first floating window is switched from portrait display to landscape display.

[0044] In another implementation, when the display state of the first electronic device is switched from horizontal screen display to vertical screen display, the display state of the first floating window is switched from horizontal screen display to vertical screen display.

[0045] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window displayed on the screen of the electronic device is the same as the horizontal or vertical screen display state of the electronic device, and will adaptively switch with the switching of the horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the vertical screen display state, the floating window is also in the vertical screen display state, which can well adapt to the user's viewing habits; and, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the scaling degree of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0046] In combination with the second aspect, in a possible implementation, the first floating window includes a first control, and the method also includes: in response to the user clicking the first control, the display state of the first floating window is switched, and the display state of the first floating window is locked to the display state after the switch.

[0047] It should be understood that when the display state of the first floating window is switched through the first control, the display state of the first electronic device may remain unchanged. After the display state of the first floating window is locked to the switched display state, the display state of the first floating window no longer switches with the switching of the display state of the first electronic device.

[0048] In an embodiment of the present application, a user can manually switch the horizontal or vertical display state of the floating window, and lock it after manual switching, thereby enabling the floating window to be displayed horizontally when the display state of the electronic device is in vertical display, and enabling the floating window to be displayed vertically when the display state of the electronic device is in horizontal display. This can adapt to the user's various viewing or usage needs, thereby improving the user's usage experience.

[0049] In combination with the second aspect, in a possible implementation method, in response to the user clicking the first control, the display state of the first floating window switches, including: when the display state of the first electronic device and the display state of the first floating window are both vertical screen displays, in response to the user clicking the first control, the display state of the first floating window switches from vertical screen display to horizontal screen display.

[0050] In the embodiment of the present application, the user can manually switch the horizontal and vertical screen display states of the floating window, and lock it after manual switching, so that the horizontal screen display of the floating window can be achieved when the display state of the electronic device is vertical screen display. Similarly, the vertical screen display of the floating window can also be achieved when the display state of the electronic device is horizontal screen display. This can adapt to the user's various viewing or usage needs, thereby improving the user's usage experience.

[0051] In combination with the second aspect, in a possible implementation manner, the display state of the first floating window is in a locked state, and when the display state of the first electronic device is switched, the display state of the first floating window remains unchanged.

[0052] In combination with the second aspect, in a possible implementation manner, the display state of the first floating window is in a locked state, and when the display state of the first electronic device is switched, the display state of the first floating window remains unchanged.

[0053] In combination with the second aspect, in a possible implementation, the method further includes: in response to the user clicking the first control again, the display state of the first floating window is synchronized with the display state of the first electronic device.

[0054] In an embodiment of the present application, after manually switching the display state of the floating window, in order to adapt to the user's usage needs, the display state of the floating window will be adaptively locked to the switched state, and the user can unlock the floating window at any time to restore it to a state that switches synchronously with the display state of the electronic device. In this way, it can meet the user's various viewing and usage needs and further enhance the user's usage experience.

[0055] In conjunction with the second aspect, in a possible implementation manner, the first floating window includes a second control, and the method further includes:

[0056] In response to the user clicking the second control, the display state of the first floating window is locked as the current display state.

[0057] In an embodiment of the present application, the user can lock the horizontal or vertical screen display state of the floating window so that the display state of the floating window remains in the current display state and no longer switches with the switching of the display state of the electronic device. This can adapt to the user's various viewing or usage needs, thereby improving the user's usage experience.

[0058] In combination with the second aspect, in a possible implementation, the method further includes: in response to the user clicking the second control again, the display state of the first floating window is synchronized with the display state of the first electronic device.

[0059] In an embodiment of the present application, after locking the floating window to the current display state, the user can unlock the floating window at any time to restore it to a state that switches synchronously with the display state of the electronic device. In this way, it can meet the user's various viewing and usage needs and further enhance the user's usage experience.

[0060] In combination with the second aspect, in a possible implementation, the method also includes: in response to a first operation of the user, sending first display information to a second electronic device, the first display information is used to display a second floating window on the screen of the second electronic device, the display state of the second floating window is the same as the display state of the second electronic device, and the display content of the second floating window is generated based on the display content of the first floating window.

[0061] The display content of the second floating window is generated according to the display content of the first floating window, which can also be described as: the display content of the second floating window is the same as the display content of the first floating window.

[0062] It should be understood that: the display content of the floating window displayed in portrait and the floating window displayed in landscape are the same, that is, the floating window displayed in landscape displays the content of the original floating window displayed in portrait in landscape form, and the content displayed by the floating window displayed in portrait and the floating window displayed in landscape are the same, but due to display space reasons, the actual display content on the floating window displayed in portrait and the actual display content on the floating window displayed in landscape may not be completely consistent. For example, the actual display content on the floating window displayed in landscape may be more than the actual display content on the floating window displayed in portrait because the display space is larger in landscape display state.

[0063] In an embodiment of the present application, when a floating window displayed on a first electronic device is displayed on a second electronic device, the display state of the floating window displayed on the second electronic device is consistent with the display state of the second electronic device, rather than being consistent with the display state of the first electronic device. In this way, the display space of the floating window can be fully utilized, so that the user has a better viewing experience.

[0064] In combination with the second aspect, in a possible implementation, the method also includes: receiving device information of the second electronic device sent by the second electronic device, the device information of the second electronic device including the display status of the second electronic device; and generating the first display information according to the device information of the second electronic device and the display interface of the first electronic device.

[0065] In one implementation, the first electronic device sends a first request message to the second electronic device, where the first request message is used to request device information of the second electronic device, and the second electronic device sends the device information of the second electronic device to the first electronic device in response to the first request message.

[0066] In an embodiment of the present application, an electronic device can obtain the display status of other electronic devices, and determine the display status of the floating window on the other electronic devices based on the obtained display status, thereby laying a foundation for ensuring that the display status of the floating window on the other electronic devices is consistent with the display status of the other electronic devices.

[0067] In combination with the second aspect, in one possible implementation method, the first operation is an operation of projecting the display interface of the first electronic device onto the screen of the second electronic device, the first display information includes a video stream corresponding to the interface of the first virtual screen, the display state of the first virtual screen is the same as the display state of the second electronic device, and the display content of the first virtual screen is generated based on the display content of the first electronic device.

[0068] Optionally, the first electronic device creates the first virtual screen according to the display state of the second electronic device and the display interface of the first electronic device.

[0069] In an embodiment of the present application, in a screen projection scenario, the display status of the floating window displayed on the projected end is consistent with the display status of the projected end device, rather than being consistent with the display status of the projection source end device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0070] In combination with the second aspect, in one possible implementation method, the first operation is an operation of migrating the first floating window to the screen of the second electronic device, the first display information includes a video stream corresponding to the interface of the third virtual screen, the display state of the third virtual screen is the same as the display state of the second electronic device, and the display content of the third virtual screen is generated based on the display content of the first floating window.

[0071] Among them, migration can also be understood as expansion.

[0072] Optionally, the first electronic device creates the third virtual screen according to the display state of the second electronic device and the display interface of the first electronic device.

[0073] In an embodiment of the present application, in a multi-screen collaboration scenario, the display status of the floating window displayed on the extended screen is consistent with the display status of the extended screen, rather than consistent with the display status of the source device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0074] In a third aspect, a method for displaying a floating window is provided, the method comprising: a second electronic device receives first display information sent by a first electronic device, and a first floating window is currently displayed on the screen of the first electronic device; the second electronic device displays a second floating window on the screen of the second electronic device according to the first display information, and a display state of the second floating window is the same as a display state of the second electronic device, and the display state includes horizontal screen display or vertical screen display, and display content of the second floating window is generated based on the display content of the first floating window.

[0075] The display content of the second floating window is generated according to the display content of the first floating window, which can also be described as: the display content of the second floating window is the same as the display content of the first floating window.

[0076] It should be understood that: the display content of the floating window displayed in portrait and the floating window displayed in landscape are the same, that is, the floating window displayed in landscape displays the content of the original floating window displayed in portrait in landscape form, and the content displayed by the floating window displayed in portrait and the floating window displayed in landscape are the same, but due to display space reasons, the actual display content on the floating window displayed in portrait and the actual display content on the floating window displayed in landscape may not be completely consistent. For example, the actual display content on the floating window displayed in landscape may be more than the actual display content on the floating window displayed in portrait because the display space is larger in landscape display state.

[0077] In an embodiment of the present application, when a floating window displayed on a first electronic device is displayed on a second electronic device, the display state of the floating window displayed on the second electronic device is consistent with the display state of the second electronic device, rather than being consistent with the display state of the first electronic device. In this way, the display space of the floating window can be fully utilized, so that the user has a better viewing experience.

[0078] In combination with the third aspect, in a possible implementation, the method also includes: the second electronic device sends device information of the second electronic device to the first electronic device, the device information of the second electronic device includes the display status of the second electronic device, and the device information of the second electronic device is used by the first electronic device to generate the first display information.

[0079] In one implementation, the second electronic device receives a first request message sent by the first electronic device, where the first request message is used to request device information of the second electronic device, and the second electronic device sends the device information of the second electronic device to the first electronic device in response to the first request message.

[0080] In an embodiment of the present application, an electronic device can obtain the display status of other electronic devices, and determine the display status of the floating window on the other electronic devices based on the obtained display status, thereby laying a foundation for ensuring that the display status of the floating window on the other electronic devices is consistent with the display status of the other electronic devices.

[0081] In combination with the third aspect, in one possible implementation, the first display information includes a video stream corresponding to the interface of the first virtual screen, the display state of the first virtual screen is the same as the display state of the second electronic device, and the display content of the first virtual screen is generated based on the display content of the first electronic device.

[0082] Optionally, the first electronic device creates the first virtual screen according to the display state of the second electronic device and the display interface of the first electronic device.

[0083] In an embodiment of the present application, in a screen projection scenario, the display status of the floating window displayed on the projected end is consistent with the display status of the projected end device, rather than being consistent with the display status of the projection source end device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0084] In combination with the third aspect, in a possible implementation method, the first display information includes a video stream corresponding to the interface of the third virtual screen, the display state of the third virtual screen is the same as the display state of the second electronic device, the display content of the third virtual screen is generated based on the display content of the first floating window, and when the second floating window is displayed on the screen of the second electronic device, the first floating window is not displayed on the screen of the first electronic device.

[0085] Among them, migration can also be understood as expansion.

[0086] Optionally, the first electronic device creates the third virtual screen according to the display state of the second electronic device and the display interface of the first electronic device.

[0087] In an embodiment of the present application, in a multi-screen collaboration scenario, the display status of the floating window displayed on the extended screen is consistent with the display status of the extended screen, rather than consistent with the display status of the source device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0088] In a fourth aspect, an electronic device is provided, characterized in that the electronic device includes: a determination module, used to determine the display state of the first electronic device in response to an operation triggered by a user to display a first floating window on the screen of the first electronic device, the display state of the first electronic device including horizontal screen display or vertical screen display; a display module, used to display the first floating window in horizontal screen on the screen of the first electronic device when the display state of the first electronic device is horizontal screen display; or, when the display state of the first electronic device is vertical screen display, display the first floating window in vertical screen on the screen of the first electronic device.

[0089] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window triggered to be displayed on the electronic device is the same as the current horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the zoom level of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0090] In combination with the fourth aspect, in a possible implementation, the electronic device also includes: a switching module, which is used to switch the display state of the first floating window from horizontal screen display to vertical screen display when the display state of the first electronic device is switched from horizontal screen display to vertical screen display; and is also used to switch the display state of the first floating window from vertical screen display to horizontal screen display when the display state of the first electronic device is switched from vertical screen display to horizontal screen display.

[0091] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window displayed on the screen of the electronic device is the same as the horizontal or vertical screen display state of the electronic device, and will adaptively switch with the switching of the horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the vertical screen display state, the floating window is also in the vertical screen display state, which can well adapt to the user's viewing habits; and, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the scaling degree of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0092] In a fifth aspect, an electronic device is provided, comprising: a switching module, for switching the display state of a first floating window displayed on the screen of the first electronic device from a first display state to a second display state when the display state of the first electronic device is switched from a first display state to a second display state, wherein the first display state includes a horizontal screen display or a vertical screen display, the second display state includes a horizontal screen display or a vertical screen display, and the first display state and the second display state are different.

[0093] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window displayed on the screen of the electronic device is the same as the horizontal or vertical screen display state of the electronic device, and will adaptively switch with the switching of the horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the vertical screen display state, the floating window is also in the vertical screen display state, which can well adapt to the user's viewing habits; and, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the scaling degree of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0094] In a sixth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer program code, and the processor is used to execute the computer program code stored in the memory to implement the method in the first aspect or any possible implementation of the first aspect, or to implement the method in the second aspect or any possible implementation of the second aspect, or to implement the method in the third aspect or any possible implementation of the third aspect.

[0095] In the seventh aspect, a computer-readable storage medium is provided, which stores a computer program or instruction. When the computer program or instruction is executed, it implements the method in the first aspect or any possible implementation of the first aspect, or implements the method in the second aspect or any possible implementation of the second aspect, or implements the method in the third aspect or any possible implementation of the third aspect.

[0096] In an eighth aspect, a chip is provided, in which instructions are stored. When the chip is executed on a device, the chip executes the method in the first aspect or any possible implementation of the first aspect, or executes the method in the second aspect or any possible implementation of the second aspect, or executes the method in the third aspect or any possible implementation of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0098] Figure 2 is a software structure block diagram of the electronic device provided in the embodiment of the present application;

[0099] Figure 3 The present invention is a schematic diagram of an interface displayed in an existing floating window;

[0100] Figure 4 It is another existing interface schematic diagram of floating window display;

[0101] Figure 5This is a schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0102] Figure 6 This is another schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0103] Figure 7 This is another schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0104] Figure 8 This is another schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0105] Fig. 9 This is another schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0106] Fig.10 This is another schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0107] Fig.11 This is another schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0108] Fig.12 This is another schematic diagram of an interface for displaying a floating window provided in an embodiment of the present application;

[0109] Fig.13 is a schematic flow chart of a method for displaying a floating window provided in an embodiment of the present application;

[0110] Fig.14 is a schematic flow chart of another method for displaying a floating window provided in an embodiment of the present application;

[0111] Fig.15 is a schematic flow chart of another method for displaying a floating window provided in an embodiment of the present application;

[0112] Fig.16 is a schematic flow chart of another method for displaying a floating window provided in an embodiment of the present application;

[0113] Fig.17 is a schematic flow chart of another method for displaying a floating window provided in an embodiment of the present application;

[0114] Fig.18 This is an interactive schematic diagram corresponding to a mirror screen projection method provided in an embodiment of the present application;

[0115] Fig.19 This is an interactive schematic diagram corresponding to a heterogeneous screen projection method provided in an embodiment of the present application;

[0116] Fig. 20It is a functional module diagram of a device for displaying a floating window provided in an embodiment of the present application;

[0117] Fig.21 It is a schematic diagram of functional modules corresponding to a screen projection system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0118] The technical solution in the present application will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0119] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.

[0120] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0121] The method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0122] For example, Figure 11 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0123] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0124] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0125] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0126] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0127] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

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

[0129] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0130] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0131] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

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

[0133] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0134] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

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

[0136] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0137] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

[0139] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0140] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0141] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0142] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0143] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0144] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0145] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0146] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0147] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0148] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

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

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

[0151] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0152] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0153] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, at least one App required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

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

[0155] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0156] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0157] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0158] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0159] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0160] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0161] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0162] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0163] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0164] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0165] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0166] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0167] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0168] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0169] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0170] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0171] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

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

[0173] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0174] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0175] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an embedded SIM (eSIM) card, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0176] It should be understood that the phone card in the embodiments of the present application includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (USIM), a universal integrated circuit card (UICC), and the like.

[0177] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0178] Figure 2 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.

[0179] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

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

[0181] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0182] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0183] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0184] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0185] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0186] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0187] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

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

[0189] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0190] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

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

[0192] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0193] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0194] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0195] A 2D graphics engine is a drawing engine for 2D drawings.

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

[0197] It should be understood that the technical solutions in the embodiments of the present application can be used in Android, IOS, Hongmeng and other systems.

[0198] The technical solution of the embodiment of the present application can be applied to the display scenario of the floating window of the electronic device.

[0199] The electronic device in the embodiments of the present application may be a television, a desktop computer, a laptop computer, or a portable electronic device such as a mobile phone, a tablet computer, a camera, a camcorder, a video recorder, or other electronic devices with a screen display function, an electronic device in a 5G network, or an electronic device in a public land mobile communication network (PLMN) to be evolved in the future, etc., and the present application does not limit this.

[0200] As the functions of terminal devices become more diverse, floating windows enable users to use different device functions on one screen at the same time, thereby improving the user experience.

[0201] In order to more clearly understand the solution provided by this application, the technical terms involved in this application are first introduced below.

[0202] 1. Floating window

[0203] The floating window is based on tasks. By controlling the size of the window so that it does not fill the entire screen and the window level is at the top, the purpose of floating the window is achieved. Floating windows are usually used to temporarily process another task based on an existing task, or to use multiple tasks in parallel for a short period of time. For example, replying to chat messages while playing games, temporarily using a calculator while shopping, etc. In addition, during this time period, the user's attention is more focused on the task of the floating window.

[0204] Below, taking the electronic device as a mobile phone as an example, illustratively, Figure 3 A schematic diagram of an existing floating window display interface is shown.

[0205] like Figure 3 As shown in (a) of FIG. 1 , the electronic device 300 is in a horizontal display state, and a memo interface is displayed on the display interface of the electronic device 300; on this basis, when the user wishes to start a floating window display of an application, the user can slide his finger upward from the bottom of the display screen of the electronic device 300, and the display interface of the electronic device 300 is as shown in FIG. Figure 3 As shown in (b) of FIG. 1 , the display screen of the electronic device 300 displays a list of recent tasks in a horizontal screen. Specifically, the display screen of the electronic device 300 displays a plurality of recently used applications (which can also be described as applications that have retreated to the background), and the user can view these recent tasks by sliding left and right, such as Figure 3As shown in (b) in the figure, the display interface of the electronic device 300, for example, displays the application interface of the recent task "Huawei Video", and also displays the application interface of the recent task "SMS". A part of the "Smart Life" application interface is displayed on the left of the "Huawei Video" application interface (when the user slides the recent task list to the right, the "Smart Life" application interface can be fully displayed on the display screen of the electronic device 300, and the "Huawei Video" application interface is partially displayed on the display screen of the electronic device 300). Below the "Huawei Video" application interface, icons of all applications in the recent task list are displayed, namely: Sports Health, Smart Life, Browser (it should be understood that since the "Huawei Video" application interface and the "SMS" application interface are on the electronic device 300 is fully displayed on the display screen of the electronic device 300, so the icons corresponding to the Huawei video application and the icons corresponding to the text message application are not displayed here), and one or more application interfaces displayed in the display interface of the electronic device 300 (for example: Huawei video application interface, text message application interface or smart life application interface) are respectively associated with a control 301 in the upper right corner, and the control 301 is used by the user to switch the associated application interface to a floating window display; for example, when the user clicks the control 301 associated with the Huawei video application interface, a floating window 302 corresponding to the "Huawei Video" application is displayed on the display interface of the electronic device 300 (for example: memo display interface). At this time, the electronic device 300 still remains in a horizontal screen display state, and the floating window 302 is in a vertical screen display state (such as Figure 3 ).

[0206] It should be understood that in this embodiment, the floating window display of a certain application is launched through the recent task list. This is only an exemplary description of triggering the floating window display by an electronic device, and does not constitute any limitation on the method of triggering the floating window display in this application. For example, the display of the floating window can also be triggered through the setting function of the electronic device, and the display of the floating window can also be triggered when the application switches to the background.

[0207] For example, Figure 4 Another conventional floating window display interface schematic diagram is shown.

[0208] like Figure 4 As shown in (a) of FIG. 1 , the electronic device 400 is in a vertical screen display state, and a memo interface is displayed on the display interface of the electronic device 400; on this basis, when the user wishes to start a floating window display of an application, the user can slide his finger upward from the bottom of the display screen of the electronic device 400, and the display interface of the electronic device 400 is as shown in FIG. Figure 4As shown in (b) of FIG. 4 , a recent task list is displayed on the display screen of the electronic device 400. Specifically, a plurality of recently used applications (which can also be described as applications that have retreated to the background) are displayed on the display screen of the electronic device 400. The user can view these recent tasks by sliding left and right, such as Figure 4 As shown in (b) in the figure, the display interface of the electronic device 400, for example, displays the application interface of the recent task "Huawei Video", and also displays a part of the application interface of the recent task "SMS" (when the user slides the recent task list to the right, the "SMS" application interface can be fully displayed on the display screen of the electronic device 300). Below the "Huawei Video" application interface, icons of all applications in the recent task list are displayed, namely: Sports Health, Smart Life, SMS, Browser (It should be understood that since the "Huawei Video" application interface is fully displayed on the display screen of the electronic device 400, the corresponding application interface of the Huawei Video application is not displayed here. ), and one or more application interfaces (for example, Huawei video application interface or SMS application interface) displayed in the display interface of the electronic device 400 are respectively associated with a control 401 in the upper right corner, and the control 401 is used by the user to switch the associated application interface to a floating window display; for example, when the user clicks the control 401 associated with the Huawei video application interface, a floating window 402 corresponding to the "Huawei video" application is displayed on the display interface of the electronic device 400 (for example, a memo display interface). At this time, the electronic device 400 still remains in a vertical screen display state, and the floating window 402 is in a vertical screen display state (such as Figure 4 On this basis, when the user switches the display state of the electronic device 400 from the vertical screen display to the horizontal screen display (for example, by rotating the electronic device 400 by 90°), the electronic device 400 is in the horizontal screen display state, and the floating window 402 is still in the vertical screen display state (as shown in (c) in FIG. Figure 4 (as shown in (d) in the figure).

[0209] It should be understood that in this embodiment, the floating window display of a certain application is launched through the recent task list. This is only an exemplary description of triggering the floating window display by an electronic device, and does not constitute any limitation on the method of triggering the floating window display in this application. For example, the display of the floating window can also be triggered through the setting function of the electronic device, and the display of the floating window can also be triggered when the application switches to the background.

[0210] It should be understood that in order to describe the solution provided by the present application more clearly, the embodiments in the present application are described using the electronic device as a mobile phone as an example, wherein the electronic device may also be, for example, a tablet computer, a laptop computer, a desktop computer or a television, etc., and the present application does not limit this.

[0211] From the above, it can be seen that the display state of the existing floating window on the terminal device is independent of the display state of the terminal device, and is always in a vertical display state. For example, when the terminal device is in a horizontal display state, the floating window displayed on its screen is in a vertical display state, which will result in a smaller display space for the floating window, and then cause the content of the floating window to be displayed in a larger scale, and the operability and viewing performance will be greatly reduced. Therefore, the display mode of the existing floating window is relatively rigid, and it cannot fully utilize the display space of the floating window, and cannot be well adapted to the scenario where the terminal device is in a horizontal display state.

[0212] In view of this, the present application provides a method and electronic device for displaying a floating window, which can match the horizontal and vertical screen display states of the floating window with the horizontal and vertical screen states of the terminal device, thereby making full use of the display space of the floating window and increasing the proportion of content displayed in the floating window, thereby improving the user experience.

[0213] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0214] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "one embodiment", "some embodiments", "another embodiment", "some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0215] In the following, the electronic device is taken as an example of a mobile phone, and illustratively, Figures 5 to 9 , an interface schematic diagram corresponding to the method for displaying a floating window provided in an embodiment of the present application is introduced.

[0216] For example, Figure 5 A schematic diagram of an interface for displaying a floating window provided by an embodiment of the present application is shown. This embodiment can be applied to a scenario where a user pulls up a floating window for display, for example.

[0217] like Figure 5 As shown in (a) of FIG. 5 , the electronic device 500 is in a horizontal display state, and a memo interface is displayed on the display interface of the electronic device 500; on this basis, when the user wishes to start a floating window display of an application, the user can slide his finger upward from the bottom of the display screen of the electronic device 500, and the display interface of the electronic device 500 is as shown in FIG. Figure 5 As shown in (b) of FIG. 5 , the display screen of the electronic device 500 displays a list of recent tasks in a horizontal screen. Specifically, the display screen of the electronic device 500 displays a plurality of recently used applications (which can also be described as applications that have retreated to the background), and the user can view these recent tasks by sliding left and right, such as Figure 5 As shown in (b) in the figure, the display interface of the electronic device 500, for example, displays the application interface of the recent task "Huawei Video", and also displays the application interface of the recent task "SMS". A part of the "Smart Life" application interface is displayed on the left of the "Huawei Video" application interface (when the user slides the recent task list to the right, the "Smart Life" application interface can be fully displayed on the display screen of the electronic device 500, and the "Huawei Video" application interface is partially displayed on the display screen of the electronic device 500). Below the "Huawei Video" application interface, icons of all applications in the recent task list are displayed, namely: Sports Health, Smart Life, Browser (it should be understood that: since the "Huawei Video" application interface and the "SMS" application interface are on the electronic device 500 is fully displayed on the display screen of the electronic device 500, so the icons corresponding to the Huawei video application and the icons corresponding to the text message application are not displayed here), and one or more application interfaces displayed in the display interface of the electronic device 500 (for example: Huawei video application interface, text message application interface or smart life application interface) are respectively associated with a control 501 in the upper right corner, and the control 501 is used by the user to switch the associated application interface to a floating window display; for example, when the user clicks on the control 501 associated with the Huawei video application interface, a floating window 502 corresponding to the "Huawei Video" application is displayed on the display interface of the electronic device 500 (for example: memo display interface). At this time, the electronic device 500 still remains in a horizontal screen display state, and the floating window 502 is also in a horizontal screen display state (such as Figure 5 ).

[0218] It should be understood that in this embodiment, the floating window display of a certain application is launched through the recent task list. This is only an exemplary description of triggering the floating window display by an electronic device, and does not constitute any limitation on the method of triggering the floating window display in this application. For example, the display of the floating window can also be triggered through the setting function of the electronic device, and the display of the floating window can also be triggered when the application switches to the background.

[0219] It should be understood that in order to describe the solution provided by the present application more clearly, the embodiments in the present application are described using the electronic device as a mobile phone as an example, wherein the electronic device may also be, for example, a tablet computer, a laptop computer, a desktop computer or a television, etc., and the present application does not limit this.

[0220] It should be understood that: the embodiment of the present application takes the floating window 502 as the floating window corresponding to the video application as an example for explanation, but this does not constitute any limitation on the floating window. The floating window 502 can also be, for example, a floating window corresponding to an information application, a floating window corresponding to a browser application, or a floating window corresponding to any other application or any application-related functional interface. The present application does not limit this.

[0221] In an embodiment of the present application, when the display of a floating window is triggered when the display state of the terminal device is in the horizontal screen display state, the display state of the triggered floating window is also the horizontal screen display. That is to say, the horizontal and vertical screen display states of the floating window triggered by the terminal device are synchronized with the horizontal and vertical screen display states of the terminal device. In this way, when the terminal device is in the horizontal screen display state, the floating window is in the horizontal screen display state. Compared with the vertical screen display state, the floating window in the horizontal screen display state has a larger display space, and the displayed content does not require a large scaling; moreover, the content display interface occupies a larger proportion in the floating window, and the display space of the floating window can be more fully utilized.

[0222] For example, Figure 6 A schematic diagram of another interface for displaying a floating window provided in an embodiment of the present application is shown.

[0223] like Figure 6 As shown in (a) of the figure, the electronic device 600 is in a horizontal display state, a memo interface is displayed on the display screen of the electronic device 600, and a floating window 601 is displayed on the current display interface of the electronic device 600. The display state of the floating window 601 is the same as the current display state of the electronic device 600, which is also a horizontal display state; when the user switches the display interface of the electronic device 600 to a vertical display state (for example, by rotating the electronic device 600 by 90°), the display interface of the electronic device 600 is as shown in FIG. Figure 6As shown in (b), in the display interface, a memo interface is displayed, and a floating window 601 is also displayed. The display state of the floating window 601 switches synchronously with the switching of the display state of the electronic device 600, and also switches from the horizontal screen display state to the vertical screen display state.

[0224] It should be understood that in order to describe the solution provided by the present application more clearly, the embodiments in the present application are described using the electronic device as a mobile phone as an example, wherein the electronic device may also be, for example, a tablet computer, a laptop computer, a desktop computer or a television, etc., and the present application does not limit this.

[0225] It should be understood that: the embodiment of the present application takes the floating window 601 as the floating window corresponding to the video application as an example for explanation, but this does not constitute any limitation on the floating window. The floating window 601 can also be, for example, a floating window corresponding to an information application, a floating window corresponding to a browser application, or a floating window corresponding to any other application or any application-related functional interface, and the present application does not limit this. In addition, the floating windows described in other embodiments of the present application are subject to the same explanation, and for the sake of brevity, they will not be repeated in the relevant description below.

[0226] In an embodiment of the present application, the horizontal and vertical screen display states of the floating window displayed on the terminal device are synchronized with the horizontal and vertical screen display states of the terminal device. In this way, when the terminal device is in the horizontal screen display state, the floating window is in the horizontal screen display state. Compared with the vertical screen display state, the floating window in the horizontal screen display state has a larger display space, and the displayed content does not require a large scale; moreover, the content display interface occupies a larger proportion in the floating window, and the display space of the floating window can be more fully utilized.

[0227] For example, Figure 7 A schematic diagram of another interface for displaying a floating window provided in an embodiment of the present application is shown.

[0228] like Figure 7 As shown in (a) of FIG. 7 , the electronic device 700 is in a vertical screen display state, and a memo interface is displayed on the display interface of the electronic device 700; on this basis, when the user wishes to start a floating window display of an application, the user can slide his finger upward from the bottom of the display screen of the electronic device 700, and the display interface of the electronic device 700 is as shown in FIG. Figure 7 As shown in (b) of FIG. 1 , a recent task list is displayed on the display screen of the electronic device 700. Specifically, a plurality of recently used applications (which can also be described as applications that have retreated to the background) are displayed on the display screen of the electronic device 700. The user can view these recent tasks by sliding left and right, such as Figure 7As shown in (b) in the figure, the display interface of the electronic device 700, for example, displays the application interface of the recent task "Huawei Video", and also displays a part of the application interface of the recent task "SMS" (when the user slides the recent task list to the right, the "SMS" application interface can be fully displayed on the display screen of the electronic device 300). Below the "Huawei Video" application interface, icons of all applications in the recent task list are displayed, namely: Sports Health, Smart Life, SMS, Browser (It should be understood that since the "Huawei Video" application interface is fully displayed on the display screen of the electronic device 700, the corresponding application interface of the Huawei Video application is not displayed here. ), and one or more application interfaces (for example, Huawei video application interface or SMS application interface) displayed in the display interface of the electronic device 700 are respectively associated with a control 701 in the upper right corner, and the control 701 is used by the user to switch the associated application interface to a floating window display; for example, when the user clicks the control 701 associated with the Huawei video application interface, a floating window 702 corresponding to the "Huawei video" application is displayed on the display interface of the electronic device 700 (for example, a memo display interface). At this time, the electronic device 700 still remains in a vertical screen display state, and the floating window 702 is in a vertical screen display state (such as Figure 7 On this basis, when the user switches the display state of the electronic device 700 from the portrait display to the landscape display (for example, by rotating the electronic device 700 by 90°), the electronic device 700 is in the landscape display state, and the display state of the floating window 702 is switched synchronously with the switching of the display state of the electronic device 700, that is, the display state of the floating window 702 is switched from the portrait display state to the landscape display state (as shown in (c) in FIG. 1 ). Figure 7 (as shown in (d) in the figure).

[0229] For example, Figure 8 A schematic diagram of another interface for displaying a floating window provided in an embodiment of the present application is shown.

[0230] like Figure 8 As shown in (a), the electronic device 800 is in a portrait display state, a memo interface is displayed on the screen of the electronic device 800, and a floating window 801 is also displayed on the current interface of the electronic device 800, the floating window 801 is also in a portrait display state, and the floating window 801 is associated with a control 802, the control 802 is used by the user to switch the horizontal and vertical display states of the floating window; when the user hopes to change the floating window 801 to a horizontal display state while the display state of the electronic device 800 remains in a portrait display state, the user can click the control 802 to switch the display state of the floating window from the current vertical display state to the vertical display state. Figure 8At the same time, the display state of the floating window 801 is locked and always remains in the horizontal display state, and no longer switches synchronously with the switching of the display state of the electronic device 800, such as Figure 8 As shown in (b) in the figure, after the display state of the floating window is switched by the control 802, the floating window 801 is no longer associated with the control 802, but is associated with the control 803, and the control 803 is used to indicate that the horizontal and vertical screen display states of the floating window 801 are locked. The control 803 is also used by the user to unlock the horizontal and vertical screen display states of the floating window 801; on this basis, when the user switches the display state of the electronic device 800 from the vertical screen display to the horizontal screen display state (for example, by rotating the electronic device 800 by 90°), the display state of the floating window 801 remains in the horizontal screen display state (for example, Figure 8 ); when the user further switches the display state of the electronic device 800 from the horizontal screen display to the vertical screen display state (for example, by rotating the electronic device 800 by 90 degrees), since the display state of the floating window 801 is in the locked state, the display state of the floating window 801 remains in the horizontal screen display state (as shown in (c) in FIG. 1 ); Figure 8 (as shown in (d) in the figure).

[0231] In the embodiment of the present application, the user can switch the floating window displayed in portrait mode to a floating window displayed in landscape mode with one click as needed, and trigger the locking of the floating window display state at the same time, so that the floating window can be displayed in landscape mode on the screen of the electronic device in portrait mode, and the floating window can be kept in landscape mode without switching with the switching of the display state of the electronic device. Compared with the portrait mode, the floating window in landscape mode has a larger display space, and the displayed content does not require a large scale; moreover, the content display interface occupies a larger proportion in the floating window, so the display space of the floating window can be more fully utilized. By way of example, Fig. 9 A schematic diagram of another interface for displaying a floating window provided in an embodiment of the present application is shown.

[0232] like Fig. 9As shown in (a), the electronic device 900 is in a portrait display state, a memo interface is displayed on the screen of the electronic device 900, and a floating window 901 is also displayed on the current interface of the electronic device 900, the floating window 901 is in a landscape display state, and the floating window 901 is associated with a control 902, the control 902 is used to indicate that the landscape and portrait display states of the floating window 901 are locked, and the control 902 is also used by the user to unlock the landscape and portrait display states of the floating window; on this basis, when the user wants the landscape and portrait display states of the floating window 901 to be synchronized with the landscape and portrait display states of the electronic device 900, the user can click on the control 902, and after the user clicks on the control 902, the landscape and portrait display states of the floating window 901 are unlocked and synchronized with the landscape and portrait display states of the electronic device 900, and at this time the display interface of the electronic device 900 is as shown Fig. 9 As shown in (b), since the current display state of the electronic device 900 is the portrait display state, the display state of the floating window 901 is switched from the landscape display state to the portrait display state, and after the landscape and portrait display states of the floating window 901 are unlocked through the control 902, the floating window 901 is no longer associated with the control 902, but is associated with the control 903, and the control 903 is used by the user to switch the landscape and portrait display states of the floating window; when the user further switches the display state of the electronic device 900 from the portrait display state to the landscape display state (for example, by rotating the electronic device 900 90°), the display state of the floating window 901 displayed on the interface of the electronic device 900 is switched synchronously with the display state of the electronic device 900, and is also switched from the portrait display state to the landscape display state (as shown in FIG. 1 ). Fig. 9 On this basis, when the user clicks the control 903, the floating window 901 switches from the current horizontal screen display state to Fig. 9 The vertical screen display state is shown in (d) in the figure, and the display state of the electronic device 900 remains unchanged as the horizontal screen display state.

[0233] In an embodiment of the present application, the user can switch the floating window displayed in portrait mode to a floating window displayed in landscape mode with one click as needed, and trigger the locking of the display state of the floating window at the same time, so that the floating window can be displayed in landscape mode on the screen of the electronic device in portrait mode, and the floating window can be kept in landscape mode without switching with the switching of the display state of the electronic device; moreover, the user can cancel the locking of the display state of the floating window at any time, so that its display state can be switched synchronously with the switching of the display state of the electronic device.

[0234] Furthermore, the floating window switching method provided in the present application can not only realize the horizontal display of the floating window on the screen of the electronic device when the display state of the electronic device is the vertical display state; it can also realize the vertical display of the floating window on the screen of the electronic device when the display state of the electronic device is the horizontal display state, which can meet the user's various viewing needs and enhance the user's usage experience.

[0235] For example, Fig.10 A schematic diagram of another interface for displaying a floating window provided in an embodiment of the present application is shown.

[0236] like Fig.10 As shown in (a), the electronic device 1000 is in a portrait display state, a memo interface is displayed on the screen of the electronic device 1000, and a floating window 1001 is also displayed on the current interface of the electronic device 1000, the floating window 1001 is in a portrait display state, the floating window 1001 is associated with a control 1002, the control 1002 is used by the user to lock the horizontal or vertical screen display state of the floating window 1001; on this basis, when the user wishes to lock the display state of the floating window 1001 to a portrait display, the user can click the control 1002, when the user clicks the control 1002, the display state of the floating window 1001 is locked to a portrait display, and the control 1002 is switched to the control 1003, the control 1003 is used by the user to unlock the lock of the horizontal or vertical screen display state of the floating window 1001, at this time the display interface of the electronic device 1000 is as shown Fig.10 As shown in (b) in FIG. 1 ; when the user further switches the display state of the electronic device 1000 from the vertical screen display state to the horizontal screen display state (for example, by rotating the electronic device 1000 by 90°), the display state of the floating window 1001 displayed on the interface of the electronic device 1000 remains in the vertical screen display state (as shown in FIG. 1 ). Fig.10 On this basis, when the user clicks the control 1003, the floating window 1001 is maintained in the same display state as the electronic device 1000 by the current vertical screen display state, such as Fig.10 As shown in (d) in .

[0237] In the embodiment of the present application, the user can lock the display status of the floating window as needed, so that the display status of the floating window does not switch with the switching of the display status of the electronic device; and the user can cancel the lock of the display status of the floating window at any time, so that the display status of the floating window switches synchronously with the switching of the display status of the electronic device.

[0238] For example, Fig.11 A schematic diagram of another interface for displaying a floating window provided in an embodiment of the present application is shown. This embodiment can be applied to screen projection scenarios, for example.

[0239] like Fig.11 As shown in (a), the electronic device 1100a is in a vertical screen display state, a memo interface is displayed on the screen of the electronic device 1100a, and a floating window 1101 is also displayed on the current interface of the electronic device 1100a. The horizontal and vertical screen display states of the floating window 1101 are synchronized with the horizontal and vertical screen display states of the electronic device 1100a and are in a vertical screen display state; when the electronic device 1100a is used as the screen projection source end and the electronic device 1100b is used as the screen projection end for projection, the display interface of the electronic device 1100a is also displayed on the screen of the electronic device 1100b. At this time, the display interface of the electronic device 1100b is as shown in FIG. Fig.11 As shown in (b), the electronic device 1100b is in a horizontal display state, and the memo interface is displayed horizontally on the screen of the electronic device 1100b. In addition, the horizontal and vertical display states of the floating window 1101 are synchronized with the horizontal and vertical display states of the electronic device 1100b, and are also displayed horizontally on the display interface of the electronic device 1100b.

[0240] It should be understood that: the display content of the floating window 1101 displayed in portrait mode and the floating window 1101 displayed in landscape mode are the same, that is, the floating window 1101 displayed in landscape mode displays the content of the floating window 1101 originally displayed in portrait mode in landscape mode, and the content displayed by the floating window 1101 displayed in portrait mode and the floating window 1101 displayed in landscape mode are the same, but due to display space reasons, the actual display content on the floating window 1101 displayed in portrait mode and the actual display content on the floating window 1101 displayed in landscape mode may not be completely consistent. For example, due to the larger display space in the landscape display state, the actual display content on the floating window 1101 displayed in landscape mode may be more than the actual display content on the floating window 1101 displayed in portrait mode, and this explanation applies to all switching between landscape and portrait displays described in this application.

[0241] It can also be described as follows: the display content of the floating window 1101 displayed in the horizontal screen is generated according to the display content of the floating window 1101 displayed in the vertical screen.

[0242] It should be understood that in order to describe the solution provided by the present application more clearly, the embodiments in the present application are described by taking the screen projection source end as a mobile phone and the screen projection end as a smart TV as an example, wherein the screen projection source end may also be, for example, a tablet computer, a laptop computer, a desktop computer or a TV, and the screen projection end may also be, for example, a tablet computer, a laptop computer, a desktop computer or a mobile phone, etc., and the present application does not limit this.

[0243] In an embodiment of the present application, when an interface with a floating window displayed on the first screen is projected onto the second screen, the horizontal and vertical display states of the floating window on the second screen can be adaptively switched according to the horizontal and vertical display states of the second screen (for example: kept in sync with the horizontal and vertical display states of the second screen), thereby enabling users to have a better experience during screen projection.

[0244] For example, Fig.12 A schematic diagram of another interface for displaying a floating window provided in an embodiment of the present application is shown. This embodiment can be applied to a multi-screen collaboration scenario, for example.

[0245] like Fig.12 (a) and Fig.12 As shown in (b), electronic device 1200a and electronic device 1200b collaborate on multiple screens, electronic device 1200a is in a portrait display state, and a text message interface is displayed on the screen of electronic device 1200a, and electronic device 1200b is in a landscape display state, and a memo interface is displayed on the screen of electronic device 1200b. In addition, a floating window 1201 is also displayed on the current interface of the electronic device 1200b, and the horizontal and vertical screen display states of the floating window 1201 are synchronized with the horizontal and vertical screen display states of the electronic device 1200b, and are in a landscape display state.

[0246] Optionally, the screen of electronic device 1200b is an extended screen of electronic device 1200a, and the content displayed on electronic device 1200b (eg, memo interface, floating window 1201) is extended from electronic device 1200a to the display screen of electronic device 1200b.

[0247] It should be understood that in order to describe the solution provided by the present application more clearly, the embodiments in the present application are described using the multi-screen collaborative devices as mobile phones and smart TVs as examples, wherein the multi-screen collaborative devices can also be any combination of tablet computers, laptop computers, desktop computers, mobile phones or TVs, etc., and the present application does not limit this.

[0248] In an embodiment of the present application, when multiple screens are performing multi-screen collaboration, the user can expand the floating window to display on any of the multiple screens as needed, and the horizontal and vertical screen display states of the floating window can be adaptively switched according to the horizontal and vertical screen display states of the arbitrary screen (for example: kept in sync with the horizontal and vertical screen display states of the arbitrary screen), thereby enabling the user to have a better experience in the process of using multi-screen collaboration.

[0249] The following, exemplary, combined Figures 13 to 17 , a method for displaying a floating window provided in an embodiment of the present application is introduced in detail.

[0250] For example, Fig.13FIG. 1 is a schematic flow chart of a method 1300 for displaying a floating window provided in an embodiment of the present application. Fig.13 As shown, the method 1300 includes:

[0251] S1301: In response to a user triggering an operation of displaying a first floating window on a screen of a first electronic device, determining a display state of the first electronic device.

[0252] Among them, the first floating window can be, for example, a floating window corresponding to an application running on the first electronic device, or a floating window corresponding to a functional interface corresponding to an application running on the first electronic device, for example, it can be a floating window for playing a video, a floating window corresponding to a chat interface, or a floating window corresponding to a circle of friends interface, etc.

[0253] The operation of triggering the display of the first floating window on the screen of the first electronic device may be, for example, triggering the display of the first floating window corresponding to the application through a recent task list; it may also be triggering the display of the first floating window through a setting function of the first electronic device; it may also be automatically triggering the display of the first floating window when the application retreats to the background; it may also be other operations that trigger the display of the first floating window, such as projecting or expanding the first floating window onto the screen of the first electronic device, which is not limited in the present application.

[0254] Among them, the display state of the first electronic device includes a horizontal display state or a vertical display state, wherein the horizontal display state refers to the horizontal display of the content displayed on the screen of the first electronic device, and the vertical display state refers to the vertical display of the content displayed on the screen of the first electronic device.

[0255] Similarly, the display state of the first floating window includes a horizontal screen display state or a vertical screen display state, wherein the horizontal screen display state means that the first floating window is displayed horizontally on the screen of the electronic device, and the content displayed in the first floating window is relative to the horizontal screen display of the first floating window (see Figure 6 The vertical screen display state refers to the vertical screen display of the first floating window on the screen of the electronic device, and the content displayed in the first floating window is relative to the vertical screen display of the first floating window (see Figure 6 The display status of the floating window 601 shown in (b) in the figure); the display status of the electronic device and the display status of the floating window described in other implementations of the present application are all applicable to this explanation. For the sake of brevity, they will not be repeated in the subsequent identical descriptions.

[0256] S1302: When the display state of the first electronic device is a horizontal screen display state, a first floating window is displayed horizontally on the screen of the first electronic device.

[0257] S1303: When the display state of the first electronic device is a vertical screen display state, display a first floating window vertically on the screen of the first electronic device.

[0258] That is to say, in the embodiment of the present application, the display state of the first floating window triggered to be displayed on the first electronic device is the same as the display state of the first electronic device.

[0259] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window triggered on the electronic device is the same as the current horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the scaling degree of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0260] For example, Fig.14 FIG. 1 is a schematic flow chart of another method 1400 for displaying a floating window provided in an embodiment of the present application. Fig.14 As shown, when a first floating window is displayed on a screen of a first electronic device, and both the first electronic device and the first floating window are in a vertical display state, the method 1400 includes:

[0261] S1401: When the display state of the first electronic device is switched from the portrait display state to the landscape display state, the display state of the first floating window is switched from the portrait display state to the landscape display state.

[0262] Among them, the explanation of the first floating window is in Fig.13 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.

[0263] In an embodiment of the present application, the horizontal or vertical screen display state of the floating window displayed on the screen of the electronic device is the same as the horizontal or vertical screen display state of the electronic device, and will adaptively switch with the switching of the horizontal or vertical screen display state of the electronic device. In this way, when the electronic device is in the vertical screen display state, the floating window is also in the vertical screen display state, which can well adapt to the user's viewing habits; and, when the electronic device is in the horizontal screen display state, the floating window is also in the horizontal screen display state, which can make full use of the display space of the floating window and reduce the scaling degree of the content in the floating window, thereby significantly improving the user's viewing experience and usage experience.

[0264] For example, Fig.15 FIG. 1 is a schematic flow chart of another method 1500 for displaying a floating window provided in an embodiment of the present application. Fig.15 As shown, when a first floating window is displayed on a screen of a first electronic device, and both the first electronic device and the first floating window are in a vertical display state, the method 1500 includes:

[0265] S1501: In response to a user clicking on a first control on a first floating window, the display state of the first floating window is switched from a vertical screen display to a horizontal screen display, and the display state of the first floating window is locked to a horizontal screen display state.

[0266] The first control is used by the user to switch the horizontal and vertical screen display states of the first floating window.

[0267] S1502: When the display state of the first electronic device changes, the display state of the first floating window remains in the horizontal screen display state.

[0268] In one achievable method, based on S1501, when the display state of the first electronic device is switched from the portrait display state to the landscape display state, the display state of the first floating window remains in the landscape display state; when the display state of the first electronic device continues to switch from the landscape display state to the portrait display state, the display state of the first floating window still remains in the landscape display state.

[0269] That is to say, when the user manually switches the horizontal or vertical screen display state of the floating window, the display state of the floating window is locked to remain unchanged after the switch. Unless it is unlocked, the display state of the floating window no longer changes with the horizontal or vertical screen display state of the electronic device.

[0270] S1503: In response to the user clicking the first control again, the display state of the first floating window is synchronized with the display state of the first electronic device.

[0271] In one achievable method, based on S1501, when the display state of the first electronic device is switched from the portrait display state to the landscape display state, the display state of the first floating window remains in the landscape display state; when the display state of the first electronic device continues to switch from the landscape display state to the portrait display state, the display state of the first floating window still remains in the landscape display state; on this basis, if the user clicks on the first control again, the display state of the first floating window is switched from the landscape display state to the portrait display state, so as to be consistent with the display state of the electronic device, and without manual switching (or locking), the display state of the first floating window is consistent with the display state of the first electronic device, and switches as the display state of the first electronic device switches.

[0272] Similarly, in some embodiments, when a first floating window is displayed on the screen of a first electronic device and both the first electronic device and the first floating window are in a horizontal display state, in response to a user clicking on a first control on the first floating window, the display state of the first floating window is switched from a horizontal display to a vertical display, and the display state of the first floating window is locked in a vertical display state.

[0273] In an embodiment of the present application, a user can manually switch the horizontal or vertical display state of the floating window, and lock it after manual switching, thereby enabling the floating window to be displayed horizontally when the display state of the electronic device is in vertical display, and enabling the floating window to be displayed vertically when the display state of the electronic device is in horizontal display. This can adapt to the user's various viewing or usage needs, thereby improving the user's usage experience.

[0274] For example, Fig.16 FIG. 1 is a schematic flow chart of another method 1600 for displaying a floating window provided in an embodiment of the present application. Fig.16 As shown, when a first floating window is displayed on the screen of the first electronic device, the method 1600 includes:

[0275] S1601: In response to the user's operation of projecting the display interface of the first electronic device onto the screen of the second electronic device, a second floating window is displayed on the screen of the second electronic device, and the display state of the second floating window is the same as the display state of the second electronic device, and the content of the second floating window is the same as the content of the first floating window.

[0276] In one example, the display state of the first electronic device is a portrait display state, the display state of a first floating window displayed on the screen of the first electronic device is also a portrait display state, and the display state of the second electronic device is a landscape display state; on this basis, when the user projects the display interface of the first electronic device onto the screen of the second electronic device, the display interface of the first electronic device is displayed in landscape on the screen of the second electronic device, and a second floating window is displayed on the screen of the second electronic device, the display state of the second floating window is also a landscape display state, and the content of the second floating window is the same as that of the first floating window.

[0277] It can be understood that the screen projection method of the embodiment of the present application can be homologous screen projection or heterologous screen projection.

[0278] In an embodiment of the present application, in a screen projection scenario, the display status of the floating window displayed on the projected end is consistent with the display status of the projected end device, rather than being consistent with the display status of the projection source end device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0279] For example, Fig.17 FIG. 1 is a schematic flow chart of another method 1700 for displaying a floating window provided in an embodiment of the present application. Fig.17 As shown, when a first floating window is displayed on the screen of the first electronic device, the method 1700 includes:

[0280] S1701: In response to the user's operation of expanding the first floating window to the screen of the third electronic device, a third floating window is displayed on the screen of the third electronic device, the display state of the third floating window is the same as the display state of the third electronic device, and the content of the third floating window is the same as the content of the first floating window.

[0281] In one example, the display state of the first electronic device is a portrait display state, the display state of the first floating window displayed on the screen of the first electronic device is also a portrait display state, and the display state of the third electronic device is a landscape display state; on this basis, when the user expands the first floating window to the screen of the third electronic device, a third floating window is displayed on the screen of the third electronic device, the display state of the third floating window is also a landscape display state, and the content of the third floating window is the same as that of the first floating window.

[0282] Optionally, the user may drag the first floating window to expand the first floating window to be displayed on the screen of the third electronic device.

[0283] In an embodiment of the present application, in a multi-screen collaboration scenario, the display status of the floating window displayed on the extended screen is consistent with the display status of the extended screen, rather than consistent with the display status of the source device. In this way, the display space of the floating window can be fully utilized, allowing users to have a better viewing experience.

[0284] To understand more clearly Fig.16 The interaction between the first electronic device and the second electronic device in the embodiment shown is, for example, Fig.18 FIG. 1 shows an interactive schematic diagram corresponding to a mirror screen projection method 1800 provided in an embodiment of the present application. Fig.18 As shown, a first electronic device and a second electronic device establish a connection, the first electronic device is a screen projection source, and the second electronic device is a screen projection target. The method 1800 includes:

[0285] S1801: A first electronic device sends a first request message to a second electronic device, where the first request message is used to obtain device information of the second electronic device, wherein the device information of the second electronic device includes horizontal and vertical screen display state information of the second electronic device.

[0286] S1802: The second electronic device sends a first reply message to the first electronic device, where the first reply message includes device information of the second electronic device.

[0287] S1803: The first electronic device creates a first virtual screen.

[0288] The first electronic device creates a first virtual screen based on the first reply message, and the horizontal and vertical screen display states of the first virtual screen are the same as the horizontal and vertical screen display states of the second electronic device.

[0289] The interface content of the first virtual screen is the same as the interface content displayed on the screen of the first electronic device.

[0290] S1804: The second electronic device creates a second virtual screen.

[0291] The horizontal and vertical screen display states of the second virtual screen are the same as the horizontal and vertical screen display states of the second electronic device.

[0292] It should be understood that S1803 and S1804 may be executed simultaneously or one after another.

[0293] S1805: The first electronic device sends a first coded message to the second electronic device, where the first coded message is used to represent the interface display content of the first electronic device (which can also be understood as the interface content of the first virtual screen).

[0294] Optionally, the first electronic device encodes a video stream corresponding to the interface display content of the first electronic device to obtain a first encoded message.

[0295] S1806: The second electronic device obtains a video stream corresponding to the interface display content of the first electronic device by decoding the first coded message.

[0296] After the second electronic device obtains the video stream corresponding to the interface display content of the first electronic device, it draws it on the second virtual screen.

[0297] S1807: The second electronic device displays an interface corresponding to the video stream based on the second virtual screen.

[0298] S1808: When the display interface of the first electronic device changes, the first electronic device updates the change to the first virtual screen.

[0299] S1809: The first electronic device sends a first update message to the second electronic device, where the first update message is used to indicate updated interface information.

[0300] S1810: The second electronic device updates the display interface of the second electronic device according to the first update message.

[0301] It can also be understood that the above step S1802 is not executed only once, but can be performed periodically, or when the device information of the second electronic device changes (for example, the horizontal or vertical screen display state switches). In this way, when the horizontal or vertical screen display state of the second electronic device switches, the horizontal or vertical screen display state of the first virtual screen can also be synchronized in time.

[0302] For example, Fig.19FIG. 1 shows an interaction diagram corresponding to a heterogeneous screen projection method 1900 provided in an embodiment of the present application. Fig.19 As shown, a first electronic device and a second electronic device establish a connection, the first electronic device is a screen projection source, and the second electronic device is a screen projection target. The method 1900 includes:

[0303] S1901: A first electronic device sends a first request message to a second electronic device, where the first request message is used to obtain device information of the second electronic device, wherein the device information of the second electronic device includes horizontal and vertical screen display state information of the second electronic device.

[0304] S1902: The second electronic device sends a first reply message to the first electronic device, where the first reply message includes device information of the second electronic device.

[0305] S1903: The first electronic device creates a third virtual screen.

[0306] The first electronic device creates a third virtual screen based on the first reply message, and the horizontal and vertical screen display states of the third virtual screen are the same as those of the second electronic device.

[0307] The interface content of the third virtual screen is the same as the interface content displayed on the screen of the first electronic device.

[0308] S1904: The second electronic device creates a fourth virtual screen.

[0309] The horizontal and vertical screen display states of the fourth virtual screen are the same as the horizontal and vertical screen display states of the second electronic device.

[0310] S1905: The first electronic device sends a first coded message to the second electronic device, where the first coded message is used to represent the interface display content of the first electronic device (which can also be understood as the interface content of the third virtual screen).

[0311] Optionally, the first electronic device encodes a video stream corresponding to the interface display content of the first electronic device to obtain a first encoded message.

[0312] S1906: The second electronic device obtains a video stream corresponding to the interface display content of the first electronic device by decoding the first coded message.

[0313] After the second electronic device obtains the video stream corresponding to the interface display content of the first electronic device, it draws it on the fourth virtual screen.

[0314] S1907: The second electronic device displays an interface corresponding to the video stream based on the fourth virtual screen.

[0315] S1908: After the first application is switched to full screen on the second electronic device, when the interface changes, the change is updated to the fourth virtual screen.

[0316] The first application may be an interface application or a floating window application.

[0317] S1909: Displaying an updated interface on the screen of the second electronic device based on the updated fourth virtual screen.

[0318] S1910: When the first application exits the full screen, the updated interface is synchronized to the third virtual screen and displayed on the screen of the first electronic device.

[0319] It is understandable that: Fig.17 The interaction diagram corresponding to the multi-screen collaboration scenario in the embodiment shown is Fig.19 The interaction methods described in the illustrated embodiments are similar and will not be described again for the sake of brevity.

[0320] For example, Fig. 20 FIG. 2 shows a functional module diagram of a device 2000 for displaying a floating window provided in an embodiment of the present application. Fig. 20 As shown, the device 2000 includes:

[0321] The determination module 2010 is configured to determine a display state of the first electronic device in response to a user triggering an operation of displaying a first floating window on the screen of the first electronic device.

[0322] Among them, the explanation of the first floating window is in Fig.13 The embodiments shown are described in detail, and for the sake of brevity, they will not be repeated here.

[0323] The operation of triggering displaying the first floating window on the screen of the first electronic device is Fig.13 The embodiments shown are described in detail, and for the sake of brevity, they will not be repeated here.

[0324] The display state of the first electronic device and the display state of the first floating window are also Fig.13 The embodiments shown are described in detail, and for the sake of brevity, they will not be repeated here.

[0325] The display module 2020 is configured to display the first floating window in a horizontal screen on the screen of the first electronic device when the display state of the first electronic device is a horizontal screen display state.

[0326] The display module 2020 is further configured to display the first floating window in vertical orientation on the screen of the first electronic device when the display state of the first electronic device is in vertical orientation.

[0327] In an achievable manner, when a first floating window is displayed on a screen of a first electronic device, and both the first electronic device and the first floating window are in a vertical display state, the apparatus 2000 further includes:

[0328] The switching module 2030 is used to switch the display state of the first floating window from the vertical screen display state to the horizontal screen display state when the display state of the first electronic device is switched from the vertical screen display state to the horizontal screen display state.

[0329] In yet another achievable manner, when a first floating window is displayed on a screen of a first electronic device, and both the first electronic device and the first floating window are in a vertical display state:

[0330] The switching module 2030 is also used to switch the display state of the first floating window from vertical screen display to horizontal screen display in response to the user clicking the first control on the first floating window, and lock the display state of the first floating window to the horizontal screen display state.

[0331] The first control is used by the user to switch the horizontal and vertical screen display states of the first floating window.

[0332] For example, Fig.21 A schematic diagram of functional modules corresponding to a screen projection system provided in an embodiment of the present application is shown. Fig.21 As shown, the system includes a first electronic device 2100a and a second electronic device 2100b, wherein the first electronic device 2100a includes an image synthesis module 2101, a DSS synthesis module 2102, a graphics processing unit (GPU) synthesis module 2103, a first display module 2104, an encoding module 2105 and a first transceiver module 2106; the second electronic device 2100b includes a second transceiver module 2107, a decoding module 2108, a synchronization module 2109 and a second display module 2110. Specifically:

[0333] The image synthesis module 2101 and the DSS synthesis module 2102 are used to synthesize the interface to be displayed of the first electronic device 2100a.

[0334] The image synthesis module 2101 and the GPU synthesis module 2103 are used to synthesize the interface to be displayed of the second electronic device 2100b according to the interface to be displayed of the first electronic device 2100a and the device information of the second electronic device 2100b.

[0335] The first display module 2104 is used to display the interface to be displayed of the first electronic device 2100a on the screen of the first electronic device 2100a.

[0336] The encoding module 2105 is used to encode information related to the to-be-displayed interface of the second electronic device 2100b (for example, related video stream) to obtain a first encoded message.

[0337] The first transceiver module 2106 is used to send the first coded message to the second electronic device 2100b.

[0338] Optionally, the first transceiver module 2106 encrypts and packages the first encoded message (for example, real-time transport protocol (RTP) packaging), and then sends it to the second electronic device 2100b via a virtual LAN trunking protocol (VLAN trunking protocol, VTP) or a transmission control protocol (transmission control protocol, TCP).

[0339] The second transceiver module 2107 is used to receive a first coded message sent by the first electronic device 2100a.

[0340] Optionally, the second transceiver module 2107 receives the first coded message sent by the first electronic device 2100a through a virtual local area network trunking protocol (VLAN trunking protocol, VTP) or a transmission control protocol (transmission control protocol, TCP).

[0341] The decoding module 2108 is used to decode the received first coded message to obtain information related to the interface to be displayed on the second electronic device 2100b.

[0342] When the received first coded message is an encrypted message, it is decrypted according to the real-time transport protocol (RTP) and then decoded by the decoding module 2108 .

[0343] The synchronization module 2109 is used to synchronize the received information related to the interface to be displayed of the second electronic device 2100b to the interface to be displayed of the second electronic device 2100b.

[0344] The second display module 2110 is used to display the synchronized interface to be displayed of the second electronic device 2100b on the screen of the second electronic device 2100b.

[0345] The present application also provides an electronic device, which includes: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, and when the instructions are executed by the one or more processors, the electronic device executes the following Figures 5 to 19 The method of any one of the embodiments shown in .

[0346] One or more of the modules or units described herein can be implemented by software, hardware or a combination of the two. When any of the above modules or units are implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor may include but is not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor and other types of computing devices that run software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor may be built into an SoC (system on chip) or an application specific integrated circuit (ASIC), or it may be an independent semiconductor chip. In addition to the core used to execute software instructions for operations or processing in the processor, necessary hardware accelerators may be further included, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements a dedicated logic operation.

[0347] When the modules or units described in this document are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a DSP, an MCU, an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator, or a non-integrated discrete device, which can run the necessary software or be independent of the software to execute the above method flow.

[0348] When the modules or units described herein are implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.

[0349] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0350] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0351] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0352] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0353] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0354] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0355] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for displaying a floating window, characterized in that: The method comprises: In response to a user triggering an operation of displaying a first floating window on a screen of a first electronic device, determining a display state of the first electronic device, where the display state of the first electronic device includes a horizontal screen display or a vertical screen display; When the display state of the first electronic device is horizontal screen display, the first floating window is displayed horizontally on the screen of the first electronic device; or, When the display state of the first electronic device is vertical screen display, the first floating window is displayed vertically on the screen of the first electronic device.

2. The method according to claim 1, characterized in that The method further comprises: When the display state of the first electronic device is switched from horizontal screen display to vertical screen display, the display state of the first floating window is switched from horizontal screen display to vertical screen display; or, When the display state of the first electronic device is switched from vertical screen display to horizontal screen display, the display state of the first floating window is switched from vertical screen display to horizontal screen display.

3. The method according to claim 1 or 2, characterized in that: The first floating window includes a first control, and the method further includes: In response to the user clicking the first control, the display state of the first floating window is switched, and the display state of the first floating window is locked to the switched display state.

4. The method according to claim 3, characterized in that In response to the user clicking the first control, the display state of the first floating window is switched, including: When the display state of the first electronic device and the display state of the first floating window are both vertical screen displays, in response to the user clicking the first control, the display state of the first floating window is switched from vertical screen display to horizontal screen display.

5. The method according to claim 3 or 4, characterized in that: The method further comprises: In response to the user clicking the first control again, the display state of the first floating window is synchronized with the display state of the first electronic device.

6. The method according to any one of claims 1, 2 or 5, characterized in that: The first floating window includes a second control, and the method further includes: In response to the user clicking the second control, the display state of the first floating window is locked as the current display state.

7. The method according to claim 6, characterized in that The method further comprises: In response to the user clicking on the second control again, the display state of the first floating window is synchronized with the display state of the first electronic device.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: In response to a first operation of the user, first display information is sent to a second electronic device, the first display information is used to display a second floating window on the screen of the second electronic device, the display state of the second floating window is the same as the display state of the second electronic device, and the display content of the second floating window is generated based on the display content of the first floating window.

9. The method according to claim 8, characterized in that The method comprises: receiving device information of the second electronic device sent by the second electronic device, where the device information of the second electronic device includes a display state of the second electronic device; The first display information is generated according to the device information of the second electronic device and the display interface of the first electronic device.

10. The method according to claim 8 or 9, characterized in that: The first operation is to project the display interface of the first electronic device onto the screen of the second electronic device. The first display information includes a video stream corresponding to the interface of the first virtual screen. The display state of the first virtual screen is the same as the display state of the second electronic device. The display content of the first virtual screen is generated based on the display content of the first electronic device.

11. The method according to claim 8 or 9, characterized in that: The first operation is an operation of migrating the first floating window to the screen of the second electronic device, the first display information includes a video stream corresponding to the interface of the third virtual screen, the display state of the third virtual screen is the same as the display state of the second electronic device, and the display content of the third virtual screen is generated based on the display content of the first floating window.

12. A method for displaying a floating window, characterized in that: The method comprises: The current display state of the first electronic device is the first display state, When the display state of the first electronic device is switched from the first display state to the second display state, the display state of the first floating window displayed on the screen of the first electronic device is switched from the first display state to the second display state. The first display state includes horizontal screen display or vertical screen display, the second display state includes horizontal screen display or vertical screen display, and the first display state is different from the second display state.

13. The method according to claim 12, characterized in that The first floating window includes a first control, and the method further includes: In response to the user clicking the first control, the display state of the first floating window is switched, and the display state of the first floating window is locked to the switched display state.

14. The method according to claim 12, characterized in that The first floating window includes a second control, and the method further includes: In response to the user clicking the second control, the display state of the first floating window is locked as the current display state.

15. A method for displaying a floating window, characterized in that: The method further comprises: The second electronic device receives the first display information sent by the first electronic device, and a first floating window is currently displayed on the screen of the first electronic device; The second electronic device displays a second floating window on the screen of the second electronic device according to the first display information. The display state of the second floating window is the same as the display state of the second electronic device, and the display state includes horizontal screen display or vertical screen display. The display content of the second floating window is generated according to the display content of the first floating window.

16. The method according to claim 15, characterized in that The method further comprises: The second electronic device sends device information of the second electronic device to the first electronic device, where the device information of the second electronic device includes a display state of the second electronic device, and the device information of the second electronic device is used by the first electronic device to generate the first display information.

17. The method according to claim 15 or 16, characterized in that The first display information includes a video stream corresponding to an interface of a first virtual screen, a display state of the first virtual screen is the same as a display state of the second electronic device, and display content of the first virtual screen is generated according to display content of the first electronic device.

18. The method according to claim 15 or 16, characterized in that The first display information includes a video stream corresponding to an interface of a third virtual screen, a display state of the third virtual screen is the same as a display state of the second electronic device, and display content of the third virtual screen is generated based on display content of the first floating window. When the second floating window is displayed on the screen of the second electronic device, the first floating window is not displayed on the screen of the first electronic device.

19. An electronic device, characterized in that: include: one or more processors; one or more memories; And one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, enable the electronic device to perform the method as described in any one of claims 1 to 11, or, perform the method as described in any one of claims 12 to 14, or, perform the method as described in any one of claims 15 to 18.

20. A computer-readable storage medium, characterized in that: The storage medium stores a program or instruction. When the program or instruction is executed, the method according to any one of claims 1 to 11 is implemented, or the method according to any one of claims 12 to 14 is implemented, or the method according to any one of claims 15 to 18 is implemented.

21. A chip, characterized in that: The chip stores instructions, and when the instructions are executed on the device, the chip executes the method as claimed in any one of claims 1 to 11, or executes the method as claimed in any one of claims 12 to 14, or executes the method as claimed in any one of claims 15 to 18.