2013-03-15 86 views

回答

5

隐藏虚拟键盘:

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); 
imm.hideSoftInputFromWindow(editView.getWindowToken(), 0); 
2
InputMethodManager inputManager = (InputMethodManager) 
            getSystemService(Context.INPUT_METHOD_SERVICE); 

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

我把这个权利的onClick(视图V)事件之后。 您需要import android.view.inputmethod.InputMethodManager;

当您单击按钮时,键盘将隐藏。