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

Offset.Companion

public static class Offset.Companion


Summary

Public methods

static final @NonNull Offset

An offset with infinite x and y components.

static final @NonNull Offset

Represents an unspecified Offset value, usually a replacement for null when a primitive value is desired.

static final @NonNull Offset

An offset with zero magnitude.

Extension functions

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

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

static final @NonNull Offset

Visibility threshold for Offset.

Public methods

getInfinite

public static final @NonNull Offset getInfinite()

An offset with infinite x and y components.

See also:

getUnspecified

public static final @NonNull Offset getUnspecified()

Represents an unspecified Offset value, usually a replacement for null when a primitive value is desired.

getZero

public static final @NonNull Offset getZero()

An offset with zero magnitude.

This can be used to represent the origin of a coordinate space.

Extension functions

VectorConvertersKt.getVectorConverter

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

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

VisibilityThresholdsKt.getVisibilityThreshold

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

Visibility threshold for Offset. 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.