List of usage examples for android.view.inputmethod InputMethodManager isActive
public boolean isActive()
From source file:org.zywx.wbpalmstar.engine.EBrowserView.java
private void hideSoftKeyboard() { try {// w w w .ja v a2 s . c o m InputMethodManager imm = (InputMethodManager) getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); if (imm.isActive()) { imm.hideSoftInputFromWindow(this.getWindowToken(), 0); } } catch (Exception e) { e.printStackTrace(); } }
From source file:com.tct.mail.browse.ConversationItemView.java
/** * hide the system's soft keyboard if it is active *//*from www . j av a 2s . c om*/ private void hideSoftKeyboard() { if (mContext == null) { return; } InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { if (imm.isActive()) { imm.hideSoftInputFromWindow(this.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); } } }
From source file:org.zywx.wbpalmstar.engine.universalex.EUExWindow.java
private void hideSoftKeyboard(IBinder wToken) { try {//from w w w .j a v a 2s . com InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm.isActive()) { imm.hideSoftInputFromWindow(wToken, 0); } } catch (Exception e) { e.printStackTrace(); } }