Answers for "hide keyboard android with animation"

0

hide keyboard android

//With AndroidX:
fun View.hideKeyboard() = ViewCompat.getWindowInsetsController(this)
    ?.hide(WindowInsetsCompat.Type.ime())
Posted by: Guest on July-08-2021
0

hide keyboard android

// This is use in Acitivity

InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);

//This is use in Fragement
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(getView().getWindowToken(), 0);


Source:  StakeOverFlow
Posted by: Guest on October-06-2021

Code answers related to "hide keyboard android with animation"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language