Example usage for android.view.inputmethod InputMethodManager SHOW_FORCED

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

Introduction

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

Prototype

int SHOW_FORCED

To view the source code for android.view.inputmethod InputMethodManager SHOW_FORCED.

Click Source Link

Document

Flag for #showSoftInput to indicate that the user has forced the input method open (such as by long-pressing menu) so it should not be closed until they explicitly do so.

Usage

From source file:Main.java

public static void showKeyboard(Context context, View view) {
    InputMethodManager manager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    manager.showSoftInput(view, InputMethodManager.SHOW_FORCED);
}

From source file:Main.java

public static void showSoftkeyboard(Context con, EditText editText) {
    InputMethodManager imm = (InputMethodManager) con.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED);
}

From source file:Main.java

public static void showKeyboard(Context context, View v) {
    v.requestFocus();/*from  w  w  w  .  ja  v  a 2  s . c o  m*/
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.showSoftInput(v, InputMethodManager.SHOW_FORCED);
}

From source file:Main.java

public static void showSoftPad(EditText editText) {
    InputMethodManager imm = (InputMethodManager) editText.getContext()
            .getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput(0, InputMethodManager.SHOW_FORCED);
}

From source file:Main.java

public static void showKeyBoard(Context context, View view) {
    view.requestFocus();/*from  w  w  w.j a v a2 s  . co m*/
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
}

From source file:Main.java

/**
 * Show iME.//from  w  w  w . j  av a2 s  .  co  m
 *
 * @param context the context
 */
public static void showKeyboard(Context context) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_NOT_ALWAYS);
}

From source file:Main.java

public static void showKeyboard(EditText view) {
    InputMethodManager imm = (InputMethodManager) view.getContext()
            .getSystemService(Context.INPUT_METHOD_SERVICE);
    view.requestFocus();// w w  w . jav  a2 s  . co  m
    imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}

From source file:Main.java

public static void showKeyboard(Context context) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE, InputMethodManager.SHOW_FORCED);
}

From source file:Main.java

public static void showSoftInput(Activity activity, View editText) {
    editText.requestFocus();//from w w  w.j  av  a 2s .c  om
    InputMethodManager imm = ((InputMethodManager) activity.getSystemService(activity.INPUT_METHOD_SERVICE));
    imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED);
}

From source file:Main.java

public static void showInputSoftFromWindowMethod(Context context, View view) {
    try {//  w w w .j a  va2  s  .  c o m
        InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);
    } catch (Exception e) {
        e.printStackTrace();
    }
}