Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.view.View; import android.view.inputmethod.InputMethodManager; public class Main { public static boolean isKeyboardShowed(View view) { if (view == null) { return false; } try { InputMethodManager inputManager = (InputMethodManager) view.getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); return inputManager.isActive(view); } catch (Exception e) { e.printStackTrace(); } return false; } }