React Native android:如何在按下“actionNext”键盘按钮后选择下一个TextInput?

时间:2016-01-21 14:34:24

标签: android react-native

我对Android使用react native,我想用" next"编辑一堆TextInput。像这里的选项(ios版本): https://github.com/facebook/react-native/pull/2149#issuecomment-129262565

enter image description here

我试过了:

<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我明白在原生Android应用程序中我会使用:

android:imeOptions="actionNext"

有没有办法做到这一点?

1 个答案:

答案 0 :(得分:5)