Code example for AbsListView

Methods: getChildAt, getFirstVisiblePosition

0
		setCurrentLocale(newConfig.locale);
	} 
 
	private void onScroll(AbsListView view, int firstVisibleItem,
			int visibleItemCount, int totalItemCount) {
		WeekView child = (WeekView) view.getChildAt(0);
		if (child == null) {
			return; 
		} 
		long currScroll = view.getFirstVisiblePosition() * child.getHeight()
				- child.getBottom();
		if (currScroll < mPreviousScrollPosition) {
			mIsScrollingUp = true;
		} else if (currScroll > mPreviousScrollPosition) {
			mIsScrollingUp = false;
		} else { 
			return; 
		} 
		int offset = child.getBottom() < mWeekMinVisibleHeight ? 1 : 0;
		if (mIsScrollingUp) {
			child = (WeekView) view.getChildAt(CalendarView.SCROLL_HYST_WEEKS
					+ offset);
		} else if (offset != 0) {
			child = (WeekView) view.getChildAt(offset);
		} 
		int month;
		if (mIsScrollingUp) {
			month = child.getMonthOfFirstWeekDay();
		} else {