private void updateInputState() { // Make sure that if the user changes the value and the IME is active // for one of the inputs if this widget, the IME is closed. If the user // changed the value via the IME and there is a next input the IME will // be shown, otherwise the user chose another means of changing the // value and having the IME up makes no sense. android.view.inputmethod.InputMethodManager inputMethodManager = android.view.inputmethod.InputMethodManager .peekInstance(); if (inputMethodManager != null) { if (inputMethodManager.isActive(mHourSpinnerInput)) { mHourSpinnerInput.clearFocus(); inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0); } else { if (inputMethodManager.isActive(mMinuteSpinnerInput)) { mMinuteSpinnerInput.clearFocus(); inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0); } else { if (inputMethodManager.isActive(mAmPmSpinnerInput)) { mAmPmSpinnerInput.clearFocus(); inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0); } } } } }
internal virtual android.view.View removeViewLocked(int index) { android.view.ViewRootImpl root = mRoots[index]; android.view.View view = root.getView(); // Don't really remove until we have matched all calls to add(). root.mAddNesting--; if (root.mAddNesting > 0) { return(view); } if (view != null) { android.view.inputmethod.InputMethodManager imm = android.view.inputmethod.InputMethodManager .getInstance(view.getContext()); if (imm != null) { imm.windowDismissed(mViews[index].getWindowToken()); } } root.die(false); finishRemoveViewLocked(view, index); return(view); }
internal BaseInputConnection(android.view.inputmethod.InputMethodManager mgr, bool fullEditor) { throw new System.NotImplementedException(); }
protected internal override void viewClicked(android.view.inputmethod.InputMethodManager imm) { throw new System.NotImplementedException(); }
/// <summary> /// Internally, the input method manager can't be context-dependent, so /// we have this here for the places that need it. /// </summary> /// <remarks> /// Internally, the input method manager can't be context-dependent, so /// we have this here for the places that need it. /// </remarks> /// <hide></hide> public static android.view.inputmethod.InputMethodManager getInstance(android.os.Looper mainLooper) { lock (mInstanceSync) { if (mInstance != null) { return mInstance; } android.os.IBinder b = android.os.ServiceManager.getService(android.content.Context .INPUT_METHOD_SERVICE); [email protected] service = [email protected] .Stub.asInterface(b); mInstance = new android.view.inputmethod.InputMethodManager(service, mainLooper); } return mInstance; }
internal InputMethodManager([email protected] service, android.os.Looper looper) { mDummyInputConnection = new android.view.inputmethod.BaseInputConnection(this, false ); // For scheduling work on the main thread. This also serves as our // global lock. // Our generic input connection if the current target does not have its own. // ----------------------------------------------------------- // Cursor position on the screen. // ----------------------------------------------------------- // ----------------------------------------------------------- // XXX the server has already unbound! // If we were actively using the last input method, then // we would like to re-connect to the next input method. // Some other client has starting using the IME, so note // that this happened and make sure our own editor's // state is reset. // Note that finishComposingText() is allowed to run // even when we are not active. // No need to check for dump permission, since we only give this // interface to the system. mService = service; mMainLooper = looper; mH = new android.view.inputmethod.InputMethodManager.H(this, looper); mIInputContext = new android.view.inputmethod.InputMethodManager.ControlledInputConnectionWrapper (this, looper, mDummyInputConnection); if (mInstance == null) { mInstance = this; } }