H Horrorfrosch New Member Licensed User Longtime User Apr 12, 2015 #1 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
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 Apr 12, 2015 #2 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
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..
H Horrorfrosch New Member Licensed User Longtime User Apr 12, 2015 #3 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
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.
Informatix Expert Licensed User Longtime User Apr 13, 2015 #4 You should look at the log in the Drag example. You would see that a Touch event is raised when you lift the finger. Upvote 0
You should look at the log in the Drag example. You would see that a Touch event is raised when you lift the finger.