Code example for Scroller

Methods: computeScrollOffset, getCurrX, getCurrY

0
     * Side scroll animation 
     * {@hide} 
     */ 
    @Override 
    public void computeScroll() { 
        if (mScroller.computeScrollOffset()) {
            mAboveView.scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
            invalidate();
        } else { 
            if (mAboveView.getScrollX() == 0) {
                mOverlay.setVisibility(View.GONE);
            } else { 
                mOverlay.setVisibility(View.VISIBLE);
            } 
        } 
    } 
     
    /** 
     * {@hide} 
     */ 
    @Override