I've overridden ScrollView
to pass MotionEvent
s to a GestureDetector
to detect fling events on the ScrollView. I need to be able to detect when the scrolling stops. This doesn't coincide with the MotionEvent.ACTION_UP
event because this usually happens at the start of a fling gesture, which is followed by a flurry of onScrollChanged()
calls on the ScrollView.
So basically what we are dealing with here is the following events:
- onFling
- onScrollChanged, onScrollChanged, onScrollChanged, ... , onScrollChanged
There's no callback for when the onScrollChanged events are done firing. I was thinking of posting a message to the event queue using a Handler
during onFling and waiting for the Runnable
to execute to signal the end of the fling, unfortunately it fires after the first onScrollChanged call.
Any other ideas?