Skip to content

Instantly share code, notes, and snippets.

@px-amaac
Created February 27, 2014 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save px-amaac/9244960 to your computer and use it in GitHub Desktop.
Save px-amaac/9244960 to your computer and use it in GitHub Desktop.
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
//leave this empty
}
@Override
public void onScrollStateChanged(AbsListView listView, int scrollState) {
if (scrollState == SCROLL_STATE_IDLE) {
if (listView.getLastVisiblePosition() >= listView.getCount() - 1 - threshold) {
currentPage++;
//load more list items:
loadElements(currentPage);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment