Code example for GestureDetector

Methods: onTouchEvent

0
    } 
 
    @Override 
    public boolean onTouchEvent(MotionEvent ev) {
        if (this.gestureDetector != null)
            this.gestureDetector.onTouchEvent(ev);
        return super.onTouchEvent(ev);
    } 
 
    @Override 
    public boolean dispatchTouchEvent(MotionEvent ev) {
        if (this.gestureDetector != null && ev.getActionMasked() == MotionEvent.ACTION_DOWN)
            this.gestureDetector.onTouchEvent(ev);
        return super.dispatchTouchEvent(ev);
 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE