diff --git a/example/patches/react-native-gesture-handler+1.10.3.patch b/example/patches/react-native-gesture-handler+1.10.3.patch new file mode 100644 index 000000000..8919a2b73 --- /dev/null +++ b/example/patches/react-native-gesture-handler+1.10.3.patch @@ -0,0 +1,46 @@ +diff --git a/node_modules/react-native-gesture-handler/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java b/node_modules/react-native-gesture-handler/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +index f08713b..14f7729 100644 +--- a/node_modules/react-native-gesture-handler/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java ++++ b/node_modules/react-native-gesture-handler/android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +@@ -13,6 +13,8 @@ import java.util.Comparator; + + import androidx.annotation.Nullable; + ++import com.swmansion.gesturehandler.react.RNGestureHandlerRootHelper; ++ + public class GestureHandlerOrchestrator { + + // The limit doesn't necessarily need to exists, it was just simpler to implement it that way +@@ -513,6 +515,7 @@ public class GestureHandlerOrchestrator { + } + + private static boolean canRunSimultaneously(GestureHandler a, GestureHandler b) { ++ + return a == b || a.shouldRecognizeSimultaneously(b) || b.shouldRecognizeSimultaneously(a); + } + +@@ -533,6 +536,11 @@ public class GestureHandlerOrchestrator { + // state, we delegate the decision to the implementation of GestureHandler#shouldBeCancelledBy + return handler.shouldBeCancelledBy(other); + } ++ ++ if (other instanceof RNGestureHandlerRootHelper.RootViewGestureHandler && handler instanceof PanGestureHandler) { ++ return false; ++ } ++ + return true; + } + +diff --git a/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.java b/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.java +index 9bf0c8f..8d4e58c 100644 +--- a/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.java ++++ b/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.java +@@ -81,7 +81,7 @@ public class RNGestureHandlerRootHelper { + return mRootView; + } + +- private class RootViewGestureHandler extends GestureHandler { ++ public class RootViewGestureHandler extends GestureHandler { + @Override + protected void onHandle(MotionEvent event) { + int currentState = getState();