다음을 통해 공유


WindowInsets.Inset Method

Definition

Overloads

Inset(Insets)

Returns a copy of this instance inset in the given directions.

Inset(Int32, Int32, Int32, Int32)

Returns a copy of this instance inset in the given directions.

Inset(Insets)

Returns a copy of this instance inset in the given directions.

[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

Parameters

insets
Insets

the amount of insets to remove from all sides.

Returns

the inset insets

Attributes

Remarks

Returns a copy of this instance inset in the given directions.

This is intended for dispatching insets to areas of the window that are smaller than the current area.

Example:

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

Java documentation for android.view.WindowInsets.inset(android.graphics.Insets).

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

Inset(Int32, Int32, Int32, Int32)

Returns a copy of this instance inset in the given directions.

[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

Parameters

left
Int32

the amount of insets to remove from the left. Must be non-negative.

top
Int32

the amount of insets to remove from the top. Must be non-negative.

right
Int32

the amount of insets to remove from the right. Must be non-negative.

bottom
Int32

the amount of insets to remove from the bottom. Must be non-negative.

Returns

the inset insets

Attributes

Remarks

Returns a copy of this instance inset in the given directions.

This is intended for dispatching insets to areas of the window that are smaller than the current area.

Example:

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

Java documentation for android.view.WindowInsets.inset(int, int, int, 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