解决方案:
重写dialog类中dismiss方法:
public class DzDialog extends Dialog {
public DzDialog(Context context, int theme) {
super(context, theme);
}
public DzDialog(Context context) {
super(context);
}
@Override
public void dismiss() {
View view = getCurrentFocus();
if(view instanceof TextView){
InputMethodManager mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN);
}
super.dismiss();
}
}
特此记录一下