Android 隐藏软键盘
2015-07-23 09:59
459 查看
隐藏软键盘
public void hideSoftInputView() { InputMethodManager manager = ((InputMethodManager) this.getSystemService(Activity.INPUT_METHOD_SERVICE)); if (getWindow().getAttributes().softInputMode != WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) { if (getCurrentFocus() != null) manager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); } }
相关文章推荐
- Android 如何判断是否是手机号的方法?
- Android 基于Message的进程间通信 Messenger完全解析
- Android 基于Message的进程间通信 Messenger完全解析
- android webview addJavascriptInterface 安全
- Android中滑屏初探 - scrollTo 以及 scrollBy方法使用说明
- android:inputType参数说明
- Android的onLayout、layout方法讲解
- Android finish(),onDestroy(),exit()辨析
- 安卓美图秀秀的瘦脸功能
- 快速Android开发系列通信篇之EventBus
- android的编译和运行过程
- Android提高(14)——第四章 Handler与子线程
- android studio 自动序列化类插件
- android studio 自动序列化类插件
- Android设置透明状态
- Android Studio 之 Live Templates 高效利用
- 【学习笔记】android动画的不同实现方式以及要点
- EditText的android:inputType属性
- Android Studio第一次启动跳不过“ downloading components”解决方案
- Android获取屏幕大小(Px)