Code example for AbsListView

Methods: getCount, getLastVisiblePosition

0
	    setOnScrollListener(new OnScrollListener() {
             
            @Override 
            public void onScrollStateChanged(AbsListView view, int scrollState) {
                if( OnScrollListener.SCROLL_STATE_IDLE == scrollState ){
                    if (view.getLastVisiblePosition() == (view.getCount() - 1)) {
                        if(listener.pullAtBottom()) mCurrentPage++;
                    }else{ 
                        listener.pushAtTop();
                    } 
                } 
            } 
             
            @Override 
            public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
                    int totalItemCount) {
            } 
        }); 
	} 
	 
	/**