本文实例讲述了Android编程实现点击EditText之外的控件隐藏软键盘功能。分享给大家供大家参考,具体如下:
工具类
...
public static void hideKeyboard(Context ctx) {
if (ctx != null) {
View view = ((Activity) ctx).getCurrentFocus();
if (view != null) {
InputMethodManager inputManager = (InputMethodManager) ctx
.get