React-native-keyboard-aware-scroll-view: onKeyboardWillShow and onKeyboardWillHide not firing

Created on 27 Mar 2018  路  7Comments  路  Source: APSL/react-native-keyboard-aware-scroll-view

<KeyboardAwareScrollView
      extraScrollHeight={70}
      enableOnAndroid={true}
      scrollEnabled={true}
      contentContainerStyle={styles.container}
      onKeyboardWillShow={(frames) => {
        Alert.alert('Warning', 'Try with debugger off')
        console.log('Keyboard event', frames)
      }}
      onKeyboardWillHide={(frames) => {
        Alert.alert('Warning', 'Try with debugger off')
        console.log('Keyboard event', frames)
      }}
>

Most helpful comment

@YuliyaGor : onKeyboardDidShow and onKeyboardDidHide instead onKeyboardWillShow and onKeyboardWillHide on Android, on Android Native, have no event trigger when keyboard will show or will hide

All 7 comments

Same here on RN 0.53

@YuliyaGor : onKeyboardDidShow and onKeyboardDidHide instead onKeyboardWillShow and onKeyboardWillHide on Android, on Android Native, have no event trigger when keyboard will show or will hide

to close this issue we could document this? is that already documented?

This hasn't been documented yet but definitely should be.

Same here on RN 0.61

I don't think this is a bug. According to the offical RN document:

Note that if you set android:windowSoftInputMode to adjustResize or adjustPan, only keyboardDidShow and keyboardDidHide events will be available on Android. If you set android:windowSoftInputMode to adjustNothing, no events will be available on Android. keyboardWillShow as well as keyboardWillHide are generally not available on Android since there is no native corresponding event.

I'll close this for being very old. Thanks for all the comments 馃樆
Please ping me if you still see it as an issue.

Was this page helpful?
0 / 5 - 0 ratings