您的位置:首页 > 其它

经验小结

2015-10-19 09:10 260 查看
1.在activity中用的隐藏软键盘的方法:

private void closeKeyBord(){

InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);

if(imm.isActive()&&getCurrentFocus()!=null){

if(getCurrentFocus().getWindowToken()!=null){

imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);

}

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: