语言

FocusFinder.FindNearestTouchable 方法

定义

找到指定视图的最接近的可触摸视图。

[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

参数

root
ViewGroup

要在其中搜索的树的根

x
Int32

从中开始搜索的 X 坐标

y
Int32

从中开始搜索的 Y 坐标

direction
FocusSearchDirection

方向查找

deltas
Int32[]

从 <x、y> 到最接近视图边缘的偏移量。 请注意,此数组可能已填充值。

返回

最接近的可触摸视图,如果不存在,则为 null。

特性

注解

找到指定视图的最接近的可触摸视图。

Java文档android.view.FocusFinder.findNearestTouchable(android.view.ViewGroup, int, int, int, int[])。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于