Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 679 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 679 Bytes

GestureSequence

A basic library that enables easy composition of gesture sequence recognition on a view.

Inspiration

This was inspired by the existence of UILongPressGestureRecognizer on iOS

Usage

// Perform action() when the view is tapped twice followed by a long press
GestureSequence.Builder(view)
    .tap()
    .tap()
    .longPress()
    .applyToView { action() }

Supported gestures:

  • Tap
  • Long press

Gradle Dependency

Make sure you have mavenCentral() in your repositories block

implementation 'io.github.paulklauser:gesturesequence:0.2'