mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
dd8caf4cf2
Summary: This PR implements [`returnKeyType`](http://facebook.github.io/react-native/docs/textinput.html#returnkeytype) on Android. It is implemented with [`EditText.setImeOptions()`](http://developer.android.com/reference/android/widget/TextView.html#setImeOptions(int)) that allows us to specify options on an input, in this case change the return button icon. To be noted that it is also possible to specify a string instead of an icon with [`EditText.setImeActionLabel()`](http://developer.android.com/reference/android/widget/TextView.html#setImeActionLabel(java.lang.CharSequence, int)) while being 2 different things I added both of these behaviors in this PR since it was mostly at the same place/component. **Problems encountered :** - All the `ReactEditText`s were set to `IME_ACTION_DONE` by default ([reference](https://github.com/Bhullnatik/react-native/blob/a2157dbbe06e10e628900e9d4443948893623126/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java#L78)). I'm not sure Closes https://github.com/facebook/react-native/pull/6905 Differential Revision: D3264755 Pulled By: dmmiller fb-gh-sync-id: 4a090e31b620a245847c06ba1895cfea02e88d0f fbshipit-source-id: 4a090e31b620a245847c06ba1895cfea02e88d0f