/* * This method toggles the input method window display. * If the input window is already displayed, it gets hidden. * If not the input window will be displayed. * @param showFlags Provides additional operating flags. May be * 0 or have the {@link #SHOW_IMPLICIT}, * {@link #SHOW_FORCED} bit set. * @param hideFlags Provides additional operating flags. May be * 0 or have the {@link #HIDE_IMPLICIT_ONLY}, * {@link #HIDE_NOT_ALWAYS} bit set. * @hide */ public void toggleSoftInput(int showFlags, int hideFlags) { if (mCurMethod != null) { try { mCurMethod.toggleSoftInput(showFlags, hideFlags); } catch (RemoteException e) { } } }
/** * This method toggles the input method window display. If the input window is already displayed, * it gets hidden. If not the input window will be displayed. * * @param windowToken The token of the window that is making the request, as returned by {@link * View#getWindowToken() View.getWindowToken()}. * @param showFlags Provides additional operating flags. May be 0 or have the {@link * #SHOW_IMPLICIT}, {@link #SHOW_FORCED} bit set. * @param hideFlags Provides additional operating flags. May be 0 or have the {@link * #HIDE_IMPLICIT_ONLY}, {@link #HIDE_NOT_ALWAYS} bit set. */ public void toggleSoftInputFromWindow(IBinder windowToken, int showFlags, int hideFlags) { synchronized (mH) { if (mServedView == null || mServedView.getWindowToken() != windowToken) { return; } if (mCurMethod != null) { try { mCurMethod.toggleSoftInput(showFlags, hideFlags); } catch (RemoteException e) { } } } }