Shows the soft keyboard - Android User Interface

Android examples for User Interface:Input Method

Description

Shows the soft keyboard

Demo Code


//package com.java2s;

import android.content.Context;

import android.view.View;

import android.view.inputmethod.InputMethodManager;

public class Main {
    /**/* w  w  w . j a  va2s .  com*/
     * Shows the soft keyboard
     */
    public static void showSoftKeyboard(Context context, View view) {
        InputMethodManager inputMethodManager = (InputMethodManager) context
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        view.requestFocus();
        inputMethodManager.showSoftInput(view,
                InputMethodManager.SHOW_IMPLICIT);
    }
}

Related Tutorials