Closed Lonami closed 8 years ago
It's weird, there was once when I logged the distance my finger didn't move and it said 0, so it should work with 10. What other possible a workarounds do we have?
Should we instead check for movement every time the onTouch event is called? And if at any given moment the distance is greater than the threshold, when we need to check we simply don't fire it. It would cost some more calculations than only one at the end, but perhaps it works.
I think that I fixed it. Apparently all we had to do was listen for the MotionEvent.ACTION_MOVE
and cancel the long click at that point.
Awesome, so MOVE_THRESHOLD
became infinitely small @stanipintjuk? ;)
int MOVE_THRESHOLD = { 0 | 1, 1/2, 1/4, 1/8, … }
;)
Hmmm, when keeping the
MOVE_THRESHOLD
at 40 it doesn't have an effect. The widget replacement is still triggered when swiping.When I changed it to 10 then the swiping on widget works great, but I can't long click and change the widget anymore.