Code example for Scroller

Methods: startScroll

0
		// is refreshing, just scroll back to show all the header. 
		if (mPullRefreshing && height > mHeaderViewHeight) {
			finalHeight = mHeaderViewHeight;
		} 
		mScrollBack = SCROLLBACK_HEADER;
		mScroller.startScroll(0, height, 0, finalHeight - height,
				SCROLL_DURATION);
		// trigger computeScroll 
		invalidate();
	} 
 
	private void updateFooterHeight(float delta) {
		int height = mFooterView.getBottomMargin() + (int) delta;
		if (mEnablePullLoad && !mPullLoading) {
			if (height > PULL_LOAD_MORE_DELTA) { // height enough to invoke load
													// more. 
				mFooterView.setState(XListViewFooter.STATE_READY);
			} else { 
				mFooterView.setState(XListViewFooter.STATE_NORMAL);
			} 
		}