AlertDialog 中有EditText,弹框弹出时不能弹出
作者:
小相柳 | 来源:发表于
2022-11-08 10:51 被阅读0次public void show() {
if (mContext == null) {
return;
}
super.show();
Window win = getWindow();
if (win != null) {
win.setGravity(Gravity.BOTTOM);
WindowManager.LayoutParams params = win.getAttributes();
params.width = ScreenUtil.getScreenWidth();
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
params.windowAnimations = R.style.BottomPopWinStyle;
win.setAttributes(params);
win.setBackgroundDrawable(new BitmapDrawable());
win.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
win.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
}
}
本文标题:AlertDialog 中有EditText,弹框弹出时不能弹出
本文链接:https://www.haomeiwen.com/subject/cufntdtx.html
网友评论