不得不赞叹stackoverflow真是好网站:
遇到部分机型webview引起的软键盘不收起,得在android代码中手动隐藏之, 搜索到是这么处理的:
获取焦点的方式:
View current = getCurrentFocus();
if (current != null) current.clearFocus();
收起软键盘是这么操作的:
// Check if no view has focus:
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
3k+的赞,看来应用很广泛啊
http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard