Created
January 15, 2017 13:51
-
-
Save thanhit93/63ce560e2c5ffcb0ee72a4c2e77debbd to your computer and use it in GitHub Desktop.
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
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