2
我想隐藏键盘上的一个按钮的点击事件。任何帮助,将不胜感激Android隐藏键盘上btn点击
我想隐藏键盘上的一个按钮的点击事件。任何帮助,将不胜感激Android隐藏键盘上btn点击
隐藏虚拟键盘:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editView.getWindowToken(), 0);
InputMethodManager inputManager = (InputMethodManager)
getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_NOT_ALWAYS);
我把这个权利的onClick(视图V)事件之后。 您需要import android.view.inputmethod.InputMethodManager;
当您单击按钮时,键盘将隐藏。