{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

Size.Companion

public static class Size.Companion


Summary

Public methods

static final @NonNull Size

A size whose width and height are unspecified.

static final @NonNull Size

An empty size, one with a zero width and a zero height.

Extension functions

static final @NonNull TwoWayConverter<@NonNull Size, @NonNull AnimationVector2D>

A type converter that converts a Size to a AnimationVector2D, and vice versa.

static final @NonNull Size

Visibility threshold for Size.

Public methods

getUnspecified

public static final @NonNull Size getUnspecified()

A size whose width and height are unspecified. This is a sentinel value used to initialize a non-null parameter. Access to width or height on an unspecified size is not allowed.

getZero

public static final @NonNull Size getZero()

An empty size, one with a zero width and a zero height.

Extension functions

VectorConvertersKt.getVectorConverter

public static final @NonNull TwoWayConverter<@NonNull Size, @NonNull AnimationVector2DVectorConvertersKt.getVectorConverter(@NonNull Size.Companion receiver)

A type converter that converts a Size to a AnimationVector2D, and vice versa.

VisibilityThresholdsKt.getVisibilityThreshold

public static final @NonNull Size VisibilityThresholdsKt.getVisibilityThreshold(
    @NonNull Size.Companion receiver
)

Visibility threshold for Size. This defines the amount of value change that is considered to be no longer visible. The animation system uses this to signal to some default spring animations to stop when the value is close enough to the target.