AlertDialog中有EditText时(getwindow加载)自动弹出输入法的解决办法

来源:互联网 发布:知字是什么生肖 编辑:程序博客网 时间:2024/06/05 16:39
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);

0 0
原创粉丝点击