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;
Stop searching for code, let great code find you!  Add Codota to your java IDE