tags:

views:

280

answers:

1

hello all..

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 ??

+2  A: 

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.

darbat
@darbat 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
PM - Paresh Mayani