View.GetLocationInSurface(Int32[]) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在包含视图的坐标空间中获取此视图的 Surface 坐标。
[Android.Runtime.Register("getLocationInSurface", "([I)V", "GetGetLocationInSurface_arrayIHandler", ApiSince=29)]
public virtual void GetLocationInSurface(int[] location);
[<Android.Runtime.Register("getLocationInSurface", "([I)V", "GetGetLocationInSurface_arrayIHandler", ApiSince=29)>]
abstract member GetLocationInSurface : int[] -> unit
override this.GetLocationInSurface : int[] -> unit
参数
- location
- Int32[]
一个存储视图坐标的双元素整数数组。 x 坐标位于索引 0;索引 1 处的 y 坐标。
- 特性
注解
在包含视图的坐标空间中获取此视图的 Surface 坐标。
在多屏方案中,如果图面跨越多个屏幕,则图面的坐标空间也会跨越多个屏幕。
方法返回后,参数数组分别包含视图相对于视图的左边缘和上边缘的 x 和 y 坐标。
Java文档android.view.View.getLocationInSurface(int[])。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。