【问题标题】:@gorhom/bottom-sheet not pushing on keyboard@gorhom/bottom-sheet 不按键盘
【发布时间】:2022-12-18 10:59:14
【问题描述】:

这是我的代码

  const snapPoints = useMemo(() => ['25%', '25%', '60%'], []);
  const {animatedHandleHeight, animatedContentHeight} =
   useBottomSheetDynamicSnapPoints(snapPoints);

     <BottomSheetModal
    ref={bottomSheetModalRef}
    index={1}
    snapPoints={snapPoints}
    enableOverDrag={true}
    keyboardBehavior='extend'
    android_keyboardInputMode='adjustResize'
    handleHeight={animatedHandleHeight}
    contentHeight={animatedContentHeight}>
    <View style={[styles.contentContainer]}>
      
        <BottomSheetTextInput
          style={styles.input}
          onChangeText={val => setValue(val)}
          keyboardType="phone-pad"
        />
      ...
    </View>
  </BottomSheetModal>
)

当专注于输入时,它不会推动底部工作表

在清单里面我添加了这个

android:windowSoftInputMode="adjustPan|adjustResize"

【问题讨论】:

    标签: react-native bottom-sheet


    【解决方案1】:

    尝试在 BottomSheetTextInput 上面使用 react-native-keyboard-aware-scroll-view

    【讨论】:

      猜你喜欢
      • 2021-08-13
      • 1970-01-01
      • 2022-10-18
      • 2022-06-15
      • 1970-01-01
      • 2023-01-22
      • 2021-08-12
      • 1970-01-01
      • 2013-03-12
      相关资源
      最近更新 更多