Ext.: http://www.2cto.com/kf/201307/229485.html
First the activity must implement the Ongesturelistener interface, which provides some methods for gesture manipulation,
Ondown method: Ondown is, once the touch screen is pressed, immediately generate Ondown event public boolean ondown (Motionevent e) {return false;} Onfling method: When the hand is sliding on the screen but the hand does not leave the screen, the Motionevent object that triggers the Motionevent E1 hand starts to touch the position of the screen motionevent the E2 object where the hand ends the touch screen float Velocityx represents the movement speed of the hand in the horizontal direction float Velocityx represents the movement speed of the hand in the vertical direction public boolean onfling (Motionevent E1, motionevent E2, float Velocityx, float Velocityy) Onlongpress method: triggers the public void onlongpress (Motionevent e) Onscroll method when the screen is long pressed: triggers when the hand slides off the screen Parameters are the same as onfling (note the difference between the two) public boolean onscroll (Motionevent E1, motionevent E2, float Distancex, float distancey) Onshowpress method: Click on the touch screen, but there is no movement and bounce action onshowpress and Ondown difference is that Ondown is, once the touch screen is pressed, immediately generate Ondown events, But Onshowpress is the Ondown event, a period of time, if not move the mouse and bounce events, it is considered to be the Onshowpress event. public void Onshowpress (Motionevent E) Onsingletapup method: Bounces after tapping the touchscreen. If the onlongpress, Onscroll, and onfling events are produced in this process, no Onsingletapup events will be generated. public boolean onsingletapup (Motionevent e)
Android: Event handling method for gesture swipe