强制显示键盘
private void showKeyBoard(EditText editText) {
InputMethodManager manager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
manager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
}
强制隐藏键盘
private void hideKeyboard(EditText editText) {
InputMethodManager manager = (InputMethodManager) getActivity().getSystemService(Service.INPUT_METHOD_SERVICE);
manager.hideSoftInputFromWindow(editText.getWindowToken(), 0);
}