React-native-gesture-handler: Swipeable does not work on Android on RN 0.59.8

Created on 18 Jun 2019  路  6Comments  路  Source: software-mansion/react-native-gesture-handler

Hi, i am using gesture-handler with react-native-navigation and i followed setup for linking with that library by adding to MainApplication.java:

-imported -import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;;

  • added - new RNGestureHandlerPackage()

In app i wrapped screen like this:

Navigation.registerComponent( screens.RESERVATIONS, () => props => ( <Provider store={store}> <ReservationsScreen {...props} /> </Provider> ), () => gestureHandlerRootHOC(ReservationsScreen) );

However swipeable does not work on android. It builds without errors, works on IOS but android does not respond to swipes. What am i doing wrong?

Android Build or config issue Swipeable

Most helpful comment

Maybe you miss these instructions for create root view on android : https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html#android

All 6 comments

Maybe you miss these instructions for create root view on android : https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html#android

We do also have this problem, working on IOS, build without error and screen is ok on Android, but gestures don't work

any update on this ?

Aure77 gave the solution

I'm also having the issue of Swipeable not working on Android but only when it's inside a ScrollView inside a Modal. I did follow the instructions pointed to by Aure77 but only the standard instructions as I wasn't sure if "one of the native navigation libraries" referred to includes react-navigation, and what to do if it does (as it only shows instructions for the wix navigator). I'm on RN 0.59.10 and RNGH 1.3.0.

This issue was not active for some time so I'm closing it.
If you need further help please reply.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brunolemos picture brunolemos  路  3Comments

jacobrosenskold picture jacobrosenskold  路  3Comments

rgangopadhya picture rgangopadhya  路  4Comments

tallen11 picture tallen11  路  3Comments

radex picture radex  路  3Comments