CN111580662A - View scrolling control method and device, electronic equipment and storage medium - Google Patents

View scrolling control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111580662A
CN111580662A CN202010390388.6A CN202010390388A CN111580662A CN 111580662 A CN111580662 A CN 111580662A CN 202010390388 A CN202010390388 A CN 202010390388A CN 111580662 A CN111580662 A CN 111580662A
Authority
CN
China
Prior art keywords
view
gesture
global gesture
global
layer view
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010390388.6A
Other languages
Chinese (zh)
Inventor
徐一强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010390388.6A priority Critical patent/CN111580662A/en
Publication of CN111580662A publication Critical patent/CN111580662A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Abstract

The embodiment of the invention provides a method and a device for controlling view scrolling, electronic equipment and a storage medium. The method comprises the following steps: acquiring a global gesture for controlling view scrolling; if the initial position of the global gesture is located in the display area of the inner layer view, controlling the inner layer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture; determining a first length of content to be displayed of the inner layer view in a sliding direction of the global gesture; and when the rolling distance of the inner layer view reaches a first length, controlling the outer layer view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture. By applying the technical scheme provided by the embodiment of the invention, the problem that the inner layer view and the outer layer view cannot be controlled to roll through one coherent gesture of the user can be solved, and the user experience is improved.

Description

View scrolling control method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of application view technologies, and in particular, to a method and an apparatus for controlling view scrolling, an electronic device, and a storage medium.
Background
Currently, many applications have multiple scrollable views nested on their pages. The user can view the content displayed by the inner layer view and the content displayed by the outer layer view by controlling the inner layer view and the outer layer view to scroll through gestures.
However, in the above view scrolling control method, in order to implement the scrolling of the inner layer view and the scrolling of the outer layer view, a set of gestures for controlling scrolling are respectively set for the inner layer view and the outer layer view, and the scrolling of the inner layer view and the scrolling of the outer layer view are respectively controlled. This results in the inability to control the scrolling of the inner and outer views by a consistent gesture of the user, which is a poor user experience.
Disclosure of Invention
The embodiment of the invention aims to provide a view scrolling control method, a view scrolling control device, electronic equipment and a storage medium, so as to solve the problem that the scrolling of an inner view and an outer view cannot be controlled through one coherent gesture of a user and improve the user experience. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a method for controlling view scrolling, the method including:
acquiring a global gesture for controlling view scrolling;
if the starting position of the global gesture is located in the display area of the inner layer view, controlling the inner layer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture;
determining a first length of content to be displayed of the inner layer view in a swipe direction of the global gesture;
and when the rolling distance of the inner layer view reaches the first length, controlling the outer layer view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
Optionally, the method further includes:
and prohibiting a preset gesture for enabling the inner layer view and the outer layer view, wherein the sliding direction of the preset gesture is the same as the sliding direction of the global gesture.
Optionally, the method further includes:
and if the starting position of the global gesture is located in the display area of the outer layer view, controlling the outer layer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
Optionally, the method further includes:
determining a second length of content to be displayed of the skin view in a swipe direction of the global gesture;
when the rolling distance of the outer layer view reaches the second length, splicing preset pictures to be displayed for the outer layer view in the sliding direction of the global gesture to obtain a spliced view;
and controlling the spliced view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
Optionally, after controlling the stitched view to scroll in the sliding direction of the global gesture, the method further includes:
and if the global gesture is detected to be finished, controlling the spliced view to roll along the direction opposite to the sliding direction of the global gesture according to a preset speed until the content displayed in the display area of the outer layer view does not comprise the preset picture.
In a second aspect of the present invention, there is also provided a view scrolling control apparatus, the apparatus comprising:
the acquisition unit is used for acquiring a global gesture for controlling view scrolling;
the scrolling unit is used for controlling the inner layer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture if the initial position of the global gesture is located in the display area of the inner layer view;
the determining unit is used for determining a first length of the content to be displayed of the inner layer view in the sliding direction of the global gesture;
and the rolling unit is further used for controlling the outer layer view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture when the rolling distance of the inner layer view reaches the first length.
Optionally, the apparatus further comprises:
and the prohibiting unit is used for prohibiting a preset gesture for enabling the inner layer view and the outer layer view, and the sliding direction of the preset gesture is the same as that of the global gesture.
Optionally, the scrolling unit is further configured to, if the starting position of the global gesture is located in the display area of the outer view, control the outer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
Optionally, the apparatus further comprises a splicing unit;
the determining unit is further configured to determine a second length of the content to be displayed of the outer layer view in the sliding direction of the global gesture;
the splicing unit is used for splicing preset pictures to be displayed for the outer layer view in the sliding direction of the global gesture to obtain a spliced view when the rolling distance of the outer layer view reaches the second length;
and the scrolling unit is further used for controlling the spliced view to scroll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
Optionally, the scrolling unit is further configured to, after controlling the stitched view to scroll in the sliding direction of the global gesture, if it is detected that the global gesture is finished, control the stitched view to scroll in a direction opposite to the sliding direction of the global gesture according to a preset speed until content displayed in the display area of the outer view does not include the preset picture.
In a third aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any step of the control method for the view scrolling when executing the program stored in the memory.
In a third aspect implemented by the present invention, there is further provided a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any one of the steps of the above-mentioned control method for view scrolling.
In yet another aspect of the present invention, there is also provided a computer program which, when run on a computer, causes the computer to perform any of the steps of the above-described control method of view scrolling.
According to the technical scheme provided by the embodiment of the invention, a global gesture is added, when the initial position of the global gesture is positioned in the display area of the inner layer view, the global gesture is determined to be used for controlling the inner layer view to roll, and further controlling the inner layer view to roll along the sliding direction of the global gesture; and when the rolling distance of the inner layer view reaches the first length of the content to be displayed of the inner layer view, determining that the inner layer view can not roll any more, further determining that the global gesture is subsequently used for controlling the outer layer view to roll, and further controlling the outer layer view to roll in the sliding direction of the global gesture. Therefore, in the embodiment of the invention, the joint rolling of the inner-layer view and the outer-layer view is controlled through one global gesture, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic diagram of a page of an application according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a control method for view scrolling according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a control method for view scrolling according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a view scrolling control method according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of page view scrolling of an application provided by an embodiment of the invention;
FIG. 6 is a schematic illustration of view scrolling based on the view shown in FIG. 5;
FIG. 7 is a schematic diagram of a view scrolling control device according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a view scrolling control device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
For convenience of understanding, words appearing in the embodiments of the present invention are explained below.
And a scroll view (ScrollView), which means that if the display area of a view can only display part of the content of the view, the content of the hidden part of the view is displayed by sliding a scroll bar, and the view is a scroll view.
Currently, many applications have multiple scrollable views, called scroll views (ScrollView) for short, nested on the pages. The page shown in fig. 1, view 1, nests view 2 and view 3, and view 2 nests view 4. Wherein, the view 1, the view 2 and the view 4 are all scroll views (ScrollView), the view 1 is an outer layer view of the view 2, the view 2 is an inner layer view of the view 1, the view 2 is an outer layer view of the view 4, and the view 4 is an inner layer view of the view 2.
The scrolling directions of the scrolling view include scrolling in the vertical direction and scrolling in the horizontal direction. In order to realize the scrolling of the view 1, the view 2 and the view 4, a set of gesture for controlling scrolling is respectively set for the view 1, the view 2 and the view 4, the view 1 is controlled to scroll through the gesture set for the view 1, the view 2 is controlled to scroll through the gesture set for the view 2, and the view 4 is controlled to scroll through the gesture set for the view 4. In this case, it results that the inner view and the outer view cannot be controlled to scroll by one coherent gesture of the user. For example, the user controls view 2 to scroll through the gestures set for view 2; when the view 2 cannot be scrolled through the gesture control, the view 1 cannot be controlled by the gesture to move, and the user needs to input the gesture set for the view 1 again to control the view 1 to scroll.
In the view scrolling control method, the inner view and the outer view cannot be controlled to scroll through one coherent gesture of the user, and the user experience is poor.
To solve the above problem, an embodiment of the present invention provides a method for controlling view scrolling, as shown in fig. 2. The method can be applied to mobile terminals, tablet computers, computers and other equipment. For ease of understanding, the following description will be made with reference to an electronic device as an implementation subject, and is not intended to be limiting. The control method for the view scrolling comprises the following steps.
In step 201, a global gesture for controlling view scrolling is obtained.
Step 202, if the initial position of the global gesture is located in the display area of the inner layer view, controlling the inner layer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
Step 203, determining a first length of the content to be displayed of the inner layer view in the sliding direction of the global gesture.
And 204, when the rolling distance of the inner layer view reaches a first length, controlling the outer layer view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
According to the view scrolling control method provided by the embodiment of the invention, a global gesture is added, when the initial position of the global gesture is located in the display area of the inner layer view, the global gesture is determined to be used for controlling the inner layer view to scroll, and further the inner layer view is controlled to scroll along the sliding direction of the global gesture; and when the rolling distance of the inner layer view reaches the first length of the content to be displayed of the inner layer view, determining that the inner layer view can not roll any more, further determining that the global gesture is subsequently used for controlling the outer layer view to roll, and further controlling the outer layer view to roll in the sliding direction of the global gesture. Therefore, in the embodiment of the invention, the joint rolling of the inner-layer view and the outer-layer view is controlled through one global gesture, and the user experience is improved.
In step 201, the electronic device adds a global Gesture on the page, which can be added to a user interface plane Gesture recognition (UI Pan Gesture Recognizer) Gesture on the outer view. In one example, a global gesture may be added to a view, and the global gesture may be used to control scrolling of the view and its sub-views. Wherein the view can be used as an outer layer view and the sub-view of the view can be used as an inner layer view. In addition, the control direction of the global gesture may be a vertical direction, that is, the global gesture is a gesture for controlling scrolling in the vertical direction; the control direction of the global gesture can also be a horizontal direction, that is, the global gesture is a gesture for controlling the horizontal direction to roll; the control directions of the global gesture may also include a vertical direction and a horizontal direction. The embodiment of the invention does not limit the control direction of the global gesture.
When the electronic equipment is equipment with a touch display screen, a user can input gestures to the electronic equipment by touching the touch display screen; the electronic equipment acquires a gesture input by a user, and if the sliding direction of the gesture input by the user is in the control direction of the global gesture, the gesture input by the user is used as the global gesture for controlling the view to scroll. For example, the control direction of the global gesture is a vertical direction, and if the sliding direction of the gesture input by the user is vertically upward or vertically downward, the electronic device may determine that the sliding direction of the gesture input by the user is in the control direction of the global gesture, and the gesture input by the user is the global gesture.
When the electronic equipment is equipment with a camera, gestures made by a user; the electronic equipment can acquire gesture images of a user through a camera of the electronic equipment, and analyze the gesture images to obtain gestures made by the user; and if the sliding direction of the gesture input by the user is in the control direction of the global gesture, taking the gesture made by the user as the global gesture for controlling the view to scroll.
In the embodiment of the invention, the electronic device can also adopt other modes to acquire the global gesture for controlling the view to scroll.
In step 202, a plurality of scroll views are nested on a page of an application. After the electronic equipment acquires the global gesture, determining an initial position of the global gesture; whether the starting position of the global gesture is located in the display area of the inner layer view is detected. The inner layer view is a scrolling view. The inner view may be understood as the smallest scrolling view of the display area containing the starting position of the global gesture. If the electronic equipment detects that the initial position of the global gesture is located in the display area of the inner layer view, the global gesture is determined to be used for controlling the inner layer view to roll, and the inner layer view is controlled to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture. It will be appreciated that the speed of view scrolling is the same as the speed of the sliding of the global gesture, and therefore, the distance of view scrolling is the same as the distance of the sliding of the global gesture.
The page shown in fig. 1 is still used as an example for illustration. The starting position of the global gesture detected by the electronic device is located in the display area of the view 2, the sliding direction of the global gesture is vertically downward, the sliding speed of the global gesture is 2 centimeters per second, and the electronic device controls the view 2 to vertically scroll downward according to 2 centimeters per second.
In the embodiment of the present invention, the electronic device may obtain the linear speed of the global gesture sliding, which is referred to as the sliding speed for short, through the user interface dynamic behavior detection component according to the user interface dynamic behavior (UI dynamic behavior) detection component. In the embodiment of the present invention, the electronic device may also obtain the sliding speed of the global gesture according to other components.
In step 203, after acquiring the global gesture, the electronic device determines a first length of the content to be displayed of the inner layer view in the sliding direction of the global gesture. The content to be displayed is hidden content of the inner layer view which needs to be displayed in the sliding direction of the global gesture. For example, if the sliding direction of the global gesture is vertical downward, the content to be displayed in the inner layer view is the content hidden above the inner layer view; and if the sliding direction of the global gesture is vertical upwards, the content to be displayed of the inner layer view is the content hidden below the inner layer view.
In the embodiment of the present invention, the execution sequence of the step 202 and the step 203 is not limited.
In step 204, the outer view is a scrolling view including the inner view, i.e., the inner view is nested on the outer view. The electronic device detects whether the scroll distance of the view reaches a first length in real time. If the rolling distance of the inner layer view is detected to reach the first length, the inner layer view is determined to be incapable of rolling, hidden contents do not exist in the inner layer view in the sliding direction of the global gesture, the global gesture is further determined to be subsequently used for controlling the outer layer view to roll, and the outer layer view is subsequently controlled to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
In the embodiment of the present invention, the electronic device may detect the sliding distance of the global gesture through the UI gesture recognition State change detection component according to the UI gesture recognition State change detection component. It will be appreciated that the global gesture slides a distance equal to the distance the view is controlled to scroll by the global gesture. Based on this, it can be determined that the sliding distance of the global gesture is the rolling distance of the inner layer view when the inner layer view is controlled to roll through the global gesture. In an embodiment of the present invention, the electronic device may set a distance that the global gesture slides to a Content Offset (Content Offset) distance for view scrolling. The electronic device may determine whether the scroll distance of the inner layer view reaches the first length using the content compensation distance, the length of the inner layer view itself in the global gesture swipe direction, and the length of the display area of the inner layer view in the global gesture swipe direction.
For example, the electronic device calculates a difference between a length of the inner layer view itself in the direction of the global gesture swipe and a length of a display area of the inner layer view in the direction of the global gesture swipe, as a first length of content to be displayed of the inner layer view in the direction of the global gesture swipe. If the first length is the same as the content compensation distance, the electronic device may determine that the scrolling distance of the inner layer view reaches the first length. Otherwise, the electronic device may determine that the scrolling distance of the inner layer view does not reach the first length, the inner layer view may still be scrolled, and continue to control the inner layer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
In an optional embodiment of the present invention, in order to avoid the gesture collision, the electronic device prohibits enabling the preset gestures of the inner layer view and the outer layer view, and the sliding direction of the preset gestures is the same as the sliding direction of the global gesture.
In one example, the control direction of the preset gesture is the same as the control direction of the global gesture. For example, if the control direction of the global gesture is a vertical direction, the electronic device prohibits enabling the preset gesture that controls the inner view and the outer view to scroll in the vertical direction.
In an alternative embodiment of the present invention, as shown in fig. 3, the control method of view scrolling may further include the following steps.
And step 205, if the initial position of the global gesture is located in the display area of the outer view, controlling the outer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
In the embodiment of the invention, the scroll view needing to be controlled is determined through the initial position of the global gesture, so that the accurate control of the scroll view is realized.
In step 205, after acquiring the global gesture, the electronic device determines an initial position of the global gesture; whether the starting position of the global gesture is located in the display area of the inner layer view is detected. If the starting position of the global gesture is detected to be located outside the display area of the inner-layer view, namely the starting position of the global gesture is located in the display area of the outer-layer view, the electronic equipment determines that the global gesture is used for controlling the outer-layer view to roll, and controls the outer-layer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
The page shown in fig. 1 is still used as an example for illustration. The electronic device detects that the starting position of the global gesture is located outside the display area of the view 2, if the starting position of the global gesture is located inside the display area of the view 3, it is determined that the starting position of the global gesture is located inside the display area of the view 1, the sliding direction of the global gesture is vertically downward, the sliding speed of the global gesture is 2 centimeters per second, and the electronic device controls the view 1 to vertically scroll downward according to the 2 centimeters per second.
In other embodiments of the present invention, such as the control method of view scrolling shown in fig. 4, the control method may further include the following steps.
In step 401, a second length of the content to be displayed of the outer layer view in the sliding direction of the global gesture is determined.
And 402, when the rolling distance of the outer layer view reaches a second length, splicing preset pictures to be displayed for the outer layer view in the sliding direction of the global gesture to obtain a spliced view.
And step 403, controlling the spliced view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
In the embodiment of the invention, the electronic equipment controls the outer layer view to roll, when the rolling distance of the outer layer view reaches the second length, namely the outer layer view has no hidden content, if the user does not stop the global gesture, the outer layer view is not stopped to roll immediately, a preset picture to be displayed is spliced for the outer layer view in the sliding direction of the global gesture, and the spliced view is continuously controlled to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture. This provides a smooth buffer for the user to gesture control view scrolling, improving the user experience.
In step 401, after acquiring the global gesture, the electronic device determines a second length of the content to be displayed of the skin view in the sliding direction of the global gesture. And the content to be displayed is hidden content of an outer layer view which needs to be displayed in the sliding direction of the global gesture. For example, if the sliding direction of the global gesture is vertical downward, the content to be displayed in the outer layer view is the content hidden above the outer layer view; and if the sliding direction of the global gesture is vertical upwards, the content to be displayed of the outer layer view is the content hidden below the outer layer view.
In step 402, the default screen may be a still screen or a moving picture. The electronic device detects whether the scrolling distance of the outer layer view reaches the second length in real time. And if the rolling distance of the outer layer view reaches the second length, determining that hidden contents do not exist in the outer layer view in the sliding direction of the global gesture. In addition, if the global gesture is not finished, splicing the preset pictures to be displayed for the outer layer view in the sliding direction of the global gesture to obtain a spliced view.
In the embodiment of the invention, the electronic equipment can identify the state change detection component according to the user interface gesture and detect the sliding distance of the global gesture through the state change detection component identified by the user interface gesture. It will be appreciated that the global gesture slides a distance equal to the distance the view is controlled to scroll by the global gesture. Based on the determination, if the outer view is controlled to roll through the global gesture, the sliding distance of the global gesture is the rolling distance of the outer view; if the inner layer view is controlled to roll through the global gesture, and then the outer layer view is controlled to roll, the sliding distance of the global gesture is the sum of the rolling distance of the inner layer view and the rolling distance of the outer layer view.
In an embodiment of the present invention, the electronic device may set the scrolling distance of the inner layer view as the content compensation distance of the inner layer view. The electronic device may determine whether the scroll distance of the outer view reaches the second length using the content compensation distance, the scroll distance of the inner view, a length of the outer view itself in the global gesture swipe direction, and a length of the display area of the outer view in the global gesture swipe direction.
For example, the electronic device calculates a difference between a length of the skin view itself in the global gesture swipe direction and a length of the display area of the skin view in the global gesture swipe direction as a second length of the content to be displayed of the skin view in the swipe direction of the global gesture. If the starting position of the global gesture is located in the display area of the outer view, the global gesture controls the outer view to roll, the rolling distance of the inner view is 0, and the content compensation distance is the rolling distance of the outer view. If the starting position of the global gesture is located in the display area of the inner layer view, namely the global gesture controls the inner layer view to roll first and then controls the outer layer view to roll, the rolling distance of the outer layer view is the difference between the content compensation distance and the rolling distance of the inner layer view. If the second length is the same as the scroll distance of the skin view, the electronic device may determine that the scroll distance of the skin view reaches the second length. Otherwise, the electronic device may determine that the scrolling distance of the outer view does not reach the second length, the outer view is still scrollable, and continue to control the outer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
In step 403, after obtaining the stitched view, the electronic device controls the stitched view to scroll in the sliding direction of the global gesture according to the sliding speed of the global gesture. The sliding speed of the global gesture is the rolling speed of the mosaic view, so that the rolling distance of the mosaic view is the same as the sliding distance of the global gesture.
In an embodiment of the present invention, after controlling the stitched view to scroll in the sliding direction of the global gesture, if the electronic device detects that the global gesture is finished, for example, a finger of a user leaves a touch display screen of the electronic device, a preset speed is obtained, and the stitched view is controlled to scroll along a direction opposite to the sliding direction of the global gesture according to the preset speed until the content displayed in the display area of the outer view does not include the preset picture. The preset speed can be set according to actual requirements, and is not limited herein.
According to the embodiment of the invention, the spliced view is controlled to roll along the direction opposite to the sliding direction of the global gesture according to the preset speed, so that the inertial animation is realized, and good use experience after the global gesture is finished is achieved. In addition, the content displayed on the page does not include a preset picture, namely, the outer layer view and the inner layer outside the inner layer view are excluded, and the picture which is not concerned by the user is excluded, so that the user experience is further improved.
In other embodiments of the present invention, when the scrolling distance of the skin view reaches the second length, the electronic device may continue to control the skin view to scroll in the sliding direction of the global gesture directly according to the sliding speed of the global gesture. In this case, the electronic device does not splice the preset pictures for the outer view, which provides a smooth buffer for the user to control the view to scroll through gestures, thereby improving the user experience and simplifying the processing flow.
And when the rolling distance of the outer layer view reaches a second length, after the outer layer view is continuously controlled to roll in the sliding direction of the global gesture, if the electronic equipment detects that the global gesture is finished, the electronic equipment controls the outer layer view to roll in the reverse direction of the sliding direction of the global gesture according to a preset speed until the content displayed in the display area of the outer layer view does not include the content except the outer layer view.
The following describes a control method for view scrolling provided by an embodiment of the present invention with reference to fig. 1. The control direction of the global gesture in fig. 1 is the vertical direction, and the global gesture is added on view 1. In this case, the preset gesture of controlling the vertical direction of view 2 and view 4 is disabled. At this time, the preset fingers on views 2 and 4 can control the scrolling in the horizontal direction of the views only.
The height of the view 1 in the vertical direction is H1, the height of the display area of the view 1 in the vertical direction is H1, and the height of the hidden content of the view 2 in the vertical direction is H1-H1; the height of the view 2 in the vertical direction is H2, the height of the display area of the view 2 in the vertical direction is H2, and the height of the hidden content of the view 2 in the vertical direction is H2-H2; the height of view 4 in the vertical direction is H4, the height of the display area of view 4 in the vertical direction is H4, and the height of the content hidden in view 4 in the vertical direction is H4-H4.
The user inputs a gesture 1 to the electronic device, the sliding direction of the gesture 1 is upward, the sliding speed of the gesture 1 is speed 1, and the starting position of the gesture 1 is position 1.
The electronic device acquires the gesture 1, and determines that the gesture 1 is a global gesture if the electronic device detects that the sliding direction of the gesture 1 is upward and the upward direction is in the vertical direction.
If the electronic device detects that position 1 (the starting position of gesture 1) is located in the display area of view 4, the electronic device controls view 4 to scroll upward according to speed 1 (i.e., the sliding speed of gesture 1).
The electronic equipment detects whether the gesture 1 is finished or not in real time, and obtains the sliding distance of the gesture 1. If gesture 1 is not finished and the sliding distance of gesture 1 reaches H4-H4, it is determined that the scrolling distance of view 4 reaches the length of the content to be displayed of view 4 in the vertical direction, and then view 2 is controlled to scroll upward at speed 1.
Subsequently, the electronic device continues to detect whether the gesture 1 is finished in real time and obtains the sliding distance of the gesture 1. If gesture 1 is not finished and the distance of the sliding of gesture 1 reaches (H4-H4) + (H2-H2), it is determined that the scroll distance of view 2 reaches the length of the content to be displayed of view 2 in the vertical direction, and then view 1 is controlled to scroll upward at speed 1.
Subsequently, the electronic device continues to detect whether the gesture 1 is finished in real time and obtains the sliding distance of the gesture 1. If the gesture 1 is not finished, and the sliding distance of the gesture 1 reaches (H4-H4) + (H2-H2) + (H1-H1), determining that the scrolling distance of the view 1 reaches the length of the content to be displayed of the view 1 in the vertical direction, wherein the view 1 is the outermost view, and the preset pictures to be displayed are spliced for the view 1 in the vertical direction, that is, the preset pictures are spliced below the view 1 to obtain a spliced view, and controlling the spliced view to scroll upwards according to the speed 1, as shown in fig. 5.
Subsequently, the electronic device continues to detect whether gesture 1 is finished in real time. If the gesture 1 is detected to be finished, controlling the mosaic view to scroll downwards according to a preset speed until the content displayed in the display area of the view 1 does not include a preset picture, as shown in fig. 6.
Corresponding to the embodiment of the control method for view scrolling, the embodiment of the invention also provides a control device for view scrolling. As shown in fig. 7, the view scrolling control device includes: an acquisition unit 701, a scroll unit 702, and a determination unit 703.
An obtaining unit 701, configured to obtain a global gesture for controlling view scrolling;
the scrolling unit 702 is configured to, if the starting position of the global gesture is located in the display area of the inner layer view, control the inner layer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture;
a determining unit 703, configured to determine a first length of the content to be displayed of the inner layer view in the sliding direction of the global gesture;
the scrolling unit 702 is further configured to control the outer layer view to scroll in the sliding direction of the global gesture according to the sliding speed of the global gesture when the scrolling distance of the inner layer view reaches the first length.
In an embodiment of the present invention, the control device for view scrolling may further include:
and a prohibiting unit (not shown in the figure) for prohibiting the preset gesture enabling the inner layer view and the outer layer view, wherein the sliding direction of the preset gesture is the same as the sliding direction of the global gesture.
In an embodiment of the present invention, the scrolling unit 702 may be further configured to, if the starting position of the global gesture is located in the display area of the outer view, control the outer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
In an embodiment of the present invention, as shown in fig. 8, the control device for view scrolling may further include a stitching unit 704;
the determining unit 703 may be further configured to determine a second length of the content to be displayed of the outer layer view in the sliding direction of the global gesture;
the splicing unit 704 is used for splicing the preset pictures to be displayed for the outer layer view in the sliding direction of the global gesture to obtain a spliced view when the rolling distance of the outer layer view reaches a second length;
the scrolling unit 702 may further be configured to control the stitched view to scroll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
In an embodiment of the present invention, the scrolling unit 702 may be further configured to, after controlling the stitched view to scroll in the sliding direction of the global gesture, if it is detected that the global gesture is ended, control the stitched view to scroll in a direction opposite to the sliding direction of the global gesture according to a preset speed until the content displayed in the display area of the outer layer view does not include the preset frame.
According to the view scrolling control device provided by the embodiment of the invention, a global gesture is added, when the initial position of the global gesture is located in the display area of the inner layer view, the global gesture is determined to be used for controlling the inner layer view to scroll, and further the inner layer view is controlled to scroll along the sliding direction of the global gesture; and when the rolling distance of the inner layer view reaches the first length of the content to be displayed of the inner layer view, determining that the inner layer view can not roll any more, further determining that the global gesture is subsequently used for controlling the outer layer view to roll, and further controlling the outer layer view to roll in the sliding direction of the global gesture. Therefore, in the embodiment of the invention, the joint rolling of the inner-layer view and the outer-layer view is controlled through one global gesture, and the user experience is improved.
Corresponding to the above embodiment of the view scrolling control method, an embodiment of the present invention further provides an electronic device, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903, and a communication bus 904. The processor 901, the communication interface 902 and the memory 903 are communicated with each other through a communication bus 904.
A memory 903 for storing computer programs;
the processor 901 is configured to implement any one of the steps of the above-described control method for scrolling a view when executing a program stored in the memory 903.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment, the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processor to implement any step of the control method for scrolling the view.
In a further embodiment of the present invention, there is provided a computer program which, when run on a computer, causes the computer to execute any one of the steps of the control method for scrolling a view.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the electronic device, the computer-readable storage medium, and the computer program embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for controlling view scrolling, the method comprising:
acquiring a global gesture for controlling view scrolling;
if the starting position of the global gesture is located in the display area of the inner layer view, controlling the inner layer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture;
determining a first length of content to be displayed of the inner layer view in a swipe direction of the global gesture;
and when the rolling distance of the inner layer view reaches the first length, controlling the outer layer view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
2. The method of claim 1, further comprising:
and prohibiting a preset gesture for enabling the inner layer view and the outer layer view, wherein the sliding direction of the preset gesture is the same as the sliding direction of the global gesture.
3. The method of claim 1, further comprising:
and if the starting position of the global gesture is located in the display area of the outer layer view, controlling the outer layer view to roll along the sliding direction of the global gesture according to the sliding speed of the global gesture.
4. The method according to any one of claims 1-3, further comprising:
determining a second length of content to be displayed of the skin view in a swipe direction of the global gesture;
when the rolling distance of the outer layer view reaches the second length, splicing preset pictures to be displayed for the outer layer view in the sliding direction of the global gesture to obtain a spliced view;
and controlling the spliced view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture.
5. The method of claim 4, wherein after controlling the stitched view to scroll in the direction of the swipe of the global gesture, the method further comprises:
and if the global gesture is detected to be finished, controlling the spliced view to roll along the direction opposite to the sliding direction of the global gesture according to a preset speed until the content displayed in the display area of the outer layer view does not comprise the preset picture.
6. A control apparatus for view scrolling, the apparatus comprising:
the acquisition unit is used for acquiring a global gesture for controlling view scrolling;
the scrolling unit is used for controlling the inner layer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture if the initial position of the global gesture is located in the display area of the inner layer view;
the determining unit is used for determining a first length of the content to be displayed of the inner layer view in the sliding direction of the global gesture;
and the rolling unit is further used for controlling the outer layer view to roll in the sliding direction of the global gesture according to the sliding speed of the global gesture when the rolling distance of the inner layer view reaches the first length.
7. The apparatus of claim 6, further comprising:
and the prohibiting unit is used for prohibiting a preset gesture for enabling the inner layer view and the outer layer view, and the sliding direction of the preset gesture is the same as that of the global gesture.
8. The apparatus according to claim 6, wherein the scrolling unit is further configured to control the outer view to scroll along the sliding direction of the global gesture according to the sliding speed of the global gesture if the starting position of the global gesture is located in the display area of the outer view.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN202010390388.6A 2020-05-08 2020-05-08 View scrolling control method and device, electronic equipment and storage medium Pending CN111580662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010390388.6A CN111580662A (en) 2020-05-08 2020-05-08 View scrolling control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010390388.6A CN111580662A (en) 2020-05-08 2020-05-08 View scrolling control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111580662A true CN111580662A (en) 2020-08-25

Family

ID=72113510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010390388.6A Pending CN111580662A (en) 2020-05-08 2020-05-08 View scrolling control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111580662A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061604A (en) * 2022-08-01 2022-09-16 聚好看科技股份有限公司 Terminal device and display method of negative one-screen interface

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016099917A (en) * 2014-11-26 2016-05-30 レノボ・シンガポール・プライベート・リミテッド Method for performing action corresponding to pointing gesture, conference support system, and computer program
CN108958624A (en) * 2018-06-26 2018-12-07 福建天泉教育科技有限公司 It is a kind of to realize the method and terminal for rolling view response
CN109471581A (en) * 2017-09-08 2019-03-15 东芝泰格有限公司 Electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016099917A (en) * 2014-11-26 2016-05-30 レノボ・シンガポール・プライベート・リミテッド Method for performing action corresponding to pointing gesture, conference support system, and computer program
CN109471581A (en) * 2017-09-08 2019-03-15 东芝泰格有限公司 Electronic equipment and storage medium
CN108958624A (en) * 2018-06-26 2018-12-07 福建天泉教育科技有限公司 It is a kind of to realize the method and terminal for rolling view response

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061604A (en) * 2022-08-01 2022-09-16 聚好看科技股份有限公司 Terminal device and display method of negative one-screen interface
CN115061604B (en) * 2022-08-01 2023-09-29 聚好看科技股份有限公司 Terminal equipment and display method of negative one-screen interface

Similar Documents

Publication Publication Date Title
US10444961B2 (en) Hover-based interaction with rendered content
RU2631770C2 (en) Method and device for return to previously viewed page control
CN105786352B (en) The method, device and mobile terminal of quick positioning webpage content
US8751955B2 (en) Scrollbar user interface for multitouch devices
CN107153541B (en) Browsing interaction processing method and device
CN107015751B (en) Optimal display and scaling of objects and text in a document
US20160070463A1 (en) Flexible touch-based scrolling
US20140165013A1 (en) Electronic device and page zooming method thereof
US20140331171A1 (en) Methods and apparatus for processing application windows
US20120192108A1 (en) Gesture-based menu controls
US20120064946A1 (en) Resizable filmstrip view of images
TR201809777T4 (en) Responding to the receipt of magnification commands.
US20150106761A1 (en) Information processing apparatus, method for controlling the information processing apparatus, and storage medium
CN107111421B (en) Electronic device and method for controlling a display
CN109240591B (en) Interface display method and device
CN111580662A (en) View scrolling control method and device, electronic equipment and storage medium
CN112445566A (en) Page display method and device, electronic equipment and storage medium
EP2834727B1 (en) Associating content with a graphical interface window using a fling gesture
US20140223339A1 (en) Method and electronic device for controlling dynamic map-type graphic interface
CN106909288A (en) The method for refreshing of application program, device and electronic equipment
US9864500B2 (en) Application for controlling auto scroll of content as a function of tilting the device
CN111506185B (en) Method, device, electronic equipment and storage medium for operating document
JP2020102266A (en) Electronic apparatus and method for controlling the same
CN111857486A (en) List processing method, device, equipment and storage medium
US20140223340A1 (en) Method and electronic device for providing dynamic map-type graphic interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200825