Reputation: 2561
Is it possible to get triggered, if a ListView
has ended scrolling?
I want to implement a check after the user scrolled the ListView
. It would be to much checks, if I check this in
AbsListView.OnScrollListener.onScroll()
and it's not needed every pixel movement.
Upvotes: 0
Views: 95
Reputation: 13947
onScrollStateChanged(AbsListView view, int scrollState){
if(scrollState == SCROLL_STATE_IDLE){
//stopped scrolling
}
}
Upvotes: 0
Reputation: 3211
Try this:
onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if((firstVisibleItem + visibleItemCount) == totalItemCount) {
//End Scroll
}
}
firstVisibleItem - is the first item which is visible on the screen, visibleItemCount - count of visible items on the screen.
This should work.
Upvotes: 2