Question


I made SimpleOnGestureListener capturing onLongPress with MotionEvent, but the problem is that I can't read event displacement, since I am getting always ACTION_DOWN code. How to achieve that? I want to move some of the views during long clicking.
Thanks!

Was it helpful?

Solution

Using my crystal ball and without seeing your code I can only say that you should capture onTouch event. As one of solution, by onLongPress you can set some bool value (PRESSED, for example) and then in onTouch event handle move event.

Or you can try to play with listeners (set and unset them), but I don't think that it's a good idea.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top