-
I'm trying to implement a "tap and hold" gesture which will be used to record a video, similar to snapchat, instagram etc. I've decided to go with the following approach:
While this works fine on iOS, I've noticed that this always fails on Android. The flow is the following:
Which is weird to me. Why is the This is my code: const onHandlerStateChanged = useCallback(({ nativeEvent: event }) => {
console.debug(`state: ${Object.keys(State)[event.state]}`);
}, []);
// ...
return (
<TapGestureHandler
onHandlerStateChange={onHandlerStateChanged}>
<Reanimated.View style={[styles.button, buttonStyle, style]} {...props}>
// ... Then, when I try to hold the button, my console looks like this:
Why? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After reading the docs once again, I noticed that I can easily achieve this behaviour by setting the following props to the
|
Beta Was this translation helpful? Give feedback.
After reading the docs once again, I noticed that I can easily achieve this behaviour by setting the following props to the
TapGestureHandler
:maxDurationMs={99999999}
shouldCancelWhenOutside={false}