Code example for AbsListView

Methods: getAdapter, getLastVisiblePosition

0
			int arg3) {
		firstItemIndex = firstVisiableItem;
	} 
 
	public void onScrollStateChanged(AbsListView view, int scrollState) {
		if (view.getLastVisiblePosition() == view.getAdapter().getCount() - 1) {
			onLoadMoreData(); 
		} 
	} 
 
	public boolean onTouchEvent(MotionEvent event) {
		if (isRefreshable) {
			switch (event.getAction()) {
			case MotionEvent.ACTION_DOWN:
				if (firstItemIndex == 0 && !isRecored) { // 记录一次y坐标
					isRecored = true;
					startY = (int) event.getY();
				} 
				break; 
 
			case MotionEvent.ACTION_UP: