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

DpOffset.Companion

public static class DpOffset.Companion


Summary

Public methods

static final @NonNull DpOffset

Represents an offset whose x and y are unspecified.

static final @NonNull DpOffset

A DpOffset with 0 DP x and 0 DP y values.

Extension functions

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

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

static final @NonNull DpOffset

Visibility threshold for DpOffset.

Public methods

getUnspecified

public static final @NonNull DpOffset getUnspecified()

Represents an offset whose x and y are unspecified. This is usually a replacement for null when a primitive value is desired. Access to x or y on an unspecified offset is not allowed.

getZero

public static final @NonNull DpOffset getZero()

A DpOffset with 0 DP x and 0 DP y values.

Extension functions

VectorConvertersKt.getVectorConverter

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

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

VisibilityThresholdsKt.getVisibilityThreshold

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

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