(iOS-like) overscroll on ScrollView not working in Android?

902 Views Asked by At

I'm trying to get my scrollview to have the "overscroll" effect as there is in iOS. I have tried two things with little to no success:

First try:

I used This , like:

ScrollView scrollView = (ScrollView) findViewById(R.id.scroll_view);
OverScrollDecoratorHelper.setUpOverScroll(scrollView);

However, it introduces some problems. When scrolling (Both up or down) , the textviews in my scrollview scrolled over outside the scrollview area, and I did not find a way to stop this. Any ideas on this? (Photo below to help explain)

enter image description here

Second try:

I found this and tried it like:

ScrollView scrollView = (ScrollView) findViewById(R.id.scrollView2);
scrollView.setOverScrollMode(View.OVER_SCROLL_IF_CONTENT_SCROLLS);

However nothing happened here, the ScrollView remained the same.

Do you have any idea on how to solve any of these two tries? Or another way to implement the overscroll effect?

1

There are 1 best solutions below

0
On

If you do not want to scroll over you can use

View.OVER_SCROLL_NEVER

Here is reference for android documentation: Link