Android Question GestureDetector v.2.2 - anything like an onDragUp Event?


New Member
Licensed User
It's my first post and want to say Hi to everyone and how much I appreciate this forum :)


I use B4A for a week now, so I'm a newbie.

I use GestureDetector to drag views around, but I couldn't find an "onDragUp" event anywhere. I want to fire an event as soon as the dragging ends.

I tried Activity_Touch, but that doesn't seem to work in combination with the dragging (of course).

I guess it's really routine but I just don't figure out how to do it. I would be really thankful for any advice how to get this done.

Best regards


Licensed User

dim Fx as float
dim Fy as float

timer1.interval = 1000
Timer1.enabled = true

If View1 Fx AND Fy didn't change for 1000 milliseconds then
it's dropped and you can do whatever you want.
End if

a poorman's solution but will work.. you will lose 1 second though..


New Member
Licensed User
Hi Beja,

thank you for your quick answer. Yes, I already thought of polling, but actually I wanted to avoid it.
But maybe there is no other way, at least with this library. :)