View.GetGlobalVisibleRect 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| GetGlobalVisibleRect(Rect) |
將 設 |
| GetGlobalVisibleRect(Rect, Point) |
將 設 |
GetGlobalVisibleRect(Rect)
將 設 r 為該視圖根視圖座標空間中未被裁剪區域的座標。
[Android.Runtime.Register("getGlobalVisibleRect", "(Landroid/graphics/Rect;)Z", "")]
public bool GetGlobalVisibleRect(Android.Graphics.Rect? r);
[<Android.Runtime.Register("getGlobalVisibleRect", "(Landroid/graphics/Rect;)Z", "")>]
member this.GetGlobalVisibleRect : Android.Graphics.Rect -> bool
參數
- r
- Rect
若方法返回為真,則包含該視圖根視圖座標空間中可見部分的座標。 若方法回傳為 false,表示 的內容 r 未定義。
傳回
若至少部分視圖在根視圖中可見,則為真;否則為假。
- 屬性
備註
將 設 r 為該視圖根視圖座標空間中未被裁剪區域的座標。
如需相關資訊,請參閱 #getGlobalVisibleRect(Rect, Point) getGlobalVisibleRect(Rect, Point) 。
的 android.view.View.getGlobalVisibleRect(android.graphics.Rect)Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
GetGlobalVisibleRect(Rect, Point)
將 設 r 為該視圖根視圖座標空間中未被裁剪區域的座標。
[Android.Runtime.Register("getGlobalVisibleRect", "(Landroid/graphics/Rect;Landroid/graphics/Point;)Z", "GetGetGlobalVisibleRect_Landroid_graphics_Rect_Landroid_graphics_Point_Handler")]
public virtual bool GetGlobalVisibleRect(Android.Graphics.Rect? r, Android.Graphics.Point? globalOffset);
[<Android.Runtime.Register("getGlobalVisibleRect", "(Landroid/graphics/Rect;Landroid/graphics/Point;)Z", "GetGetGlobalVisibleRect_Landroid_graphics_Rect_Landroid_graphics_Point_Handler")>]
abstract member GetGlobalVisibleRect : Android.Graphics.Rect * Android.Graphics.Point -> bool
override this.GetGlobalVisibleRect : Android.Graphics.Rect * Android.Graphics.Point -> bool
參數
- r
- Rect
若方法返回為真,則包含該視圖根視圖座標空間中可見部分的座標。 若方法回傳為 false,表示 的內容 r 未定義。
- globalOffset
- Point
若方法回傳為真,則包含該視圖根視圖左上角 x 與 y 座標的偏移量。 若方法回傳為 false,表示 的內容 globalOffset 未定義。 該參數可以為零(參見 #getGlobalVisibleRect(Rect) getGlobalVisibleRect(Rect)。
傳回
若至少部分視圖在根視圖中可見,則為真;若視圖完全被裁剪或移出根視圖的可見區域,則為假。
- 屬性
備註
將 設 r 為該視圖根視圖座標空間中未被裁剪區域的座標。 設定 globalOffset 為視圖 x 與 y 座標相對於座標空間原點的偏移量,原點是根視圖的左上角,無論螢幕裝飾與系統介面元素如何。
若要轉換為r相對於此視圖左上角的座標(不考慮視角旋轉),並以 &mdash 的反值r來偏移globalOffset;r.offset(-globalOffset.x, -globalOffset.y)—這等價於稱呼 #getLocalVisibleRect(Rect) getLocalVisibleRect(Rect)。
<b>註:</b> 不要使用此方法在多視窗模式下決定視窗大小;使用 WindowManager#getCurrentWindowMetrics()。
的 android.view.View.getGlobalVisibleRect(android.graphics.Rect, android.graphics.Point)Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。