Share via


FocusFinder.FindNearestTouchable Method

Definition

Find the nearest touchable view to the specified view.

[Android.Runtime.Register("findNearestTouchable", "(Landroid/view/ViewGroup;III[I)Landroid/view/View;", "GetFindNearestTouchable_Landroid_view_ViewGroup_IIIarrayIHandler")]
public virtual Android.Views.View? FindNearestTouchable (Android.Views.ViewGroup? root, int x, int y, Android.Views.FocusSearchDirection direction, int[]? deltas);
[<Android.Runtime.Register("findNearestTouchable", "(Landroid/view/ViewGroup;III[I)Landroid/view/View;", "GetFindNearestTouchable_Landroid_view_ViewGroup_IIIarrayIHandler")>]
abstract member FindNearestTouchable : Android.Views.ViewGroup * int * int * Android.Views.FocusSearchDirection * int[] -> Android.Views.View
override this.FindNearestTouchable : Android.Views.ViewGroup * int * int * Android.Views.FocusSearchDirection * int[] -> Android.Views.View

Parameters

root
ViewGroup

The root of the tree in which to search

x
Int32

X coordinate from which to start the search

y
Int32

Y coordinate from which to start the search

direction
FocusSearchDirection

Direction to look

deltas
Int32[]

Offset from the <x, y> to the edge of the nearest view. Note that this array may already be populated with values.

Returns

The nearest touchable view, or null if none exists.

Attributes

Remarks

Find the nearest touchable view to the specified view.

Java documentation for android.view.FocusFinder.findNearestTouchable(android.view.ViewGroup, int, int, int, 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