Code example for ListView

Methods: getChildAt, getCount, getFirstVisiblePosition

0
				&& isFirstVisible() && adapter != null
				&& adapter.isAbleToPullToRefresh();
	} 
 
	private boolean isFirstVisible() { 
		if (this.listView.getCount() == 0) {
			return true; 
		} else if (listView.getFirstVisiblePosition() == 0) {
			return listView.getChildAt(0).getTop() >= listView.getTop();
		} else { 
			return false; 
		} 
	} 
 
	private boolean isIncremental() { 
		return this.isIncremental(0, EVENT_COUNT - 1);
	} 
 
	private boolean isIncremental(int from, int to) {
		return lastYs[from] != 0 && lastYs[to] != 0
				&& Math.abs(lastYs[from] - lastYs[to]) > 10