Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
458 views
in Technique[技术] by (71.8m points)

android - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

editText.setImeOptions(EditorInfo.IME_ACTION_NEXT);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...