imeOptions" actionNext"编程 - 如何跳转到下一个字段?字段、跳转到、imeOptions、QUOT

2023-09-05 01:44:55 作者:狠

在布局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);