Example usage for android.view.inputmethod InputMethodManager showSoftInput

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

Introduction

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

Prototype

public boolean showSoftInput(View view, int flags) 

Source Link

Document

Synonym for #showSoftInput(View,int,ResultReceiver) without a result receiver: explicitly request that the current input method's soft input area be shown to the user, if needed.

Usage

From source file:Main.java

public static void showInputSoftFromWindowMethod(Context context, View view) {
    try {//  ww  w.java 2s  .c  om
        InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:Main.java

public static void showKeyBoard(Context context, View view) {
    try {/*from   www . j ava2s. c o  m*/
        InputMethodManager imm = ((InputMethodManager) context.getSystemService(context.INPUT_METHOD_SERVICE));
        imm.showSoftInput(view, 0);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file: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);
}

From source file:Main.java

public static void showSoftInput(Context context, View view, boolean requestFocus) {
    if (requestFocus) {
        view.requestFocus();//from   w  ww .  j av  a  2 s  .  co  m
    }
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Service.INPUT_METHOD_SERVICE);
    imm.showSoftInput(view, 0);
}

From source file:Main.java

public static void showKeyboard(Context context, EditText editText) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    if (imm != null)
        imm.showSoftInput(editText, 0);
}

From source file:Main.java

public static void showInput(EditText editText) {
    InputMethodManager imm = (InputMethodManager) editText.getContext()
            .getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
}

From source file:Main.java

public static void showSoftInput(View view) {
    // TODO Auto-generated method stub
    InputMethodManager imm = (InputMethodManager) view.getContext()
            .getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);

}

From source file:Main.java

public static void showKeyboard(EditText editText) {
    InputMethodManager imm = (InputMethodManager) editText.getContext()
            .getSystemService(Service.INPUT_METHOD_SERVICE);
    imm.showSoftInput(editText, 0);
}

From source file:Main.java

public static void showSoftKeyboard(View view) {
    Context context = view.getContext();
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    view.requestFocus();//  w w w. ja  v a  2  s .  c  o  m
    imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
}

From source file:Main.java

public static void showInputMethod(Context context, View view) {
    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
    if (imm != null) {
        imm.showSoftInput(view, 0);
    }//from   w w w.  j a v a  2  s . c  o m
}