Sdílet prostřednictvím


InputMethodManager.HideSoftInputFromWindow Method

Definition

Overloads

HideSoftInputFromWindow(IBinder, HideSoftInputFlags)

Synonym for #hideSoftInputFromWindow(IBinder, int, ResultReceiver) without a result: request to hide the soft input window from the context of the window that is currently accepting input.

HideSoftInputFromWindow(IBinder, HideSoftInputFlags, ResultReceiver)

Request to hide the soft input window from the context of the window that is currently accepting input.

HideSoftInputFromWindow(IBinder, HideSoftInputFlags)

Synonym for #hideSoftInputFromWindow(IBinder, int, ResultReceiver) without a result: request to hide the soft input window from the context of the window that is currently accepting input.

[Android.Runtime.Register("hideSoftInputFromWindow", "(Landroid/os/IBinder;I)Z", "")]
public bool HideSoftInputFromWindow (Android.OS.IBinder? windowToken, Android.Views.InputMethods.HideSoftInputFlags flags);
[<Android.Runtime.Register("hideSoftInputFromWindow", "(Landroid/os/IBinder;I)Z", "")>]
member this.HideSoftInputFromWindow : Android.OS.IBinder * Android.Views.InputMethods.HideSoftInputFlags -> bool

Parameters

windowToken
IBinder

The token of the window that is making the request, as returned by View#getWindowToken() View.getWindowToken().

flags
HideSoftInputFlags

Provides additional operating flags. Currently may be 0 or have the #HIDE_IMPLICIT_ONLY bit set.

Returns

Attributes

Remarks

Synonym for #hideSoftInputFromWindow(IBinder, int, ResultReceiver) without a result: request to hide the soft input window from the context of the window that is currently accepting input.

Java documentation for android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(android.os.IBinder, int).

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.

Applies to

HideSoftInputFromWindow(IBinder, HideSoftInputFlags, ResultReceiver)

Request to hide the soft input window from the context of the window that is currently accepting input.

[Android.Runtime.Register("hideSoftInputFromWindow", "(Landroid/os/IBinder;ILandroid/os/ResultReceiver;)Z", "")]
public bool HideSoftInputFromWindow (Android.OS.IBinder? windowToken, Android.Views.InputMethods.HideSoftInputFlags flags, Android.OS.ResultReceiver? resultReceiver);
[<Android.Runtime.Register("hideSoftInputFromWindow", "(Landroid/os/IBinder;ILandroid/os/ResultReceiver;)Z", "")>]
member this.HideSoftInputFromWindow : Android.OS.IBinder * Android.Views.InputMethods.HideSoftInputFlags * Android.OS.ResultReceiver -> bool

Parameters

windowToken
IBinder

The token of the window that is making the request, as returned by View#getWindowToken() View.getWindowToken().

flags
HideSoftInputFlags

Provides additional operating flags. Currently may be 0 or have the #HIDE_IMPLICIT_ONLY bit set.

resultReceiver
ResultReceiver

If non-null, this will be called by the IME when it has processed your request to tell you what it has done. The result code you receive may be either #RESULT_UNCHANGED_SHOWN, #RESULT_UNCHANGED_HIDDEN, #RESULT_SHOWN, or #RESULT_HIDDEN.

Returns

Attributes

Remarks

Request to hide the soft input window from the context of the window that is currently accepting input. This should be called as a result of the user doing some actually than fairly explicitly requests to have the input window hidden.

<strong>Caveat:</strong> ResultReceiver instance passed to this method can be a long-lived object, because it may not be garbage-collected until all the corresponding ResultReceiver objects transferred to different processes get garbage-collected. Follow the general patterns to avoid memory leaks in Android. Consider to use java.lang.ref.WeakReference so that application logic objects such as android.app.Activity and Context can be garbage collected regardless of the lifetime of ResultReceiver.

Java documentation for android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(android.os.IBinder, int, android.os.ResultReceiver).

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.

Applies to