问题
I have a ListView that has ListItem with EditText. This is to simulate a long Form. Once the user is done entering field, I want the cursor to move to next row, i.e. Next ListItem.
To get the next button, in the ListItem xml, I set the ime option to next:
<EditText
android:id="@+id/input_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"/>
The form could be long with over 20 items to enter. At a given time only 7 rows are visible. which means 7 ListItem rows will be initialized and reused as "convert view". Just by adding the above ime option, the default implementation would would focus to next until the 7th item and would go back to 1 instead of going to 8th item.
How can I make the next go to next item position instead of going back to 1st?
来源:https://stackoverflow.com/questions/26343936/android-listview-with-edittext-listitem-move-to-next