Skip to main content
edited body
Source Link
Gowthaman M
  • 8.3k
  • 9
  • 40
  • 57

useUse it.

protected void hideKeyboardDialog(Dialog dialog){ View view = dialog.getView(); if (view != null) { InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } } 

use it.

protected void hideKeyboardDialog(Dialog dialog){ View view = dialog.getView(); if (view != null) { InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } } 

Use it.

protected void hideKeyboardDialog(Dialog dialog){ View view = dialog.getView(); if (view != null) { InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } } 
Source Link

use it.

protected void hideKeyboardDialog(Dialog dialog){ View view = dialog.getView(); if (view != null) { InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } }