这是焦点冲突问题,暂时没有完美解决方案
你可以设置edittext.setOnFocusChangeListener,if (!hasFocus) {// 失去焦点},调用系统的方法隐藏软键盘
//关闭软键盘
InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if(inputMethodManager!=null && getCurrentFocus()!=null && getCurrentFocus().getWindowToken()!=null) {
inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
}