Android O 物理键盘和虚拟键盘同时支持

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;

你可能感兴趣的:(Android O 物理键盘和虚拟键盘同时支持)