在布局XML,可以指定安卓imeOptions =actionNext
添加了下一页
按钮,在虚拟键盘和点击就可以了 - 焦点跳到下一个字段
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?
您可以使用来自EditorInfo类中的常量输入法的选项。 喜欢,
You can use the constants from EditorInfo class for the IME options. like,
editText.setImeOptions(EditorInfo.IME_ACTION_NEXT);