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
精彩评论