Code example for ScrollView

Methods: scrollTo, post

0
        { 
            @Override 
            public void run() 
            { 
                if (mScroller.computeScrollOffset())
                    mScrollView.scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
                // If its not finished make sure we try and calculate the next time to run 
                if (!mScroller.isFinished())
                    mScrollView.post(this);
                else 
                    mIsScrolling = false;
            } 
        }; 
 
        //View Configuration 
        final ViewConfiguration vc = ViewConfiguration.get(scrollView.getContext());
        mMinVelocity = vc.getScaledMinimumFlingVelocity();
        mMaxVelocity = vc.getScaledMaximumFlingVelocity();
    } 
 
    @Override