Code example for OverScroller

Methods: abortAnimationstartScroll

0
    public float getCurrVelocity() { 
        return mScroller.getCurrVelocity();
    } 
 
    public void setPosition(int position) {
        mScroller.startScroll(
                position, 0,    // startX, startY
                0, 0, 0);       // dx, dy, duration 
 
        // This forces the scroller to reach the final position. 
        mScroller.abortAnimation();
    } 
 
    public void fling(int velocity, int min, int max) {
        int currX = getPosition();
        mScroller.fling(
                currX, 0,      // startX, startY
                velocity, 0,   // velocityX, velocityY
                min, max,      // minX, maxX
                0, 0,          // minY, maxY 
                mOverflingEnabled ? mOverflingDistance : 0, 0);