Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android hide soft keyboard

public void hideKeyboard(View view) {
    Context context = view.getContext();
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}

// call from inside an Activity / Fragment
hideKeyboard(view);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #hide #soft #keyboard
ADD COMMENT
Topic
Name
4+8 =