Skip to main content
Version: 3.x

Handler State

Gesture handlers can be treated as "state machines". At any given time, each handler instance has an assigned state that can change when new touch events occur or can be forced to change by the touch system in certain circumstances.

States manage the internal recognition process. You can hook into these transitions using specific gesture callbacks.

StateDescriptionCallback
UNDETERMINEDThe default initial state of every handler.
BEGANThe handler has started receiving touch data but hasn't yet met the activation criteria.onBegin
ACTIVEThe gesture is recognized and activation criteria are met.onActivate when it first transitions into the ACTIVE state.

onUpdate when it has new data about the gesture.
ENDThe user successfully completed the gesture.onDeactivate with didSucceed parameter set to true.

onFinalize with didSucceed parameter set to true.
FAILEDThe handler failed to recognize the gesture.onDeactivate if the gesture was in ACTIVE state before. didSucceed parameter will be set to false

onFinalize with didSucceed parameter set to false.
CANCELLEDThe system interrupted the gesture.onDeactivate if the gesture was in ACTIVE state before. didSucceed parameter will be set to false

onFinalize with didSucceed parameter set to false.