B4A Library [Lib] Gesture Detector

Informatix

Expert
Licensed User
Longtime User
This kind of thing cannot happen with GestureDetector because it is bound to a specific view so if you bind it to your label, you will detect gestures only when they are initiated from the label. As a label is sometimes a bit too small for a good gesture detection, the usual trick is to size it much bigger than needed for display (or to place it in a bigger panel if it has a colored background and detect gestures at the panel level, with no events for the label).
 

herryj

Member
Licensed User
Longtime User
Hi, Informatics
I've tried one of the demo attached in this post "gesture_Rotate_Image.zip" and its awesome, though the image only rotates using two fingers and what I'm searching for is rotate image using one finger.

Is there any Handler on SetOnGestureListener that can rotate image using one finger?

Your response would really help a lot.

And many thanks in advance.

I really really appreciate this library of yours.
 

Informatix

Expert
Licensed User
Longtime User
Did you look at this tutorial? It includes some code for rotary knobs.
 

Malky

Active Member
Licensed User
Longtime User
Hi, I am trying to use the swipe (fling) functionality with LibGDX but do not get any response whatsoever with any screen contact? Is there a short demo or something available that I can go through?

Thanks
 

Malky

Active Member
Licensed User
Longtime User
Hi informatix, I tried the suggested function in your libGDX tutorial and got no response which is how I ended up here?
B4X:
Sub GD_Fling(VelocityX As Float, VelocityY As Float) As Boolean
Return False
End Sub
I tried to log the velocity and it appears that this function is not doing anything?
 

Informatix

Expert
Licensed User
Longtime User
You should post in the corresponding thread.
If you open the template "_TemplateInputGD.b4a" and add Log(VelocityX) to the fling event, you will see that you get a value every time you do a fling gesture on the screen.
 

Malky

Active Member
Licensed User
Longtime User
Cheers Informatix, I'll try it tonight when I get home. Apologies for posting here as well.

Malk
 

dune3000

Member
Licensed User
Longtime User
Hi informatix, Can I change the keep touch screen duration for LongPress? I want to make it shorter.
 

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Is there any simple way to detect when the user swipe its finger from left to right and viceversa?
Thanks
 

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Thanks Informatix, but this is a very big library and I only need to detect a fling in a CustomListView, any other idea?
 

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
No no I mean the other that is suggested, the one for games.
Iasked for a way to detect a fling, you answer I have to look at the trhead answers and the olnly thing I found is the suggest of a game lib that is too big.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…