Created
February 27, 2014 05:34
-
-
Save px-amaac/9244960 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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