Вопрос

An android WebView and some other views have a nice animation effect of "no more scroll possible" - nice blue filled arc animating with the direction of your finger if you try to scroll after the max scrolling reached. The arc animates as you move the finger and smoothly disappears when you remove/stop the finger. In order to see it, just go to device Settings and try to scroll beyond the maximum.

I'd like to implement the same effect for my HorizontalScrollView.

Please pay attention, it is NOT about fading edge (AFAIK).

Please advise. Thanks

Это было полезно?

Решение

The HorizontalScrollview should behave like this by default. But what you can try is adding this to your HorizontalScrollview in XML:

android:overScrollMode="always"

or add this to your code:

yourHorizontalScrollview.setOverScrollMode(View.OVER_SCROLL_ALWAYS);

So it will always show the animation left or right depending on the direction you scroll.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top