List of utility methods to do Keyboard Hide
void | hideKeyBoard(View view, Activity activity) hide Key Board InputMethodManager imm = (InputMethodManager) activity .getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); |
void | hideKeyboard(Context context, EditText editText) hide Keyboard InputMethodManager imm = (InputMethodManager) context .getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); |
void | hideKeyboard(Context ctx, EditText editText) hide Keyboard InputMethodManager imm = (InputMethodManager) ctx .getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); |
void | hideKeyboard(View view) hide Keyboard try { InputMethodManager imm = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } catch (Exception e) { |
void | hideKeyboard(EditText editText) hide Keyboard InputMethodManager imm = (InputMethodManager) editText.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); |
void | hiddenKeyboard(Activity activity) hidden Keyboard try { InputMethodManager input = (InputMethodManager) activity .getSystemService(Activity.INPUT_METHOD_SERVICE); input.hideSoftInputFromWindow(activity.getCurrentFocus() .getWindowToken(), 0); } catch (Exception e) { e.printStackTrace(); |
void | closeSoftKeyboard(Activity activity) close Soft Keyboard if (activity == null) return; InputMethodManager inputManager = (InputMethodManager) activity .getSystemService(Context.INPUT_METHOD_SERVICE); View currentView = activity.getCurrentFocus(); if (currentView != null) { IBinder token = currentView.getWindowToken(); if (token != null) { ... |