Show Virtual Keyboard by force - Android User Interface

Android examples for User Interface:Input Method

Description

Show Virtual Keyboard by force

Demo Code


//package com.java2s;
import android.content.Context;

import android.text.InputType;

import android.view.inputmethod.InputMethodManager;

public class Main {
    /**/*from  w ww .  ja  va 2  s.c  om*/
     * Show Virtual Keyboard by force
     */
    public static void showVirturalKeyboard(Context context) {
        InputMethodManager inputMethodManager = (InputMethodManager) context
                .getSystemService(Context.INPUT_METHOD_SERVICE);
        inputMethodManager.toggleSoftInput(InputType.TYPE_CLASS_NUMBER,
                InputMethodManager.SHOW_IMPLICIT);
    }
}

Related Tutorials