Android MotionEvent - Cant find Left and Right Motion Event
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
- ACTION_CANCEL 2. ACTION_DOWN 3. ACTION_UP ......etc.
hence there is no such event for "LEFT" and "RIGHT" action....
开发者_Go百科so is there any other way to implement the "LEFT" and "RIGHT" move ??
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.
精彩评论