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;y座標,位於索引1。
- 屬性
備註
取得該視圖在包含該視圖的座標空間 Surface 中的座標。
在多螢幕情境中,若曲面跨越多個螢幕,則該曲面的座標空間也跨越多個螢幕。
方法回傳後,參數陣列會包含視圖相對於視圖左側和上邊的 x 和 y 座標。
的 android.view.View.getLocationInSurface(int[])Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。