EditText 键盘收回
16lz
2021-01-23
一、输入法出现 Done 按键
在EditText 中设置 android:imeOptions="actionDone"
将android:singleLine="true" 或者android:inputType="text"
二、点击外部区域键盘收回
protected void hideKeyboard(View v) {InputMethodManager imm = (InputMethodManager) BaseActivity.this.getSystemService(Context.INPUT_METHOD_SERVICE);imm.hideSoftInputFromWindow(v.getWindowToken(), 0);}
更多相关文章
- 输入法弹出后,不影响activity原有布局(android:windowSoftInputMo
- 输入法问题
- android 内置默认输入法
- 输入法软键盘搜索执行两次的解决方法
- android 模拟物理按键
- Android定制出厂默认输入法
- android添加外部按键
- EditText在输入法上显示搜索按钮
- 隐藏Android下的虚拟按键