imeOptions "actionNext" programmatically - how to jump to next field?

android, ime, imeoptions, textview

Solution

You can use the constants from EditorInfo class for the IME options. like,

editText.setImeOptions(EditorInfo.IME_ACTION_NEXT);

Problem

In layout XML it is possible to specify `android:imeOptions="actionNext"` which adds `Next` button in virtual keyboard and by clicking on it - focus jumps to the next field. How to do this programmatically - e.g. based on some event trigger focus to go to the next field?

Original source