EditText的setFocusable(false)之后再setFocusable(true)没反应处理

来源:互联网 发布:linux修改系统时区 编辑:程序博客网 时间:2024/06/09 22:11

在设置完setFocusable(false)之后又想设置回来则加上以下代码即可;

 et.setFocusable(true); et.setFocusableInTouchMode(true); et.requestFocus(); //调用软键盘//Utils.openKeybord(et, mContext); InputMethodManager imm = (InputMethodManager) mContext                .getSystemService(Context.INPUT_METHOD_SERVICE);        imm.showSoftInput(mEditText, InputMethodManager.RESULT_SHOWN);        imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,                InputMethodManager.HIDE_IMPLICIT_ONLY);
阅读全文
1 0