输入法对话框

时间:2011-01-14 09:11:35

标签: android methods input

有没有办法从源代码中显示输入法选择对话框?

1 个答案:

答案 0 :(得分:2)

来自活动内部:

InputMethodManager imm = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();

或者如果您有Context对象(或getContext()(子类视图)):

InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showInputMethodPicker();