I'm currently using the MotionEvent.ACTION_MOVE function to detect if a user moves an object (in this case, an ImageView).
The problem is that now my algorithm gets more complicated and I need to distinguish if a user clicks on this object or moves it.
I tried to use the MotionEvent.ACTION_DOWN function but the problem is that, each time I click on the object, the MotionEvent.ACTION_MOVE is fired too.
How can achieve this? (Code is very welcome)
Thanks in advance.
== EDIT ==
Here is my code :
img_view.setOnTouchListener(new View.OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event)
{
switch(event.getAction())
{
case MotionEvent.ACTION_DOWN :
{
}
break;
case MotionEvent.ACTION_MOVE :
{
}
break;
case MotionEvent.ACTION_UP :
{
}
break;
}
return true;
}
});