DimensionBuilders.DpProp


@RequiresSchemaVersion(major = 1, minor = 0)
public final class DimensionBuilders.DpProp implements DimensionBuilders.AngularDimension, DimensionBuilders.ContainerDimension, DimensionBuilders.ImageDimension, DimensionBuilders.SpacerDimension, DimensionBuilders.ExtensionDimension, DimensionBuilders.PivotDimension


A type for linear dimensions, measured in dp.

Summary

Nested types

Builder for DpProp.

Public methods

@Nullable DynamicBuilders.DynamicFloat

Gets the dynamic value, in dp.

@Dimension(unit = 0) float

Gets the static value, in dp.

@NonNull String

Public methods

getDynamicValue

Added in 1.0.0
public @Nullable DynamicBuilders.DynamicFloat getDynamicValue()

Gets the dynamic value, in dp. Note that when setting this value, the static value is still required to be set to support older renderers that only read the static value. If dynamicValue has an invalid result, the provided static value will be used instead.

getValue

Added in 1.0.0
public @Dimension(unit = 0) float getValue()

Gets the static value, in dp. If a dynamic value is also set and the renderer supports dynamic values for the corresponding field, this static value will be ignored. If the static value is not specified, zero will be used instead.

toString

public @NonNull String toString()