我碰到这段代码,但我想知道这段代码做了什么,InputMethodManager究竟是什么以及我的类中应该在哪里输入这段代码?它会进入onCreate()方法还是应该创建一个新的方法?再次,我想了解这种方法是如何工作的。在EditText视图中输入后隐藏键盘
感谢提前:)你的答案我感谢帮助
InputMethodManager inputManager =
(InputMethodManager) context.
getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(
this.getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
请不要添加纯代码的答案。也可以添加关于答案的简要说明。 –