DimensionBuilders.ExpandedDimensionProp.Builder


public final class DimensionBuilders.ExpandedDimensionProp.Builder


Builder for ExpandedDimensionProp.

Summary

Public constructors

Creates an instance of Builder.

Public methods

@NonNull DimensionBuilders.ExpandedDimensionProp

Builds an instance from accumulated values.

@NonNull DimensionBuilders.ExpandedDimensionProp.Builder
@RequiresSchemaVersion(major = 1, minor = 200)
setLayoutWeight(@NonNull TypeBuilders.FloatProp layoutWeight)

Sets the layout weight (a dimensionless scalar value) for this element.

Public constructors

Builder

Added in 1.0.0
public Builder()

Creates an instance of Builder.

Public methods

build

Added in 1.0.0
public @NonNull DimensionBuilders.ExpandedDimensionProp build()

Builds an instance from accumulated values.

setLayoutWeight

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
public @NonNull DimensionBuilders.ExpandedDimensionProp.Builder setLayoutWeight(@NonNull TypeBuilders.FloatProp layoutWeight)

Sets the layout weight (a dimensionless scalar value) for this element. This will only affect the width of children of a or the height of children of a androidx.wear.protolayout.LayoutElementBuilders.Column. By default, all children have equal weight. Where applicable, the width or height of the element is proportional to the sum of the weights of its siblings.

Note that negative values are not supported and it can lead to unexpected behaviour.

Note that this field only supports static values.