Code example for Scroller

Methods: abortAnimation

0
 
 
        switch (action) {
            case MotionEvent.ACTION_DOWN:
                mLastMotionX = x;
                mScroller.abortAnimation();
                mState = STATE_IDLE;
                break; 
            case MotionEvent.ACTION_MOVE:
                float diffY = Math.abs(x - mLastMotionX);
                if (diffY > mTouchSlop) {
                    mState = STATE_SCROLLING;
                } 
                break; 
            case MotionEvent.ACTION_UP:
                mState = STATE_ANIMATING;
                break; 
        } 
 
        return mState == STATE_SCROLLING;
Connect your IDE to all the code out there  Get Codota for Java