Is there a way to add a range of scrolling to a scrollView? I've done a screen where user can drag views and I want to limit the possibility of dragging them down to some coordinates and modify those coordinates at runtime according to the number of object from view.
You can use some code like this:
if(scrollView.scrollY() >= limit)
scrollView.setOnTouchListener(null);
To disable scrolling if user tries to scroll further than limit that you decided.
Edit: here, limit is coordinates typed int
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With