I need to listen to the scroll of a ScrollView
. In order to do that I extended the ScrollView overriding its onScrollChanged(int, int, int, int)
.
When the view scrolls I move another view along with that scroll, and all is ok. When I release the view while scrolling, the ScrollView still scrolls with an inertia effect (smooth scroll). The problem is that, after the release, the method onScrollChanged
is called after the view is invalidated, the effect is that my view is moved after a small delay with an ugly effect.
In order to avoid this I could disable the smooth scroll from the ScrollView. But, is there a way for listening for the smooth scroll and continuing moving the view also during the residual scroll?