Answers for "android java hide keyboard decor"

4

android hide keyboard

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

// call from inside an Activity...
hideKeyboard(this, view);
hideKeyboard(this, getCurrentFocus());
hideKeyboard(this, getWindow().getDecorView());
hideKeyboard(this, findViewById(android.R.id.content));
Posted by: Guest on February-11-2021
0

hide keyboard android

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

android activity keyboard hide

<activity android:name="com.your.package.ActivityName"
          android:windowSoftInputMode="stateHidden"  />
Posted by: Guest on September-14-2020

Code answers related to "android java hide keyboard decor"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language