Code example for Scroller

Methods: abortAnimationisFinished

0
        if (duration > ANIMATED_SCROLL_GAP) {
            mScroller.startScroll(getScrollX(), getScrollY(), dx, dy);
            awakenScrollBars(mScroller.getDuration());
            invalidate();
        } else { 
            if (!mScroller.isFinished()) {
                mScroller.abortAnimation();
            } 
            scrollBy(dx, dy);
        } 
        mLastScroll = AnimationUtils.currentAnimationTimeMillis();
    } 
 
    /** 
     * Like {@link #scrollTo}, but scroll smoothly instead of immediately. 
     * 
     * @param x the position where to scroll on the X axis 
     * @param y the position where to scroll on the Y axis 
     */ 
    public final void smoothScrollTo(int x, int y) {
Experience pair programming with AI  Get Codota for Java