记录一下
Android5.1 物理键盘(扫描枪)与软键盘同时使用
frameworks/base/core/java/android/inputmethodservice/InputMethodService.java,修改onEvaluateInputViewShown()方法直接返回true
public boolean onEvaluateInputViewShown() {
Configuration config = getResources().getConfiguration();
//return config.keyboard == Configuration.KEYBOARD_NOKEYS
// || config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES;
return true;
}
网上还有许多方法,大家可以找找