InputMethodManager imm = (InputMethodManager)getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
Run Code Online (Sandbox Code Playgroud)
使用此代码时,条形码扫描仪连接时也不会出现软键盘请帮忙
android ×1