Code example for GestureDetector

0
     *         A listener that will be notified if a left to right or right to left swipe has been 
     *         detected. 
     */ 
    public void setupGestureDetector(OnSwipeGestureListener listener) {
        mGestureDetector = new GestureDetector(mActivity,
                new SwipeGestureDetector(mActivity, listener));
    } 
}