DimensionBuilders.DpProp


@RequiresSchemaVersion(major = 1, minor = 0)
class DimensionBuilders.DpProp : 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 functions

DynamicBuilders.DynamicFloat?

Gets the dynamic value, in dp.

@Dimension(unit = 0) Float

Gets the static value, in dp.

String

Public functions

getDynamicValue

Added in 1.0.0
fun getDynamicValue(): DynamicBuilders.DynamicFloat?

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
fun getValue(): @Dimension(unit = 0) Float

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

fun toString(): String