简体   繁体   中英

React Native android: How to select the next TextInput after pressing the “actionNext” keyboard button?

I use react native for Android, and I want to edit bunch of TextInput with the "next" option like here (ios version): https://github.com/facebook/react-native/pull/2149#issuecomment-129262565

在此输入图像描述

I tried:

<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" />

But the keyboard is close and open and that's annoying.

from https://stackoverflow.com/a/4999372/1456487 i understand that in native android apps i would use:

android:imeOptions="actionNext"

Is there any way to do this?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM