Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image keyboard support in React Native

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.

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

like image 228
Donut Avatar asked Sep 11 '18 15:09

Donut


People also ask

Why we use KeyboardAvoidingView in react native?

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.

What is the use of KeyboardAvoidingView?

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.


1 Answers

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

like image 54
Jason Avatar answered Oct 12 '22 08:10

Jason