// 隐藏键盘
private void hintKb() {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
// 得到InputMethodManager的实例
if (imm.isActive()) {
// 如果开启
imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT,
InputMethodManager.HIDE_NOT_ALWAYS);
// 关闭软键盘,开启方法相同,这个方法是切换开启与关闭状态的
}
}
private void hintKb() {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
// 得到InputMethodManager的实例
if (imm.isActive()) {
// 如果开启
imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT,
InputMethodManager.HIDE_NOT_ALWAYS);
// 关闭软键盘,开启方法相同,这个方法是切换开启与关闭状态的
}
}
作者:chonbj 发表于2013-4-27 15:29:21 原文链接
阅读:51 评论:0 查看评论