react-native-reanimated-bottom-sheet icon indicating copy to clipboard operation
react-native-reanimated-bottom-sheet copied to clipboard

Gesture is not working

Open ZahraMirali opened this issue 4 years ago • 5 comments

BottomSheet only opens(or closes) when Button is pressed, not when I touch the screen.

Platform: Anroid (phone and emulator) "reanimated-bottom-sheet": "^1.0.0-alpha.22" "react-native-gesture-handler": "^1.7.0" "react-native-reanimated": "^1.13.0",

code:

  <Button
          title="Open Bottom Sheet"
          onPress={() => sheetRef.current.snapTo(0)}
   />
        <Button
          title="Close Bottom Sheet"
          onPress={() => sheetRef.current.snapTo(1)}
    />
  <BottomSheet
        ref={sheetRef}
        snapPoints={[450, 0]}
        initialSnap={1}
        borderRadius={30}
        renderContent={renderContent}
 />

ZahraMirali avatar Sep 22 '20 10:09 ZahraMirali

hey, did u find any workaround for this issue ?

karanjhinga avatar Oct 03 '20 15:10 karanjhinga

You need to follow the instructions for installing react-native-gesture-handler here:

https://docs.swmansion.com/react-native-gesture-handler/docs/#installation

ivangr1 avatar Oct 06 '20 07:10 ivangr1

You need to follow the instructions for installing react-native-gesture-handler here:

https://docs.swmansion.com/react-native-gesture-handler/docs/#installation

I think this problem deal with the AndroidX migrate, and the react-native gesture handler isn't compatible yet with AndrodX

rosemary18 avatar Oct 07 '20 05:10 rosemary18

I also had this problem. In my case, I didn't follow react-native-gesture-handler instructions properly. If you are using wix/react-native-navigation, you need to follow some additional react-native-gesture-handler instructions

https://docs.swmansion.com/react-native-gesture-handler/docs/#with-wixreact-native-navigation

Su-Yong avatar Feb 13 '21 10:02 Su-Yong

Just wrap your component with <GestureHandlerRootView style={{flex:1}}> {props.children} </GestureHandlerRootView> by importing it from react-native-gesture-handler.

hamzatms avatar Aug 10 '22 20:08 hamzatms