Search code examples
androidandroid-layoutimeoptions

android:imeOptions not go to the exact next EditText


I have 2 EditText with id (et_1 and et_2) in a layout, and I set

for et_1

android:imeOptions="actionNext",
android:nextFocusForward="@+id/et_2"

when et_1 gets focus and the the software keyboard shows "Next", and when I click "Next", the focus doesn't go to et_2, but to another EditText in another fragment layout. Why is it this way?

How to make the focus go to et_2?

Thanks.


Solution

  • Try changing,

    android:nextFocusForward="@+id/et_2"
    

    to

    android:nextFocusDown="@+id/et_2"
    

    I hope it helps!