/** Notify the loading more operation has finished */ public void onLoadMoreComplete() { mIsLoadingMore = false; mProgressBarLoadMore.setVisibility(View.GONE); }
@Override public void onScroll( PLAAbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { if (mOnScrollListener != null) { mOnScrollListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount); } if (mOnLoadMoreListener != null) { if (visibleItemCount == totalItemCount) { mProgressBarLoadMore.setVisibility(View.GONE); mLabLoadMore.setVisibility(View.GONE); return; } boolean loadMore = firstVisibleItem + visibleItemCount >= totalItemCount; if (!mIsLoadingMore && loadMore && mCurrentScrollState != SCROLL_STATE_IDLE) { if (!mCanLoadMore) { mLabLoadMore.setVisibility(View.VISIBLE); return; } mProgressBarLoadMore.setVisibility(View.VISIBLE); mLabLoadMore.setVisibility(View.GONE); mIsLoadingMore = true; onLoadMore(); } } }