I want to trace the whole movement of a finger that started by touching my ImageView. I found that GenericMotion event should be the correct one to use.
What am I supposed to do (or to avoid) to get Actions Down, Move and Up in GenericMotion event? I get only HoverEnter, HoverMove and HoverExit actions, even if I start with touching the center of my ImageView.
Android: OnTouch, MotionEvent.ACTION_MOVE is not recognized?
Here I learned that without handling Down action I can't get the remaining actions, but I don't get the Down action!
private void OnPlayerInfoRatingGenericMotion(object sender, View.GenericMotionEventArgs e)
{
//goes here only with hover actions
if (e.Event.Action==MotionEventActions.Down)
{
//never goes here
}
if (e.Event.Action==MotionEventActions.Move)
{
//never goes here
}
}
What am I doing wrong?
GenericMotion
can not detect the gesture of your finger. I think it is only used to report for movement event. You can refer to the document here.For example , You can move your imageview from top to bottom then the
GenericMotion
can detect the "move" action.If you want to detect your finger event I think you can achieve
OnTouchListener
.For example:
imgview.SetOnTouchListener(new MyTouchListener());
achieve MyTouchListener:
Also you can achieve
IOnGestureListener
to detect your gesture.