androidscrolldetecthorizontalscrollviewonfling

Detect end of fling in HorizontalScrollView?


How can I detect the end of a fling event within a HorizontalScrollView?

Using a GestureDetector, I can determine when onFling has started, but I can't figure out how to tell when it has completed. Is there any callback function or similar trick that I'm missing?


Solution

  • This answer is late but probably useful with the similar requirements

    My approach is to override scrollTo of the View. With I reschedule a delayed message using a Handler. The effect is that as long as scroll call happens the message will not be delivered. But when no scroll call happens the message will be delivered and could be used to signal the end of "flinging"

    Did you get the idea?