Code example for Scroller

Methods: computeScrollOffset, getCurrX

0
        return res;
    } 
 
    @Override 
    public void computeScroll() { 
        if (scroller.computeScrollOffset()) {
            setCurrentValue(scroller.getCurrX());
            invalidate();
        } else if (!inTouch) {
            zoomModel.commit();
        } 
    } 
 
    public float getCurrentValue() { 
        return (zoomModel.getZoom() - 1.0f) * MULTIPLIER;
    } 
 
    public void setCurrentValue(float currentValue) {
        if (currentValue < 0.0) {
            currentValue = 0.0f;
        }