Buggy code:
public class SwipeMenuListView extends ListView { private static final int TOUCH_STATE_NONE = 0 ; private static final int TOUCH_STATE_X = 1 ; private static final int TOUCH_STATE_Y = 2 ; private int MAX_Y = 5 ; private int MAX_X = 3 ; private float mDownX ; private float mDownY ; private int mTouchState ; private int mTouchPosition ; private SwipeMenuLayout mTouchView ; private SwipeMenuListView . OnSwipeListener mOnSwipeListener ; private SwipeMenuCreator mMenuCreator ; private SwipeMenuListView . OnMenuItemClickListener mOnMenuItemClickListener ; private Interpolator mCloseInterpolator ; private Interpolator mOpenInterpolator ; public SwipeMenuListView ( Context context ) { } public SwipeMenuListView ( Context context , AttributeSet attrs , int defStyle ) { } public SwipeMenuListView ( Context context , AttributeSet attrs ) { } private void init ( ) { } public boolean isSwipeMode ( ) { } @ Override public void setAdapter ( ListAdapter adapter ) { } public void setCloseInterpolator ( Interpolator interpolator ) { } public void setOpenInterpolator ( Interpolator interpolator ) { } public Interpolator getOpenInterpolator ( ) { } public Interpolator getCloseInterpolator ( ) { } @ Override public boolean onInterceptTouchEvent ( MotionEvent ev ) { } @ Override public boolean onTouchEvent ( MotionEvent ev ) { if ( ( ( ev . getAction ( ) ) != ( MotionEvent . ACTION_DOWN ) ) && ( ( mTouchView ) == null ) ) return super . onTouchEvent ( ev ) ; int action = MotionEventCompat . getActionMasked ( ev ) ; action = ev . getAction ( ) ; switch ( action ) { case MotionEvent . ACTION_DOWN : int oldPos = mTouchPosition ; mDownX = ev . getX ( ) ; mDownY = ev . getY ( ) ; mTouchPosition = pointToPosition ( ( ( int ) ( ev . getX ( ) ) ) , ( ( int ) ( ev . getY ( ) ) ) ) ; View view = getChildAt ( ( ( mTouchPosition ) - ( getFirstVisiblePosition ( ) ) ) ) ; if ( ( ( mTouchView ) != null ) && ( mTouchView . isOpen ( ) ) ) { mTouchView . smoothCloseMenu ( ) ; mTouchView = null ; MotionEvent cancelEvent = MotionEvent . obtain ( ev ) ; cancelEvent . setAction ( ACTION_CANCEL ) ; <START_BUG> onTouchEvent ( cancelEvent ) ; <END_BUG> return true ; } if ( view instanceof SwipeMenuLayout ) { mTouchView = ( ( SwipeMenuLayout ) ( view ) ) ; } if ( ( mTouchView ) != null ) { mTouchView . onSwipe ( ev ) ; } break ; case MotionEvent . ACTION_MOVE : float dy = Math . abs ( ( ( ev . getY ( ) ) - ( mDownY ) ) ) ; float dx = Math . abs ( ( ( ev . getX ( ) ) - ( mDownX ) ) ) ; if ( ( mTouchState ) == ( SwipeMenuListView . TOUCH_STATE_X ) ) { if ( ( ( mTouchView ) != null ) && ( ! ( mTouchView . isOpen ( ) ) ) ) { mTouchView . onSwipe ( ev ) ; } getSelector ( ) . setState ( new int [ ] { 0 } ) ; ev . setAction ( ACTION_CANCEL ) ; super . onTouchEvent ( ev ) ; return true ; } else if ( ( mTouchState ) == ( SwipeMenuListView . TOUCH_STATE_NONE ) ) { if ( ( Math . abs ( dy ) ) > ( MAX_Y ) ) { mTouchState = SwipeMenuListView . TOUCH_STATE_Y ; } else if ( dx > ( MAX_X ) ) { mTouchState = SwipeMenuListView . TOUCH_STATE_X ; if ( ( mOnSwipeListener ) != null ) { mOnSwipeListener . onSwipeStart ( mTouchPosition ) ; } } } break ; case MotionEvent . ACTION_UP : if ( ( mTouchState ) == ( SwipeMenuListView . TOUCH_STATE_X ) ) { if ( ( mTouchView ) != null ) { mTouchView . onSwipe ( ev ) ; if ( ! ( mTouchView . isOpen ( ) ) ) { mTouchPosition = - 1 ; mTouchView = null ; } } if ( ( mOnSwipeListener ) != null ) { mOnSwipeListener . onSwipeEnd ( mTouchPosition ) ; } ev . setAction ( ACTION_CANCEL ) ; super . onTouchEvent ( ev ) ; mTouchState = SwipeMenuListView . TOUCH_STATE_NONE ; return true ; } mTouchState = SwipeMenuListView . TOUCH_STATE_NONE ; break ; } return super . onTouchEvent ( ev ) ; } public void smoothOpenMenu ( int position ) { } private int dp2px ( int dp ) { } public void setMenuCreator ( SwipeMenuCreator menuCreator ) { } public void setOnMenuItemClickListener ( SwipeMenuListView . OnMenuItemClickListener onMenuItemClickListener ) { } public void setOnSwipeListener ( SwipeMenuListView . OnSwipeListener onSwipeListener ) { } public static interface OnMenuItemClickListener { boolean onMenuItemClick ( int position , SwipeMenu menu , int index ) { } } public static interface OnSwipeListener { void onSwipeStart ( int position ) { } void onSwipeEnd ( int position ) { } } }

Fix:
super . onTouchEvent ( cancelEvent ) ;