显示和隐藏软键盘
程序员文章站
2022-04-20 08:24:38
...
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
View view = this.getCurrentFocus();
if (view != null){
imm.showSoftInput(view, 0); //显示软键盘
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);//隐藏软键盘
}
下一篇: 实时改变配置