This library adds the detection of
standard gestures (press, single-tap, double-tap, long tap, drag, scroll, fling, pinch, rotation) to B4A. Instead of using the Touch events to figure out what the user really did, now you just set 15 different listeners with one line of code and you get the gestures as events with all the useful values (scrolling distance, fling velocity, pinch variation, rotation angle...).
With this library, you can also know easily the pressure or the size of a touch event.
It works with any view.
Note: you have to create an instance of GestureDetector (with Dim) for each view you want to bind to the detector with SetOnGestureListener.
v1.2: Freeware.
Support for multi-touch.
Incompatible with Android versions < 2.
v2.2: Donationware.
New events: onDrag, onPinchOpen, onPinchClose, onRotation
New functions: CreateMotionEvent, PassTouchEventTo, IgnoreWidthForPinch, IgnoreHeightForPinch, getHistorySize, getHistoricalX, getHistoricalY, getHistoricalPressure, getHistoricalSize, getTouchMajor, getTouchMinor, getXPrecision, getYPrecision, RemoveGestureListener.
Incompatible with Android versions < 2.
Starting from version 2, the GestureDetector library is released as a donationware. That means: if you want to use it in your application (or reuse a part of it in any piece of software written in B4A or Java), please donate something by using the link in my signature. I'll send you the file as soon as I receive your donation.
You can donate what you want, from one dollar to one million dollars (for such an amount, you'll be my friend forever ).
I don't do that to earn a lot of money, just to be rewarded for my work (and I probably won't earn a lot of money this way ;-)).