How to catch a soft keyboard 'enter/done' press?

北城以北 提交于 2019-12-10 03:09:32

问题


I would like to know when the user presses the 'enter/done/next' key on the soft keyboard without the activity knowing which edittext box the user is in. I have seen some code, but it always uses the name of the edittext box that is being edited.

The app has numerous edittext boxes, and calculations are re-run anytime any one of the values in a edittext box is changed.


回答1:


Then attach the OnEditorActionListener to all of them.



来源:https://stackoverflow.com/questions/5330243/how-to-catch-a-soft-keyboard-enter-done-press

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!