SyntaxFix
Write A Post
Hire A Developer
Questions
Use this code in any fragment button listener:
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(getActivity().INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);