Last active
December 17, 2015 05:49
-
-
Save youxiachai/5561119 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
private int mLastFirstVisibleItem; | |
private boolean mIsScrollingUp; | |
ew OnScrollListener() { | |
@Override | |
public void onScrollStateChanged(AbsListView view, int scrollState) { | |
} | |
@Override | |
public void onScroll(AbsListView view, int firstVisibleItem, | |
int visibleItemCount, int totalItemCount) { | |
if(currentFirstVisibleItem > firstVisibleItem){ | |
//scrolling to top of list | |
Log.d("xlistview", "scrolling to top of list"); | |
}else if (currentFirstVisibleItem < firstVisibleItem){ | |
//scrolling to bottom of list | |
Log.d("xlistview", "scrolling to bottom of list"); | |
} | |
currentFirstVisibleItem = firstVisibleItem; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment