Code example for VelocityTracker

Methods: clear

0
            waitSlope = false;
 
        lastTouchX = (int) ev.getX();
        switch (action) {
            case MotionEvent.ACTION_DOWN:
                mFlingTracker.clear();
                if (shouldWaitForSlope(ev)) {
 
                    mLastDownX = (int) ev.getX();
                    waitSlope = true;
                    return isOpened(); 
                } 
                break; 
            case MotionEvent.ACTION_MOVE:
                if (checkSlope(ev)) {
                    mMenu.setVisibility(View.VISIBLE);
                    return true; 
                } 
                break; 
        }