问题
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