InputMethodService.OnCustomImeSwitcherButtonRequestedVisible(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when the requested visibility of a custom IME Switcher button changes.
[Android.Runtime.Register("onCustomImeSwitcherButtonRequestedVisible", "(Z)V", "GetOnCustomImeSwitcherButtonRequestedVisible_ZHandler", ApiSince=36)]
public virtual void OnCustomImeSwitcherButtonRequestedVisible(bool visible);
[<Android.Runtime.Register("onCustomImeSwitcherButtonRequestedVisible", "(Z)V", "GetOnCustomImeSwitcherButtonRequestedVisible_ZHandler", ApiSince=36)>]
abstract member OnCustomImeSwitcherButtonRequestedVisible : bool -> unit
override this.OnCustomImeSwitcherButtonRequestedVisible : bool -> unit
Parameters
- visible
- Boolean
whether the button is requested visible or not.
- Attributes
Remarks
Called when the requested visibility of a custom IME Switcher button changes.
When this method is called with true by the system, the IME must show a button within its UI to switch IMEs. When it is called with false, it must hide this button.
Normally, the system provides a button for switching to a different IME when that is appropriate. Under certain circumstances, namely when the IME successfully asks to hide the system-provided navigation bar (with getWindowInsetsController().hide(captionBar())), providing this button is delegated to the IME through this callback.
This does not depend on the current visibility of the IME. It could be called with true while the IME is hidden, in which case the IME should prepare to show the button as soon as the IME itself is shown.
This is only called when the requested visibility changes. The default value is false and as such, this will not be called initially if the resulting value is false.
This can be called at any time after onCreate(), even if the IME is not currently visible. However, this is not guaranteed to be called before the IME is shown, as it may depend on the IME requesting to hide the system-provided navigation bar. If the request is sent during the showing flow (e.g. during onStartInputView(EditorInfo, boolean)), this will be called shortly after onWindowShown(), but before the first IME frame is drawn.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.