Code example for Scroller

Methods: abortAnimationcomputeScrollOffsetgetCurrXgetFinalX

0
		postAnimationInvalidate(); 
 
	} 
 
	private void postAnimationInvalidate() { 
		if (mScroller.computeScrollOffset()) {
			final int oldX = mContentLeft;
			final int x = mScroller.getCurrX();
			if (x != oldX)
				setContentLeft(x);
			if (x != mScroller.getFinalX()) {
				postDelayed(mDragRunnable, ANIMATION_DELAY);
				return; 
			} 
		} 
		completeAnimation(); 
	} 
 
	private void completeAnimation() { 
		mScroller.abortAnimation();
		final int finalX = mScroller.getFinalX();
		setContentLeft(finalX);
		setMenuState(mContentLeft == 0 ? MENU_STATE_CLOSED : MENU_STATE_OPEN);
	} 
 
	private void endDrag() {