List of usage examples for android.view.inputmethod InputMethodManager showSoftInput
public boolean showSoftInput(View view, int flags)
From source file:com.vinexs.tool.Utility.java
public static void showKeyBroad(Activity activity) { try {//from w w w. ja v a2s .c om InputMethodManager inputMethodManager = (InputMethodManager) activity .getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.showSoftInput(activity.getCurrentFocus(), InputMethodManager.SHOW_IMPLICIT); } catch (Exception ignored) { } }
From source file:dev.drsoran.moloko.util.UIUtils.java
public final static void showSoftInput(View view) { if (view != null) { final InputMethodManager imm = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); }/*from w ww . jav a 2 s .co m*/ } }
From source file:de.baumann.hhsmoodle.helper.helper_main.java
public static void showKeyboard(final Activity activity, final EditText editText) { new Handler().postDelayed(new Runnable() { public void run() { InputMethodManager imm = (InputMethodManager) activity .getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); editText.setSelection(editText.length()); }// w w w .j a v a 2 s .c o m }, 200); }
From source file:library.artaris.cn.library.utils.SystemUtils.java
/** * /*www .j a va2 s.c o m*/ * @param context * @param editText */ public static void showSoftInputMethod(Context context, EditText editText) { if (context != null && editText != null) { editText.requestFocus(); InputMethodManager inputManager = (InputMethodManager) context .getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(editText, 0); } }
From source file:com.frostwire.android.gui.util.UIUtils.java
public static void showKeyboard(Context context, View view) { view.requestFocus();//w w w.j a v a2 s. c o m InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } }
From source file:com.xiaomi.account.utils.SysHelper.java
public static void displaySoftInputIfNeed(Context context, View focusedView, boolean tryDisplay) { InputMethodManager imm = (InputMethodManager) context.getSystemService("input_method"); if (tryDisplay && context.getResources().getConfiguration().orientation == 1) { imm.showSoftInput(focusedView, 0); } else {/*from w ww. ja v a2s .c o m*/ imm.hideSoftInputFromWindow(focusedView.getWindowToken(), 0); } }
From source file:com.apptentive.android.sdk.util.Util.java
public static void showSoftKeyboard(Activity activity, View target) { if (activity != null && activity.getCurrentFocus() != null) { InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(target, 0); }//from ww w. j av a 2 s .c o m }
From source file:com.lee.sdk.utils.Utils.java
/** * Show the input method.// ww w. j ava2 s. c o m * * @param context context * @param view The currently focused view, which would like to receive soft keyboard input * @return success or not. */ public static boolean showInputMethod(Context context, View view) { if (context == null || view == null) { return false; } InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { return imm.showSoftInput(view, 0); } return false; }
From source file:com.gm.goldencity.util.Utils.java
/** * Show keyboard of a View/*from www . jav a 2s . c o m*/ * * @param context Application context * @param view Edit text or another view that you want hide the keyboard */ public static void showKeyboard(Context context, @NonNull View view) { InputMethodManager inputMethodManager = (InputMethodManager) context .getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); }
From source file:com.atwal.wakeup.battery.util.Utilities.java
public static void showSoftInput(InputMethodManager inputManager, View v) { inputManager.showSoftInput(v, InputMethodManager.SHOW_FORCED); }