有没有一种方法可以隐藏虚拟键盘当我点击Android的一个按钮?键盘最初弹出当用户触摸一个EditText分量;我想它关闭,一旦一个按钮被按下。
Is there a way to hide the virtual keyboard once I click a button in android? The keyboard originally pops up when the user touches an edittext component; I'd like it to close once a button is pushed.
要隐藏虚拟键盘尝试/使用此
To hide virtual keyboard try/use this
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(medtSearchQuery.getWindowToken(), 0);
上一篇:安卓:绘制自定义形状自定义、形状