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

Horrorfrosch

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

Hi,

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
 

Beja

Expert
Licensed User
Longtime User
PseudoCode:

dim Fx as float
dim Fy as float

timer1.interval = 1000
Timer1.enabled = true

Timer1_tick
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..
 
Upvote 0

Horrorfrosch

New Member
Licensed User
Longtime 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. :)
 
Upvote 0
Top