AlertDialog alertDialog = new AlertDialog.Builder(EditProfileActivity.this).create();
alertDialog.show();
// 设置窗口的内容页面xxxx_dialog.xml文件中定义view内容
Window window = alertDialog.getWindow();
window.setContentView(R.layout.dialog_edit_nickname);
//为了弹出对话框
window.clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
window.setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
AlertDialog中有EditText时(getwindow加载)自动弹出输入法的解决办法
最新推荐文章于 2021-05-29 23:51:56 发布