热心网友
回答时间:2023-10-13 19:59
1.让EditText失去焦点,使用EditText的clearFocus方法2.强制隐藏Android输入法窗口,在IME类中我们通过InputMethodManagerimm=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);实例化输入法控制对象,通过hideSoftInputFromWindow来控制,其中第一个参数绑定的为需要隐藏输入法的EditText对象,比如imm.hideSoftInputFromWindow(etAndroid123.getWindowToken(),0);
收起