Android documentation states that:
With Android 7.1 (API level 25), the Android SDK includes the Commit Content API, which provides a universal way for IMEs to send images and other rich content directly to a text editor in an app.
However, when I use the React Native's TextInput component and select a GIF from Android's keyboard, I receive the following message (see screenshot):
This text field does not support GIF insertion from the keyboard.
How can I add support for this functionality to a React Native app? Ideally I'd like a component that provides a callback to handle the URI received by commitContent()
.
This component will automatically adjust its height, position, or bottom padding based on the keyboard height to remain visible while the virtual keyboard is displayed.
KeyboardAvoidingView is a React Native built-in component with full JS implementation. It relies on RN's keyboard events ( keyboardWillChangeFrame on iOS & keyboardDidHide/Show on Android) and, based on provided behavior prop, applies additional padding, translation, or changes container's height.
There's a pull request that adds support from 3 months ago. I'm not clear why it isn't merged at this point... https://github.com/facebook/react-native/pull/26088
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With