1

i am developing one application in which there is an imageview...in which i want to move left or right using mouse touch...

for that i found "android.view.MotionEvent" but in MotionEvent there are few events among that

  1. ACTION_CANCEL 2. ACTION_DOWN 3. ACTION_UP ......etc.

hence there is no such event for "LEFT" and "RIGHT" action....

so is there any other way to implement the "LEFT" and "RIGHT" move ??

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295

1 Answers1

11

You misunderstood MotionEvent class events. ACTION_DOWN, ACTION_UP are equal to pressed and unpressed events.

In order to detect events like LEFT and RIGHT swipe, you have to use Gesture Recognition. Try to follow this example.

Community
  • 1
  • 1
Dariusz Bacinski
  • 8,324
  • 9
  • 38
  • 47
  • ohhhh....thanx a lot for letting me know "Correct" thing and providing example... it helps me a lot in my current application....thanx once again – Paresh Mayani Jul 02 '10 at 06:48