Freigeben über


ViewTreeObserver.AddOnWindowFocusChangeListener Method

Definition

Register a callback to be invoked when the window focus state within the view tree changes.

[Android.Runtime.Register("addOnWindowFocusChangeListener", "(Landroid/view/ViewTreeObserver$OnWindowFocusChangeListener;)V", "")]
public void AddOnWindowFocusChangeListener (Android.Views.ViewTreeObserver.IOnWindowFocusChangeListener? listener);
[<Android.Runtime.Register("addOnWindowFocusChangeListener", "(Landroid/view/ViewTreeObserver$OnWindowFocusChangeListener;)V", "")>]
member this.AddOnWindowFocusChangeListener : Android.Views.ViewTreeObserver.IOnWindowFocusChangeListener -> unit

Parameters

listener
ViewTreeObserver.IOnWindowFocusChangeListener

The callback to add

Attributes

Exceptions

If IsAlive returns false

Remarks

Java documentation for android.view.ViewTreeObserver.addOnWindowFocusChangeListener(android.view.OnWindowFocusChangeListener).

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