AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
LayoutInflater inflater = this.getLayoutInflater();
View dialogView = inflater.inflate(R.layout.email_pop_layout, null);
builder.setView(dialogView);
AlertDialog alertDialog = builder.create();
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
txt_student_password_layout = dialogView.findViewById(R.id.student_password_layout);
txt_student_confirmpassword_layout = dialogView.findViewById(R.id.student_confirmpassword_layout);
txt_student_confirm_password = dialogView.findViewById(R.id.student_confirm_password);
txt_student_password = dialogView.findViewById(R.id.student_password);
Button btn_savepassword = dialogView.findViewById(R.id.btn_savepassword);
btn_savepassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showPasswordError();
if (txt_student_password_layout.getError() == null && txt_student_confirmpassword_layout.getError() == null) {
alertDialog.dismiss();
hideKeyboardFrom(mContext, txt_student_confirmpassword_layout);
String password = encrypt("tuT0r$p@CehshAeS", "$p@CeTut0R004aEs", txt_student_confirm_password.getText().toString());
mCallback.changePassword(password.trim());
} else {
showPasswordError();
}
}
});
//alertDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
alertDialog.show();
}
当专注于edittext和虚拟键盘打开,然后应用崩溃时
java.lang.IllegalArgumentException:参数必须是的后代 此视图