List of usage examples for android.view.inputmethod InputMethodManager showSoftInput
public boolean showSoftInput(View view, int flags)
From source file:Main.java
public static void showSoftInput(Context context, EditText editText) { InputMethodManager inputManager = (InputMethodManager) context .getSystemService(Context.INPUT_METHOD_SERVICE); if (inputManager != null) { inputManager.showSoftInput(editText, 0); }// ww w. ja v a 2s. c o m editText.requestFocus(); }
From source file:Main.java
public static void openInputMethod(EditText editText) { InputMethodManager inputManager = (InputMethodManager) editText .getContext().getSystemService( Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(editText, 0); }
From source file:Main.java
public static void showSoftKeyBroad(Context context, EditText editText) { InputMethodManager mgr = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); // only will trigger it if no physical keyboard is open mgr.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); }
From source file:Main.java
public static void openSoftKeyboard(Context context, EditText editText) { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); // imm.showSoftInputFromInputMethod(editText.getWindowToken(), 0); imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED); }
From source file:de.baumann.quitsmoking.helper.helper_main.java
public static void showKeyboard(Activity from, EditText editText) { InputMethodManager imm = (InputMethodManager) from.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); editText.setSelection(editText.length()); }
From source file:Main.java
public static void showSoftKeyBoard(InputMethodManager imm, View... views) { if (views != null && imm != null) { for (View view : views) { if (view != null) { imm.showSoftInput(view, 0); }//from w w w .java 2 s. co m } } }
From source file:Main.java
public static void showKeyboard(Context context, View view) { InputMethodManager inputMethodManager = (InputMethodManager) context .getSystemService(Context.INPUT_METHOD_SERVICE); if (view.requestFocus()) { inputMethodManager.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); }//from www .j a v a 2s . c o m }
From source file:org.mozilla.focus.utils.ViewUtils.java
public static void showKeyboard(View view) { InputMethodManager imm = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(view, 0); }
From source file:Main.java
public static void showKeyboard(View view) { if (view == null) { return;// w w w . j av a2s. c om } InputMethodManager imm = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (!imm.isActive()) { return; } imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); }
From source file:Main.java
public static void showKeyboard(EditText editText) { editText.requestFocus();// w ww . j a v a 2s. c o m InputMethodManager inputMethodManager = (InputMethodManager) editText.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (inputMethodManager != null) { inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); } }