Вопрос


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!

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top