如何模仿Google键盘的空格键长按功能来切换键盘? [英] How to mimic Google Keyboard's spacebar long-press functionality for switching keyboards?
本文介绍了如何模仿Google键盘的空格键长按功能来切换键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过Google键盘,您可以长按空格键在Android中切换键盘.我还没有通过Google搜索找到任何东西,但是我敢肯定有一种方法可以通过编程来完成.
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?
推荐答案
他们使用 showInputMethodPicker():
private void onSpaceBarLongPress() {
InputMethodManager imm = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();
}
这篇关于如何模仿Google键盘的空格键长按功能来切换键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文