Code example for AbsListView

Methods: getCount, getLastVisiblePosition

0
    } 
 
    @Override 
    public void onScrollStateChanged(AbsListView view, int scrollState) {
        if (SCROLL_STATE_IDLE == scrollState) {
            if (view.getLastVisiblePosition() >= view.getCount() - 1) {
                fetchData(); 
            } 
        } 
    } 
 
    @Override 
    public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
            int totalItemCount) {
    } 
 
    private class CouponTask extends AsyncTask<Number, Integer, List<Coupon>> {
        final Context mContext = CouponListFragment.this.getActivity();
 
        @Override 
        protected List<Coupon> doInBackground(Number... params) {