GestureKit - An extension for MIT App Inventor 2. Extension to detect Swipe, Long Press, Click and Pinch gestures

🧩 GestureKit

An extension for MIT App Inventor 2.
Extension to detect Swipe, Long Press, Click, and Pinch gestures.

:memo: Specifications


:package: Package: com.otniel.gesturekit
:floppy_disk: Size: 8.12 KB
:iphone: Minimum API Level: 8
:date: Updated On: 2025-04-17T17:00:00Z
:computer: Built & documented using: FAST v2.8.4

Events:

GestureKit has total 4 events.

OnSwipe

OnSwipe_Event

Triggered when a swipe gesture is detected.
Direction can be: "up", "down", "left", "right".

Parameter Type
direction text
component component

OnLongPress

OnLongPress_Event

Triggered when a long press is detected.

Parameter Type
component component

OnPinch

OnPinch_Event

Triggered when a pinch gesture is detected.
Scale > 1 = zoom in, < 1 = zoom out.

Parameter Type
scaleFactor number
component component

OnClick

OnClick_Event

Triggered when a single tap (click) is detected.

Parameter Type
component component

Method:

GestureKit has total 1 method.

AttachTo

AttachTo_Method
Attaches gesture detection to a specific component.
Use this function to add swipe, long press, or pinch detection to any view (such as buttons, images, or layouts).

Parameter Type
component component

Update v2
aia : gesturekit.aia (534.8 KB)
extension :
com.otniel.gesturekit.aix (8.1 KB)

5 Likes

What a splendidly simple, yet effective and diverse extension, with what may appear to be unlimited possibilities. Thank you :slight_smile:

Could you add a (single/normal) click event as well ?

I also note it does not work with an imageSprite component in a canvas.

3 Likes

Thanks for your feedback! The single click event has been added in the latest update, and I hope it works well for you.

As for the issue with ImageSprite in a Canvas, you're right ,the current doesn't support it because gesture detection doesn't work directly with ImageSprite components.

1 Like