Method for displaying a plurality of windows in split-screen manner, and electronic device
The present invention provides a method for displaying a plurality of windows in a split-screen manner, applied to an electronic device. The electronic device displays a first window in full screen, detects a screen splitting operation of a user on the first window, responds to the screen splitting operation, and displays a second window on one side of the first window, to display the first window and the second window in the split-screen manner.
1. A method, comprising:
displaying a first window;
detecting a screen splitting operation of a user on the first window, wherein the screen splitting operation is a continuous sliding operation, and a sliding distance of the screen splitting operation is greater than or equal to a first distance threshold, or a sliding duration of the screen splitting operation is greater than or equal to a first duration threshold; and
responding to the screen splitting operation of the user, and displaying at least part of a second window on a side of the first window in a split-screen manner, wherein the second window fills an area of a screen on a side of the first window, or the second window is an operable window comprising at least one sub-window; and wherein:
the second window fills the area of the screen on the side of the first window, and display content in the second window comprises: content that is previously browsed by the user, a desktop of an operating system, an application that is most frequently browsed by the user in a recent period of time, a set of icons of applications that are usable for split-screen display, or the display content in the first window; or
the second window is the operable window comprising the at least one sub-window, and display content in the at least one sub-window comprised in the second window comprises:
content that is previously browsed by the user, a desktop of an operating system, an application that is most frequently browsed by the user in a recent period of time, a set of icons of applications that are usable for split-screen display, or the display content in the first window.
2. The method according to claim 1 , wherein in a process of displaying the at least part of the second window on the side of the first window, display of the first window and the second window change as follows:
in a process of the screen splitting operation, display positions of the first window and the second window are moved in a sliding direction of the screen splitting operation, a display size of the first window decreases, and a display size of the second window increases; or
in a process of the screen splitting operation, a format of display content in the first window changes with the screen splitting operation in a manner that the format of the display content in the first window adapts to a display size of the first window; or
in a process of the screen splitting operation, a display position and a display size of the first window remain unchanged, and after the screen splitting operation ends, the second window is directly displayed on the side of the first window.
3. The method according to claim 1 , wherein when an application corresponding to an icon comprised on the desktop of the operating system cannot be displayed in the split-screen manner, the icon corresponding to the application that cannot be displayed in the split-screen manner is displayed in gray.
4. The method according to claim 1 , wherein an arrangement manner of sub-windows of the at least one sub-window is a single-row arrangement manner, a single-column arrangement manner, or a multi-row and multi-column arrangement manner.
5. The method according to claim 1 , wherein responding to the screen splitting operation comprises:
detecting whether a window split-screen mode corresponding to the screen splitting operation matches a format of display content in the first window, wherein the window split-screen mode is an arrangement manner in which the first window and the second window are displayed in the split-screen manner; and
when the window split-screen mode corresponding to the screen splitting operation does not match the format of the display content in the first window, prompting the user to change the screen splitting operation, to change the corresponding window split-screen mode.
6. The method according to claim 1 , wherein the second window fills the area of the screen on the side of the first window, and after responding to the screen splitting operation, the method further comprises:
detecting a secondary screen splitting operation of the user on the second window; and
replacing the second window with a third window in response to the secondary screen splitting operation, wherein the third window fills an area of the screen, or the third window is an operable window comprising at least one sub-window.
7. The method according to claim 6 , wherein:
the secondary screen splitting operation is a continuous sliding operation, and a sliding distance of the secondary screen splitting operation is greater than or equal to a second distance threshold, or a sliding duration of the secondary screen splitting operation is greater than or equal to a second duration threshold; or
the secondary screen splitting operation is a continuous sliding operation, the secondary screen splitting operation and the screen splitting operation are a continuous operation, and a sum of sliding distances of the screen splitting operation and the secondary screen splitting operation is greater than or equal to a third distance threshold, or a sum of sliding durations of the screen splitting operation and the secondary screen splitting operation is greater than or equal to a third duration threshold; or
the secondary screen splitting operation is sliding from any corner of the second window to the inside of the second window; or
the secondary screen splitting operation is that at least two fingers slide to the inside of the second window at the same time; or
the secondary screen splitting operation is sliding upward from a preset area at a bottom of the second window or sliding downward from a preset area at a top of the third window.
8. The method according to claim 1 , wherein before detecting the screen splitting operation of the user on the first window, the method further comprises:
detecting a trigger operation of the user on the first window, wherein the trigger operation is a continuous sliding operation, a sliding distance of the trigger operation is greater than or equal to a fourth distance threshold, or a sliding duration of the trigger operation is greater than or equal to a fourth duration threshold, and wherein the fourth distance threshold is less than the first distance threshold, and the fourth duration threshold is less than the first duration threshold; and
in response to the trigger operation, enabling a split-screen display function of an electronic device.
9. An electronic device, comprising:
a display;
a processor; and
a memory, wherein the display, the processor, and the memory are coupled, and the processor invokes program instructions in the memory based on an operation signal, to enable the electronic device to perform operations comprising:
displaying a first window;
detecting a screen splitting operation of a user on the first window, wherein the screen splitting operation is a continuous sliding operation, and wherein a sliding distance of the screen splitting operation is greater than or equal to a first distance threshold, or a sliding duration of the screen splitting operation is greater than or equal to a first duration threshold; and
responding to the screen splitting operation, and displaying at least part of a second window on a side of the first window in a split-screen manner, wherein the second window fills an area of a screen on a side of the first window, or the second window is an operable window comprising at least one sub-window; and wherein:
the second window fills the area of the screen on the side of the first window, and display content in the second window comprises: content that is previously browsed by the user, a desktop of an operating system, an application that is most frequently browsed by the user in a recent period of time, a set of icons of applications that are usable for split-screen display, and the display content in the first window; or
the second window is an operable window comprising at least one sub-window, and display content in the at least one sub-window comprised in the second window comprises:
content that is previously browsed by the user, a desktop of an operating system, an application that is most frequently browsed by the user in a recent period of time, a set of icons of applications that are usable for split-screen display, and the display content in the first window.
10. The electronic device according to claim 9 , wherein:
in a process of the screen splitting operation, display positions of the first window and the second window are moved in a sliding direction of the screen splitting operation, a display size of the first window decreases, and a display size of the second window increases; or
in a process of the screen splitting operation, a format of display content in the first window changes with the screen splitting operation in a manner that the format of the display content in the first window adapts to a display size of the first window; or
in a process of the screen splitting operation, a display position and a display size of the first window remain unchanged, and after the screen splitting operation ends, the second window is directly displayed on the one side of the first window.
11. The electronic device according to claim 9 , wherein an application corresponding to an icon comprised on the desktop of the operating system cannot be displayed in the split-screen manner, and the icon corresponding to the application that cannot be displayed in the split-screen manner is displayed in gray.
12. The electronic device according to claim 9 , wherein an arrangement manner of sub-windows of the at least one sub-window is a single-row arrangement manner, a single-column arrangement manner, or a multi-row and multi-column arrangement manner.
13. The electronic device according to claim 9 , wherein the operations further comprise:
detecting whether a window split-screen mode corresponding to the screen splitting operation matches a format of display content in the first window, wherein the window split-screen mode is an arrangement manner in which the first window and the second window are displayed in the split-screen manner; and
when the window split-screen mode corresponding to the screen splitting operation does not match the format of the display content in the first window, prompting the user to change the screen splitting operation, to change the corresponding window split-screen mode.
14. The electronic device according to claim 9 , wherein the operations further comprise:
when the second window fills the area of the screen on the side of the first window, detecting a secondary screen splitting operation of the user on the second window; and
replacing the second window with a third window in response to the secondary screen splitting operation, wherein the third window fills an area of the screen, or the third window is an operable window comprising at least one sub-window.
15. The electronic device according to claim 14 , wherein:
the secondary screen splitting operation is a continuous sliding operation, and a sliding distance of the secondary screen splitting operation is greater than or equal to a second distance threshold, or a duration of the secondary screen splitting operation is greater than or equal to a second duration threshold; or
the secondary screen splitting operation is a continuous sliding operation, the secondary screen splitting operation and the screen splitting operation are a continuous operation, and a sum of sliding distances of the screen splitting operation and the secondary screen splitting operation is greater than or equal to a third distance threshold, or a sum of sliding duration of the screen splitting operation and the secondary screen splitting operation is greater than or equal to a third duration threshold; or
the secondary screen splitting operation is sliding from any corner of the second window to the inside of the second window; or
the secondary screen splitting operation is that at least two fingers slide to the inside of the second window at the same time; or
the secondary screen splitting operation is sliding upward from a preset area at a bottom of the second window or sliding downward from a preset area at a top of the third window.
16. The electronic device according to claim 9 , wherein the operations further comprise:
detecting a trigger operation of the user on the first window, wherein the trigger operation is a continuous sliding operation, a sliding distance of the trigger operation is greater than or equal to a fourth distance threshold, or a sliding duration of the trigger operation is greater than or equal to a fourth duration threshold, and wherein the fourth distance threshold is less than the first distance threshold, and the fourth duration threshold is less than the first duration threshold; and
in response to the trigger operation, enabling a split-screen display function of the electronic device.
17. A non-transitory computer program storage medium storing instructions that are executable by at least one processor, wherein the instructions, when performed by an electronic device, cause the electronic device to perform:
displaying a first window;
detecting a screen splitting operation of a user on the first window, wherein the screen splitting operation is a continuous sliding operation, and a sliding distance of the screen splitting operation is greater than or equal to a first distance threshold, or a sliding duration of the screen splitting operation is greater than or equal to a first duration threshold; and
responding to the screen splitting operation, and displaying at least part of a second window on a side of the first window in a split screen manner, wherein the second window fills an area of a screen on a side of the first window, or the second window is an operable window comprising at least one sub-window; and wherein:
the second window fills the area of the screen on the side of the first window, and display content in the second window comprises: content that is previously browsed by the user, a desktop of an operating system, an application that is most frequently browsed by the user in a recent period of time, a set of icons of applications that are usable for split-screen display, and the display content in the first window; or
the second window is an operable window comprising at least one sub-window, and display content in the at least one sub-window comprised in the second window comprises: content that is previously browsed by the user, a desktop of an operating system, an application that is most frequently browsed by the user in a recent period of time, a set of icons of applications that are usable for split-screen display, and the display content in the first window.
18. The non-transitory computer program storage medium according to claim 17 , wherein the instructions, when performed by the electronic device, further cause the electronic device to perform:
detecting whether a window split-screen mode corresponding to the screen splitting operation matches a format of display content in the first window, wherein the window split-screen mode is an arrangement manner in which the first window and the second window are displayed in the split-screen manner; and
when the window split-screen mode corresponding to the screen splitting operation does not match the format of the display content in the first window, prompting the user to change the screen splitting operation, to change the corresponding window split-screen mode.