語言

WindowInsets.Inset 方法

定義

多載

名稱 Description
Inset(Insets)

回傳此實例的副本,內嵌於指定方向。

Inset(Int32, Int32, Int32, Int32)

回傳此實例的副本,內嵌於指定方向。

Inset(Insets)

回傳此實例的副本,內嵌於指定方向。

[Android.Runtime.Register("inset", "(Landroid/graphics/Insets;)Landroid/view/WindowInsets;", "", ApiSince=30)]
public Android.Views.WindowInsets Inset(Android.Graphics.Insets insets);
[<Android.Runtime.Register("inset", "(Landroid/graphics/Insets;)Landroid/view/WindowInsets;", "", ApiSince=30)>]
member this.Inset : Android.Graphics.Insets -> Android.Views.WindowInsets

參數

insets
Insets

需要從四面八方移除的凹槽數量。

傳回

內嵌插圖

屬性

備註

回傳此實例的副本,內嵌於指定方向。

此設計旨在將嵌入區域分配到視窗中比目前面積更小的區域。

範例:

childView.dispatchApplyWindowInsets(insets.inset(childMargins));

Java 文件 android.view.WindowInsets.inset(android.graphics.Insets)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Inset(Int32, Int32, Int32, Int32)

回傳此實例的副本,內嵌於指定方向。

[Android.Runtime.Register("inset", "(IIII)Landroid/view/WindowInsets;", "", ApiSince=29)]
public Android.Views.WindowInsets Inset(int left, int top, int right, int bottom);
[<Android.Runtime.Register("inset", "(IIII)Landroid/view/WindowInsets;", "", ApiSince=29)>]
member this.Inset : int * int * int * int -> Android.Views.WindowInsets

參數

left
Int32

從左邊移除的插入數量。 必須是非負數。

top
Int32

要從頂部移除的凹槽數量。 必須是非負數。

right
Int32

從右側移除的插入數量。 必須是非負數。

bottom
Int32

需要從底部移除的凹槽數量。 必須是非負數。

傳回

內嵌插圖

屬性

備註

回傳此實例的副本,內嵌於指定方向。

此設計旨在將嵌入區域分配到視窗中比目前面積更小的區域。

範例:

childView.dispatchApplyWindowInsets(insets.inset(
                    childMarginLeft, childMarginTop, childMarginBottom, childMarginRight));

Java 文件 android.view.WindowInsets.inset(int, int, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於