How to disable “Next” button on a EditText softwar

2019-01-08 09:39发布

I have a bunch of EditTexts in my Android application, each with InputMethod set to numberSigned. My target device does not have a hardware keyboard and uses the software keyboard for numeric entry. Android replaces the standard "Done" button to the right of the entry box with a "Next" button. How can I use "Done" instead?

2条回答
神经病院院长
2楼-- · 2019-01-08 10:14

Try adding android:imeOptions="actionDone" to your EditText.

Reference

查看更多
冷血范
3楼-- · 2019-01-08 10:32

This can also be accomplished in code with:

myEditText.setImeOptions(EditorInfo.IME_ACTION_DONE);
查看更多
登录 后发表回答