# DimensionBuilders.BoundingBoxRatio.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.BoundingBoxRatio.Builder) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)

*** ** * ** ***


```
public final class DimensionBuilders.BoundingBoxRatio.Builder
```

<br />

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 400) https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.BoundingBoxRatio.Builder#Builder(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 ratio)` Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.BoundingBoxRatio.Builder`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.BoundingBoxRatio` | `https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.BoundingBoxRatio.Builder#build()()` Builds an instance from accumulated values. |

## Public constructors

### Builder

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

```
@RequiresSchemaVersion(major = 1, minor = 400)
public Builder(@NonNull TypeBuilders.FloatProp ratio)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.FloatProp ratio` | the ratio proportional to the bounding box width/height. Value 0 represents the location at the top / start of the bounding box, value 1 represents the location at the bottom / end of the bounding box, and value 0.5 represents the middle of the bounding box. Values outside \[0, 1\] are also valid. Dynamic value is supported. |

## Public methods

### build

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

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

Builds an instance from accumulated values.