Search

US-20260126904-A1 - WINDOW INTERACTION METHOD AND ELECTRONIC DEVICE

US20260126904A1US 20260126904 A1US20260126904 A1US 20260126904A1US-20260126904-A1

Abstract

An electronic device displays a first interface by using the first display screen; the electronic device displays a second interface in response to a first operation on the first window or the second window; the second interface includes a first floating window, the first window, the second window, and the first slide bar; and a width of the first floating window is less than that of the first display screen, the first floating window is a non-modal dialog box, and the first floating window satisfies a first state.

Inventors

  • Chaojie Yan
  • Junfeng Liu

Assignees

  • HONOR DEVICE CO., LTD.

Dates

Publication Date
20260507
Application Date
20251229
Priority Date
20220110

Claims (20)

  1. 1 . A window interaction method, applied to an electronic device, the method comprises: displaying, by the electronic device, a first interface, wherein the first interface comprises a first window corresponding to a first application; receiving, by the electronic device, a first operation on the first interface; displaying, by the electronic device, a second interface, wherein the second interface comprises a first split-screen window corresponding to the first application, a second split-screen window corresponding to a second application, and a first slider; wherein the first application is different from the second application; displaying, by the electronic device, a first floating window in response to a second operation on the second interface, wherein the first floating window is displayed while hovering over the first split-screen window and not hovering over the second split-screen window; displaying, by the electronic device, a second floating window in response to a third operation on the second interface while displaying the first floating window, wherein the second floating window is displayed while hovering over the second split-screen window and not hovering over the first split-screen window.
  2. 2 . The method according to claim 1 , wherein the method further comprises: continuing to display the first floating window, by the electronic device, in response to a third operation on the second interface, wherein the first floating window is displayed floating over the first split-screen window and not floating over the second split-screen window.
  3. 3 . The method according to claim 1 , wherein the second operation is an operation on the first split-screen window, and the third operation is an operation on the second split-screen window.
  4. 4 . The method according to claim 1 , wherein the first split-screen window includes a first text, the second split-screen window includes a second text, and the method further comprises: displaying, by the electronic device, a first control in response to an operation on the first text, the second operation being an operation performed on the first control, the first control including a first copy option and a first translation option; displaying, by the electronic device, a second control in response to an operation on the second text, the third operation being an operation performed on the second control, the second control including a second copy option and a second translation option.
  5. 5 . The method according to claim 1 , wherein the first floating window and the second floating window correspond to a translation application, the first floating window including the first text and the translation result corresponding to the first text, and the second floating window including the second text and the translation result corresponding to the second text.
  6. 6 . The method according to claim 1 , further comprising: receiving, by the electronic device, a fourth operation on the first slider while displaying the first floating window and the second floating window; transforming, by the electronic device, the first split-screen window into a third split-screen window, the second split-screen window into a fourth split-screen window, the first floating window into a third floating window, and the second floating window into a fourth floating window; wherein the third floating window is displayed floating over the third split-screen window and not floating over the fourth split-screen window, and the fourth floating window is displayed floating over the fourth split-screen window and not floating over the third split-screen window; wherein the width of the third split-screen window is greater than the width of the first split-screen window, the width of the fourth split-screen window is less than the width of the second split-screen window, the width of the third floating window is greater than the width of the first floating window, and the width of the fourth floating window is less than the width of the second floating window.
  7. 7 . The method according to claim 6 , further comprising: receiving, by the electronic device, a fifth operation on the first slider while displaying the third floating window and the fourth floating window; ceasing, by the electronic device, to display the fourth split-screen window and the fourth floating window; and transforming, by the electronic device, the third split-screen window into a second window, the third floating window into the fifth floating window, wherein the fifth floating window is centrally displayed at the bottom of the second window, and the width of the second window is greater than the width of the first split-screen window.
  8. 8 . The method according to claim 6 , wherein the third split-screen window includes the first text, the fourth split-screen window includes the second text, the third floating window and the fourth floating window both correspond to a translation application. The third floating window includes the first text and the translation result corresponding to the first text, and the fourth floating window includes the second text and the translation result corresponding to the second text.
  9. 9 . The method according to claim 1 , further comprising: receiving, by the electronic device, a fifth operation on the first slider while displaying the first floating window and the second floating window; ceasing, by the electronic device, to display the second split-screen window and the second floating window; and transforming, by the electronic device, the first split-screen window into the second window, the first floating window into the fifth floating window, wherein the fifth floating window is centrally displayed at the bottom of the second window, and the width of the second window is greater than the width of the first split-screen window.
  10. 10 . The method according to claim 9 , wherein the fifth floating window corresponds to a translation application, the second window includes the first text, and the fifth floating window includes the first text and the translation result corresponding to the first text.
  11. 11 . The method according to claim 9 , wherein the width of the second window is equal to the width of the first window.
  12. 12 . The method according to claim 6 , wherein the first floating window is less than half the size of the first split-screen window, the second floating window is less than half the size of the second split-screen window, and the third floating window is less than half the size of the first split-screen window.
  13. 13 . The method according to claim 1 , further comprising: receiving, by the electronic device, an operation on a first region, wherein the first region the region of the second split-screen window excluding the second floating window; maintaining, by the electronic device, the first floating window unchanged; and ceasing, by the electronic device, to display the translation result corresponding to the second text.
  14. 14 . The method according to claim 1 , further comprising: receiving, by the electronic device, a sixth operation on the first interface; displaying, by the electronic device, a sixth floating window, wherein the sixth floating window is centrally displayed at the bottom of the second window.
  15. 15 . The method according to claim 14 , wherein the electronic device is a foldable screen device, the foldable screen device includes a first display screen and a second display screen, the first display screen is foldable, the fifth floating window is spaced a certain distance from the left and right sides of the first display screen, the sixth floating window is spaced a certain distance from the left and right sides of the first display screen, and the width of the sixth floating window is equal to the width of the fifth floating window.
  16. 16 . An electronic device, wherein the electronic device comprises a memory configured to store computer instructions, and when the electronic device executes the computer instructions, the electronic device performs the following operations: displaying, by the electronic device, a first interface, wherein the first interface comprises a first window corresponding to a first application; receiving, by the electronic device, a first operation on the first interface; displaying, by the electronic device, a second interface, wherein the second interface comprises a first split-screen window corresponding to the first application, a second split-screen window corresponding to a second application, and a first slider; wherein the first application is different from the second application; displaying, by the electronic device, a first floating window in response to a second operation on the second interface, wherein the first floating window is displayed while hovering over the first split-screen window and not hovering over the second split-screen window; displaying, by the electronic device, a second floating window in response to a third operation on the second interface while displaying the first floating window, wherein the second floating window is displayed while hovering over the second split-screen window and not hovering over the first split-screen window.
  17. 17 . The electronic device according to claim 16 , wherein when the electronic device executes the computer instructions, the electronic device further performs the following operations: continuing to display the first floating window, by the electronic device, in response to a third operation on the second interface, wherein the first floating window is displayed floating over the first split-screen window and not floating over the second split-screen window.
  18. 18 . The electronic device according to claim 16 , wherein the first floating window and the second floating window correspond to a translation application, the first floating window including the first text and the translation result corresponding to the first text, and the second floating window including the second text and the translation result corresponding to the second text.
  19. 19 . The electronic device according to claim 16 , wherein when the electronic device executes the computer instructions, the electronic device further performs the following operations: receiving, by the electronic device, a fourth operation on the first slider while displaying the first floating window and the second floating window; transforming, by the electronic device, the first split-screen window into a third split-screen window, the second split-screen window into a fourth split-screen window, the first floating window into a third floating window, and the second floating window into a fourth floating window; wherein the third floating window is displayed floating over the third split-screen window and not floating over the fourth split-screen window, and the fourth floating window is displayed floating over the fourth split-screen window and not floating over the third split-screen window; wherein the width of the third split-screen window is greater than the width of the first split-screen window, the width of the fourth split-screen window is less than the width of the second split-screen window, the width of the third floating window is greater than the width of the first floating window, and the width of the fourth floating window is less than the width of the second floating window.
  20. 20 . A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is run on an electronic device, the electronic device performs the following operations: displaying, by the electronic device, a first interface, wherein the first interface comprises a first window corresponding to a first application; receiving, by the electronic device, a first operation on the first interface; displaying, by the electronic device, a second interface, wherein the second interface comprises a first split-screen window corresponding to the first application, a second split-screen window corresponding to a second application, and a first slider; wherein the first application is different from the second application; displaying, by the electronic device, a first floating window in response to a second operation on the second interface, wherein the first floating window is displayed while hovering over the first split-screen window and not hovering over the second split-screen window; displaying, by the electronic device, a second floating window in response to a third operation on the second interface while displaying the first floating window, wherein the second floating window is displayed while hovering over the second split-screen window and not hovering over the first split-screen window.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of U.S. patent application Ser. No. 18/580,897, filed on Jan. 19, 2024, which is a U.S. National Stage of International Application No. PCT/CN 2023/071082, filed on Jan. 6, 2023, which claims priority to Chinese Patent Application No. 202210023810.3, filed on Jan. 10, 2022, and Chinese Patent Application No. 202210114778.X, filed on Jan. 30, 2022. All of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD This application relates to the field of terminal technologies, and in particular, to a window interaction method and an electronic device. BACKGROUND With the popularization and development of the Internet, people's functional requirements for electronic devices are also becoming more and more diverse. For example, to meet a requirement of a user for using multiple functions, a larger number of electronic devices may support display of floating windows of the electronic devices. For example, the user may trigger display of a floating window corresponding to a translation function by copying a to-be-translated text, and the user may also view translation content through the floating window corresponding to the translation function. However, when the user screen-splits a display interface, it is difficult for the electronic device to adjust the display of the floating window according to a requirement of the user for screen-splitting the interface, thereby affecting user experience. SUMMARY Embodiments of this application provide a window interaction method and an electronic device, so that the electronic device can appropriately display a floating window according to a requirement of a user for screen-splitting a display screen, thereby enhancing the user's experience of using the floating window. In a first aspect, an embodiment of this application provides a window interaction method, applied to an electronic device, the electronic device includes a first display screen, and the method includes: The electronic device displays a first interface by using the first display screen; the first interface includes a first window, a second window, and a first slide bar configured to resize the first window and the second window; and content displayed in the first window and content displayed in the second window both belong to a first application; and the electronic device displays a second interface in response to a first operation on the first window or the second window; the second interface includes a first floating window, the first window, the second window, and the first slide bar; and a width of the first floating window is less than that of the first display screen, the first floating window is a non-modal dialog box, and the first floating window satisfies a first state. In this way, the electronic device can appropriately display a floating window according to a requirement of a user for screen-splitting a display screen, thereby enhancing the user's experience of using the floating window. In a possible implementation, the second interface further includes a first region, the first region is a region in the second interface other than the first floating window, and the method further includes: The electronic device displays a third interface in response to a second operation on the first region; the third interface includes a second floating window, the second floating window satisfies a second state; and the second state is different from or the same as the first state. In this way, the electronic device can realize non-modality of the floating window, thereby enhancing the user's experience of using the floating window. In a possible implementation, the second operation includes: an operation of sliding the first slide bar to the first region in the second interface. In a possible implementation, the first state includes any one of a half-screen state, a full-screen state, and a bottom state; and the second state includes the bottom state. In a possible implementation, the method further includes: The electronic device displays a fourth interface in response to a third operation on the electronic device; the fourth interface includes a third floating window; and a width of the third floating window is less than that of the first display screen, and the third floating window satisfies the first state. In this way, the electronic device can realize flipping of the floating window according to screen flipping, to enhance the user's experience of using the floating window. In a possible implementation, the fourth interface is an interface of the electronic device in a landscape state when the second interface is an interface of the electronic device in a portrait state. In a possible implementation, the electronic device further includes a second display screen, and the method further includes: The electronic device displays a fifth interface in response to a fourth operation