@Override | |
public void onAttachedToWindow() { | |
super.onAttachedToWindow(); | |
// 解决键盘遮挡输入框问题 | |
Window window = getWindow(); | |
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); | |
window.setGravity(Gravity.BOTTOM); | |
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); | |
window.getDecorView().setPadding(0, 0, 0, 0); | |
} |
解决键盘遮挡输入框问题
最新推荐文章于 2024-03-08 14:38:53 发布