List of usage examples for android.view.inputmethod InputMethodManager hideSoftInputFromWindow
public boolean hideSoftInputFromWindow(IBinder windowToken, int flags)
From source file:Main.java
public static void onClickHideKeyboard(Activity activity, View view) { InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); }
From source file:Main.java
public static void hideKeyboard(Context mContext, View v) { // TODO Auto-generated method stub InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); }
From source file:Main.java
@SuppressLint("NewApi") public static void isHideKeyboard(View view, Context context) { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); }
From source file:Main.java
public static void closeKeybord(EditText mEditText, Context mContext) { InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(mEditText.getWindowToken(), 0); }
From source file:Main.java
public static void hideSoftKeyboard(Activity activity) { InputMethodManager manager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE); manager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0); }
From source file:Main.java
public static void hideSoftKeyboard(Context context, View inputView) { if (inputView == null) return;//from ww w . j av a2s. co m InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(inputView.getWindowToken(), 0); }
From source file:Main.java
/** * This method is used to hide a keyboard after a user has * finished typing the input./* ww w. jav a2 s. c o m*/ */ public static void hideKeyboard(Activity activity, IBinder windowToken) { InputMethodManager mgr = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); mgr.hideSoftInputFromWindow(windowToken, 0); }
From source file:Main.java
public static void hideKeyboard(Activity activityRef, EditText editTextView) { //hide keyboard InputMethodManager imm = (InputMethodManager) activityRef.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editTextView.getWindowToken(), 0); }
From source file:Main.java
public static final void hideSwKeyBoard(View v, Activity activity) { final InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), 0); }
From source file:Main.java
public static void hideKeypad(Context context, View view) { if (context != null && view != null) { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); }//from w w w. j av a 2s. c om }