androidtextviewimeimeoptions

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


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?


Solution

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

    editText.setImeOptions(EditorInfo.IME_ACTION_NEXT);