Skip to content

Instantly share code, notes, and snippets.

@thanhit93
Created January 15, 2017 13:51
Show Gist options
  • Save thanhit93/63ce560e2c5ffcb0ee72a4c2e77debbd to your computer and use it in GitHub Desktop.
Save thanhit93/63ce560e2c5ffcb0ee72a4c2e77debbd to your computer and use it in GitHub Desktop.
scrollView.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
public void onScrollChanged() {
if (scrollView != null) {
if (scrollView.getChildAt(0).getBottom() <= (scrollView.getHeight() + scrollView.getScrollY())) {
//scroll view is at bottom
} else {
//scroll view is not at bottom
}
}
}
});
note: http://stackoverflow.com/questions/10316743/detect-end-of-scrollview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment