| id | handlers |
|---|---|
| title | Gesture Handlers |
Here are a gesture recognizers currently available in the package:
TapGestureHandlerLongPressGestureHandlerPanGestureHandlerPinchGestureHandlerRotationGestureHandlerFlingGestureHandlerForceTouchGestureHandler
Whenever you use a native component that should handle touch events you can either wrap it with NativeViewGestureHandler or import wrapper component exported by the library instead of importing it from react-native package. Here is the list of available components:
ScrollViewSliderSwitchTextInputToolbarAndroid(Android only)ViewPagerAndroid(Android only)DrawerLayoutAndroid(Android only)
Library exports a State object that provides a number of constants used to express the state of the handler. Here are the available constants:
State.UNDETERMINED- default and initial stateState.FAILED- handler failed recognition of the gestureState.BEGAN- handler has initiated recognition but have not enough data to tell if it has recognized or notState.CANCELLED- handler has been cancelled because of other handler (or a system) stealing the touch streamState.ACTIVE- handler has recognizedState.END- gesture has completed
idenabledshouldCancelWhenOutsidesimultaneousHandlerswaitForhitSlop(accepts only negative values on iOS)onGestureEventonHandlerStateChangeonBeganonFailedonCancelledonActivatedonEnded
maxDurationMsmaxDelayMsnumberOfTaps
shouldActivateOnStartdisallowInterruption
minDurationMsmaxDist
minDeltaXminDeltaYmaxDeltaXmaxDeltaYminOffsetXminOffsetYminDistminVelocityminVelocityXminVelocityYminPointersmaxPointersavgTouches(Android only)
directionnumberOfPointers