ViewTreeObserver.IOnGlobalFocusChangeListener.OnGlobalFocusChanged Method

Definition

Callback method to be invoked when the focus changes in the view tree.

[Android.Runtime.Register("onGlobalFocusChanged", "(Landroid/view/View;Landroid/view/View;)V", "GetOnGlobalFocusChanged_Landroid_view_View_Landroid_view_View_Handler:Android.Views.ViewTreeObserver/IOnGlobalFocusChangeListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnGlobalFocusChanged (Android.Views.View? oldFocus, Android.Views.View? newFocus);
[<Android.Runtime.Register("onGlobalFocusChanged", "(Landroid/view/View;Landroid/view/View;)V", "GetOnGlobalFocusChanged_Landroid_view_View_Landroid_view_View_Handler:Android.Views.ViewTreeObserver/IOnGlobalFocusChangeListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnGlobalFocusChanged : Android.Views.View * Android.Views.View -> unit

Parameters

oldFocus
View

The previously focused view, if any.

newFocus
View

The newly focused View, if any.

Attributes

Remarks

Callback method to be invoked when the focus changes in the view tree. When the view tree transitions from touch mode to non-touch mode, oldFocus is null. When the view tree transitions from non-touch mode to touch mode, newFocus is null. When focus changes in non-touch mode (without transition from or to touch mode) either oldFocus or newFocus can be null.

Java documentation for android.view.ViewTreeObserver.OnGlobalFocusChangeListener.onGlobalFocusChanged(android.view.View, android.view.View).

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