0

My requirement is on touch move I have to change image in image view.If user fling fast based on velocity I want to get fling speed interval and change image.

I am able to get X and Y velocity, but based on velocity how to find timer interval to apply image change.Please provide a solution.

AbiAndroid
  • 89
  • 2
  • 4
  • 14

1 Answers1

0

This link helps you detect the fling gesture. http://developer.android.com/training/gestures/detector.html

The first and second param of the fling() are MotionEvent objects that have a getDownTime() that you can retrieve to get the initial and the final time of the event.(See)

Subtract the same to get the interval.

humblerookie
  • 4,717
  • 4
  • 25
  • 40