View.OnFocusChanged(Boolean, FocusSearchDirection, Rect) View.OnFocusChanged(Boolean, FocusSearchDirection, Rect) Method

Definition

Called by the view system when the focus state of this view changes.

[Android.Runtime.Register("onFocusChanged", "(ZILandroid/graphics/Rect;)V", "GetOnFocusChanged_ZILandroid_graphics_Rect_Handler")]
protected virtual void OnFocusChanged (bool gainFocus, Android.Views.FocusSearchDirection direction, Android.Graphics.Rect previouslyFocusedRect);
abstract member OnFocusChanged : bool * Android.Views.FocusSearchDirection * Android.Graphics.Rect -> unit
override this.OnFocusChanged : bool * Android.Views.FocusSearchDirection * Android.Graphics.Rect -> unit

Parameters

gainFocus
Boolean Boolean

True if the View has focus; false otherwise.

direction
FocusSearchDirection FocusSearchDirection

The direction focus has moved when requestFocus() is called to give this view focus. Values are Up, Down, Left, Right, Forward, or Android.Views.View.FOCUS_BACKWARD. It may not always apply, in which case use the default.

previouslyFocusedRect
Rect Rect

The rectangle, in this view's coordinate system, of the previously focused view. If applicable, this will be passed in as finer grained information about where the focus is coming from (in addition to direction). Will be null otherwise.

Remarks

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