Example usage for android.view.inputmethod InputMethodManager hideSoftInputFromWindow

List of usage examples for android.view.inputmethod InputMethodManager hideSoftInputFromWindow

Introduction

In this page you can find the example usage for android.view.inputmethod InputMethodManager hideSoftInputFromWindow.

Prototype

public boolean hideSoftInputFromWindow(IBinder windowToken, int flags) 

Source Link

Document

Synonym for #hideSoftInputFromWindow(IBinder,int,ResultReceiver) without a result: request to hide the soft input window from the context of the window that is currently accepting input.

Usage

From source file:Main.java

public static void hideKeyBoard(Context ctx, View view) {
    InputMethodManager imm = (InputMethodManager) ctx.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}

From source file:Main.java

public static void hideSoftKeyboard(Context con, EditText editText) {
    InputMethodManager imm = (InputMethodManager) con.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
}

From source file:Main.java

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

From source file:Main.java

public static void hideSoftKeyboard(Context context, EditText myEditText) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
}

From source file:Main.java

public static void hideSoftKeyboard(Activity act, View v) {
    InputMethodManager imm = (InputMethodManager) act.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}

From source file:Main.java

public static void hideSoftKeyboard(Context context, IBinder windowToken) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(windowToken, 0);
}

From source file:Main.java

public static void hideSystemKeyBoard(Context mcontext, View v) {
    InputMethodManager imm = (InputMethodManager) mcontext.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}

From source file:Main.java

public static void hideSoftKeyboard(Context context, EditText editText) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
}

From source file:Main.java

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

From source file:Main.java

public static void hiddenKeybroad(View v, Context context) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}