问题
Google Keyboard lets you long-press the spacebar to switch keyboards in Android. I haven't turned anything up with a Google search but I'm certain there's a way to do this programmatically.
How can I bring up the input method picker?
回答1:
They use showInputMethodPicker():
private void onSpaceBarLongPress() {
InputMethodManager imm = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
}
来源:https://stackoverflow.com/questions/35376419/how-to-mimic-google-keyboards-spacebar-long-press-functionality-for-switching-k