List of usage examples for android.view.inputmethod InputMethodManager SHOW_IMPLICIT
int SHOW_IMPLICIT
To view the source code for android.view.inputmethod InputMethodManager SHOW_IMPLICIT.
Click Source Link
From source file:Main.java
public static void showKeyboard(EditText editText) { editText.requestFocus();//from ww w .j av a2 s . c o m InputMethodManager inputMethodManager = (InputMethodManager) editText.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (inputMethodManager != null) { inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); } }
From source file:Main.java
public static void showKeyboard(View view) { if (view == null) { return;/* w w w. j a va2 s . c o m*/ } try { InputMethodManager inputManager = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } catch (Exception e) { e.printStackTrace(); } }
From source file:Main.java
/** Show soft keyboard when editText is focused * * @param activity/*from ww w. jav a2 s.c o m*/ * @param edit_text */ public static void showSoftKeyboard(Activity activity, EditText edit_text) { imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(edit_text, InputMethodManager.SHOW_IMPLICIT); }
From source file:Main.java
public static void showKeys(Context context, TextView textView) { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(textView, InputMethodManager.SHOW_IMPLICIT); }
From source file:Main.java
public static void showInputMethod(Activity activity) { InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); View currentFocus = activity.getCurrentFocus(); if (currentFocus != null) { imm.hideSoftInputFromWindow(currentFocus.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); imm.showSoftInput(currentFocus, InputMethodManager.SHOW_IMPLICIT); }//from w w w . j a v a2s .c o m // if (imm != null) { // imm.viewClicked(this); // } // if (imm != null && getShowSoftInputOnFocus()) { // imm.showSoftInput(this, 0); // } }
From source file:Main.java
public static void changeKeyBoard(Context context, EditText editText) { InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); editText.setFocusable(true);//from ww w. j av a 2 s . c om editText.setFocusableInTouchMode(true); editText.requestFocus(); if (imm.isActive()) { // imm.hideSoftInputFromWindow(getCurrentFocus() // .getWindowToken(), // InputMethodManager.HIDE_NOT_ALWAYS); imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, InputMethodManager.HIDE_NOT_ALWAYS); } }
From source file:Main.java
public static void showKeyboard(View view) { if (view == null) { return;//ww w . j a va2 s .c o m } InputMethodManager inputManager = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); }
From source file:Main.java
public static void showKeyboard(View view) { if (view == null) { return;/*from www. j a v a2s. com*/ } InputMethodManager inputManager = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); ((InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(view, 0); }
From source file:Main.java
public static void softKeyboardDelayed(final View view) { view.post(new Runnable() { @Override//from w w w. j a va2 s .c o m public void run() { if (!isHardwareKeyboardAvailable(view.getContext())) { InputMethodManager imm = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } } } }); }
From source file:Main.java
public static void showKeyboard(Context c, View v) { InputMethodManager mgr = (InputMethodManager) c.getSystemService(Context.INPUT_METHOD_SERVICE); mgr.showSoftInput(v, InputMethodManager.SHOW_IMPLICIT); }