Android开发 解决AlertDialog中的EditText无法调出输入法的问题

 
  
 dialog.show();
        Window window = dialog.getWindow();
        WindowManager.LayoutParams layoutparams = new WindowManager.LayoutParams();
        layoutparams.height = WindowManager.LayoutParams.WRAP_CONTENT;
        layoutparams.width = (int) getResources().getDimension(R.dimen.x720);
        window.setAttributes(layoutparams);
        window.setContentView(view);

        window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
        window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE |
                WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

show后面加这样的~~噩噩噩噩噩噩

你可能感兴趣的:(#,android,Bug处理)