Insets

public final class Insets


An Insets instance holds four integer offsets which describe changes to the four edges of a Rectangle. By convention, positive values move edges towards the centre of the rectangle.

Insets are immutable so may be treated as values.

Summary

Constants

static final @NonNull Insets

Public fields

final int
final int
final int
final int

Public constructors

Public methods

static @NonNull Insets

Add two Insets.

@Override boolean

Two Insets instances are equal if they belong to the same class and their fields are pairwise equal.

@Override int
static @NonNull Insets

Returns the component-wise maximum of two Insets.

static @NonNull Insets

Returns the component-wise minimum of two Insets.

static @NonNull Insets
of(int left, int top, int right, int bottom)

Return an Insets instance with the appropriate values.

static @NonNull Insets

Return an Insets instance with the appropriate values.

static @NonNull Insets

Subtract two Insets.

static @RequiresApi(api = 29) @NonNull Insets

Return a copy of the given android.graphics.Insets instance, converted to be an Insets instance from AndroidX.

@RequiresApi(api = 29) @NonNull Insets