How to perform a search action by android custom keyboard action button? [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-28 03:26:42

问题


I'm developing an android custom keyboard. I need to perform search action, move cursor to next text field action according to the text fields that user selected. How to perform those actions?


回答1:


I got the answer.

getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_GO);
getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_SEARCH);
getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_NEXT);


来源:https://stackoverflow.com/questions/29069778/how-to-perform-a-search-action-by-android-custom-keyboard-action-button

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