# DimensionBuilders.ExpandedDimensionProp.Builder

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/DimensionBuilders.java+class:androidx.wear.protolayout.DimensionBuilders.ExpandedDimensionProp.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public final class DimensionBuilders.ExpandedDimensionProp.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp.Builder#Builder()()` Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp.Builder`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp` | `https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp.Builder#build()()` Builds an instance from accumulated values. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp.Builder#setLayoutWeight(androidx.wear.protolayout.TypeBuilders.FloatProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.FloatProp layoutWeight)` Sets the layout weight (a dimensionless scalar value) for this element. |

## Public constructors

### Builder

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public Builder()
```

Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ExpandedDimensionProp.Builder`.

## Public methods

### build

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull DimensionBuilders.ExpandedDimensionProp build()
```

Builds an instance from accumulated values.

### setLayoutWeight

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#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 `https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Row` or the height of children of a `https://developer.android.com/reference/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.