<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)
}}
>
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.
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