Closed huangjide closed 6 years ago
在点击车牌输入框时显示,输入完成后隐藏。
其他输入框还没有完全隐藏,这个键盘就出来了导致显示位置错乱,有什么建议吗
@YXHTom 你是使用哪种方式弹出键盘的?
edittext输入完成后隐藏系统输入框,后开启车牌输入框;系统输入框还没完全消失,车牌输入框就开始显示
@YXHTom 是使用PopupWindow来弹键盘的吗?
点击输入框自动单出来的键盘
这里采用的是把键盘添加到一个 FrameLayout 再把 FrameLayout 添加到 decorView 的方式。忽略下面内容的解决方式。
@yoojia 抽时间更新一下。
https://github.com/parkingwang/vehicle-keyboard-android/tree/724a63b880e694bb435f4e07ed0c03410ecedaf1/keyboard/src/main/java/com/parkingwang/vehiclekeyboard/support/PopupHelper.java ,这个文件 69 行需要的 bottom
值计算需要改一下,如果 windowSoftInputMode
值为 adjustPan
或 adjustNothing
则为0。
public enum AdjustInputMode {
PAN {
@Override
public int calcOffsetY(View decorView) {
return 0;
}
},
RESIZE,
NOTHING {
@Override
public int calcOffsetY(View decorView) {
return 0;
}
},
UNSPECIFIED;
public int calcOffsetY(View decorView) {
final Rect rect = new Rect();
decorView.getWindowVisibleDisplayFrame(rect);
return decorView.getHeight() - rect.bottom;
}
}
这个问题还没有改么?
@yoojia 请 review 一下 PR。
如果页面还有其他输入框让系统软键盘弹出来,那么这个键盘和系统键盘会同时上下显示出来,如何控制比较好呢?