From df1c2aae26e3eebd10861f3b7f57e19994458b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bert?= Date: Fri, 6 Dec 2024 17:02:55 +0100 Subject: [PATCH] Change hook --- .../swmansion/gesturehandler/core/NativeViewGestureHandler.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt b/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt index 36e5dbacbc..6d5b935ab0 100644 --- a/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +++ b/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt @@ -182,7 +182,7 @@ class NativeViewGestureHandler : GestureHandler() { /** * Checks whether handler can activate. Used by TextViewHook. */ - fun canActivate(view: View) = true + fun canActivate(view: View) = view.isPressed /** * Called after the gesture transitions to the END state. @@ -225,7 +225,7 @@ class NativeViewGestureHandler : GestureHandler() { // We have to explicitly check for ReactTextView, since its `isPressed` flag is not set to `true`, // in contrast to e.g. Touchable - override fun canActivate(view: View) = view.isPressed || view is ReactTextView + override fun canActivate(view: View) = view is ReactTextView } private class EditTextHook(