我在 Android 上使用 React Native,我想像这里(ios 版本)一样使用“下一步”选项编辑一堆 TextInput: https://github.com/facebook/react-native/pull/2149#issuecomment-129262565
我试过:
<TextInput
style = {styles.titleInput}
returnKeyType = {"next"}
autoFocus = {true}
placeholder = "Title"
onSubmitEditing={(event) => {
this.refs.SecondInput.focus();
}}
/>
<TextInput
ref='SecondInput'
style = {styles.descriptionInput}
multiline = {true}
maxLength = {200}
placeholder = "Description" />
但是键盘关闭和打开很烦人。
我从 https://stackoverflow.com/a/4999372/1456487 了解到,在 native android 应用程序中我会使用:
android:imeOptions="actionNext"
有什么办法吗?
最佳答案
此功能在 react-native .22 中引入。
https://github.com/facebook/react-native/commit/ab12189f87d8e7fd84a4f1b92fa97e8894e984c7
关于android - react native 安卓 : How to select the next TextInput after pressing the “actionNext” keyboard button?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34926547/