VIEW SWITCHING METHOD AND APPARATUS FOR TOUCH SCREEN, AND CLIENT DEVICE
A view switching method includes: displaying a switching flag on a current view in response to a first particular gesture of a user on the current view, where the first particular gesture passes through a particular area of the current view, and switching from the current view to a target view associated with the switching flag, in response to ending of the first particular gesture or to a second particular gesture of the user on the current view. Smooth switching to a specified view can reduce errors caused by mis-operations of users, and provide users with fast, convenient, and graceful browsing experience.
1 . A view switching method for a touch screen, comprising:
displaying a switching flag on a current view in response to a first particular gesture of a user on the current view, wherein the first particular gesture passes through a particular area of the current view; and
switching from the current view to a target view associated with the switching flag, in response to ending of the first particular gesture or to a second particular gesture of the user on the current view.
2 . The method according to claim 1 , wherein the first particular gesture is one of the following:
a gesture starting from the particular area;
a gesture ending at the particular area;
a gesture passing by the particular area; or
tapping, double tapping, or pressing on the particular area.
3 . The method according to claim 2 , wherein the first particular gesture comprises a swiping action.
4 . The method according to claim 2 , wherein the first particular gesture comprises one of the following:
a swiping action starting from the particular area;
a swiping action ending at the particular area; or
a swiping action passing by the particular area.
5 . The method according to claim 3 , wherein the switching flag comprises at least an unstable display state and a stable display state, and the switching flag is stably displayed in the stable display state after the swiping action exceeds a predetermined distance or the touch screen is pressed for longer than a predetermined time.
6 . The method according to claim 1 , wherein the second particular gesture is an action of tapping or double tapping the switching flag.
7 . The method according to claim 1 , wherein the particular area is located at a lower part of the current view.
8 . The method according to claim 7 , the particular area is a text display bar adjacent to and above a tab located at the bottom of the current view.
9 . The method according to claim 8 , wherein the first particular gesture is an upward-swiping action starting from the text display bar.
10 . The method according to claim 1 , wherein the current view is a page displayed on the touch screen, and the target view is a home page of a site or an application.
11 . A non-transitory computer-readable storage medium storing instructions that, when executed by a processor of a computer system, cause the computer system to perform a method comprising:
displaying a switching flag on a current view in response to a first particular gesture of a user on the current view, wherein the first particular gesture passes through a particular area of the current view; and
switching from the current view to a target view associated with the switching flag, in response to ending of the first particular gesture or to a second particular gesture of the user on the current view.
12 . The non-transitory computer-readable storage medium according to claim 11 , wherein the first particular gesture comprises one of the following:
a swiping action starting from the particular area;
a swiping action ending at the particular area; or
a swiping action passing by the particular area.
13 . The non-transitory computer-readable storage medium according to claim 12 , wherein the switching flag comprises at least an unstable display state and a stable display state, and the switching flag display unit stably displays the switching flag in the stable display state after the swiping action exceeds a predetermined distance or the touch screen is pressed for longer than a predetermined time.
14 . The non-transitory computer-readable storage medium according to claim 11 , wherein the particular area is a text display bar adjacent to and above a tab located at the bottom of the current view, and the first particular gesture is an upward-swiping action starting from the text display bar.
15 . A client device, comprising:
a touch screen, configured to receive input information and display output information;
a memory that stores instructions; and
a processor, connected to the touch screen and the memory, wherein, when the processor executes the instructions, the processor is configured to:
display a switching flag on a current view of the touch screen in response to a first particular gesture of a user on the current view, wherein the first particular gesture passes through a particular area of the current view; and
switch from the current view to a target view associated with the switching flag, in response to ending of the first particular gesture or to a second particular gesture of the user on the current view.
16 . The client device according to claim 15 , wherein the first particular gesture is one of the following:
a gesture starting from the particular area;
a gesture ending at the particular area;
a gesture passing by the particular area; or
tapping, double tapping, or pressing on the particular area.
17 . The client device according to claim 15 , wherein the first particular gesture comprises a swiping action.
18 . The client device according to claim 15 , wherein the first particular gesture comprises one of the following:
a swiping action starting from the particular area;
a swiping action ending at the particular area; or
a swiping action passing by the particular area.
19 . The client device according to claim 15 , wherein the switching flag comprises at least an unstable display state and a stable display state, and the switching flag is stably displayed in the stable display state after the swiping action exceeds a predetermined distance or the touch screen is pressed for longer than a predetermined time.
20 . The client device according to claim 15 , the particular area is a text display bar adjacent to and above a tab located at the bottom of the current view.