小编sud*_*kar的帖子

始终隐藏虚拟键盘

实际上我有一个编辑文本.当我点击编辑文本虚拟键盘popups.But我只想隐藏虚拟键盘,即使点击编辑文本后.编辑文本应该可以打印系统键盘.我怎么能这样做?我的代码..

EditText edtNote = (EditText)findViewById(R.id.note);
InputMethodManager imm = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.restartInput(edtNote);

Configuration config = this.getResources().getConfiguration();

if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) {
    imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
Run Code Online (Sandbox Code Playgroud)

android android-softkeyboard

2
推荐指数
1
解决办法
1498
查看次数

标签 统计

android ×1

android-softkeyboard ×1