Java tutorial
//package com.java2s; import android.content.Context; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; public class Main { public static void showSoftInput(Context context, final EditText et) { if (context == null || et == null) { return; } InputMethodManager imm = (InputMethodManager) et.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(et, InputMethodManager.SHOW_FORCED); } }