Calculate the Displacement of Scrollview while user scrolling
-
27-10-2019 - |
Question
I'm using GustureListner for a scrollview.
In that I have to calculate how many pixel that scrollview is moved during fling event.
I can get velocity and fling start and end position.
Solution
Better to do is extends SimpleOnGestureListener
to your OnTouchListener class,
so you can override onFling
and onScroll
.
Refer this GestureDetector.SimpleOnGestureListener
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow