Code example for Scroller

Methods: isFinished

0
                clearMessages(); 
                listener.onTouch();
                break; 
 
            case MotionEvent.ACTION_UP:
                if (scroller.isFinished())
                    listener.onTouchUp();
                break; 
 
 
            case MotionEvent.ACTION_MOVE:
                // perform scrolling 
                int distance = (int)(getMotionEventPosition(event) - lastTouchedPosition);
                if (distance != 0) {
                    startScrolling(); 
                    listener.onScroll(distance);
                    lastTouchedPosition = getMotionEventPosition(event);
                } 
                break; 
        }