次の方法で共有


View.GetLocationInSurface(Int32[]) Method

Definition

Gets the coordinates of this view in the coordinate space of the Surface that contains the view.

[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

Parameters

location
Int32[]

A two-element integer array in which the view coordinates are stored. The x-coordinate is at index 0; the y-coordinate, at index 1.

Attributes

Remarks

Gets the coordinates of this view in the coordinate space of the Surface that contains the view.

In multiple-screen scenarios, if the surface spans multiple screens, the coordinate space of the surface also spans multiple screens.

After the method returns, the argument array contains the x and y coordinates of the view relative to the view's left and top edges, respectively.

Java documentation for android.view.View.getLocationInSurface(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