Java tutorial
//package com.java2s; import android.app.Dialog; import android.view.WindowManager; public class Main { /** * Sets the parameter to show IME when the given dialog is shown. */ static void showInputMethod(Dialog dialog) { dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); } }