Created
January 19, 2015 08:07
-
-
Save bangiqi/f3bb001a983767995c86 to your computer and use it in GitHub Desktop.
onScrollStateChanged
This file contains 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 onScrollStateChanged(AbsListView view, | |
int scrollState) { // TODO Auto-generated method stub | |
int threshold = 1; | |
int count = lv.getCount(); | |
if (scrollState == SCROLL_STATE_IDLE) { | |
if (lv.getLastVisiblePosition() >= count | |
- threshold) { | |
// Execute LoadMoreDataTask AsyncTask | |
new LoadMoreDataTask().execute(); | |
//System.out.println("sudah diakhir scroll"); | |
} | |
} | |
} | |
@Override | |
public void onScroll(AbsListView view, int firstVisibleItem, | |
int visibleItemCount, int totalItemCount) { | |
// TODO Auto-generated method stub | |
int loadedItems = firstVisibleItem + visibleItemCount; | |
System.out.println("load item " + loadedItems); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment