Code example for Scroller

Methods: computeScrollOffset, forceFinished, getCurrY, getFinalY, isFinished

0
    } 
     
    private Handler animationHandler = new Handler() 
    { 
        public void handleMessage(Message msg) { 
            scroller.computeScrollOffset(); 
            int currY = scroller.getCurrY(); 
            int delta = lastScrollY - currY; 
            lastScrollY = currY; 
            if (delta != 0) { 
                listener.onScroll(delta); 
            } 
             
            if (Math.abs(currY - scroller.getFinalY()) < MIN_DELTA_FOR_SCROLLING)  
            { 
                currY = scroller.getFinalY(); 
                scroller.forceFinished(true); 
            } 
            if (!scroller.isFinished())  
            { 
                animationHandler.sendEmptyMessage(msg.what); 
            }  
            else if (msg.what == MESSAGE_SCROLL)  
            {