# DimensionBuilders.ProportionalDimensionProp.Builder

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp.Builder "View this page in Java")

<br />

```
class DimensionBuilders.ProportionalDimensionProp.Builder
```

<br />

*** ** * ** ***

Builder for[ProportionalDimensionProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp).

## Summary

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

|                                                                                ### Public functions                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [DimensionBuilders.ProportionalDimensionProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp)                 | [build](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp.Builder#build())`()` Builds an instance from accumulated values.                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [DimensionBuilders.ProportionalDimensionProp.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [setAspectRatioHeight](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp.Builder#setAspectRatioHeight(int))`(aspectRatioHeight: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 0) `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the height to be used when calculating the aspect ratio ratio to preserve. |
| [DimensionBuilders.ProportionalDimensionProp.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [setAspectRatioWidth](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp.Builder#setAspectRatioWidth(int))`(aspectRatioWidth: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 0) `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the width to be used when calculating the aspect ratio to preserve.           |

## Public constructors

### Builder

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

```
Builder()
```

Creates an instance of[Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.ProportionalDimensionProp.Builder).  

## Public functions

### build

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

```
fun build(): DimensionBuilders.ProportionalDimensionProp
```

Builds an instance from accumulated values.  

### setAspectRatioHeight

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAspectRatioHeight(aspectRatioHeight: @IntRange(from = 0) Int): DimensionBuilders.ProportionalDimensionProp.Builder
```

Sets the height to be used when calculating the aspect ratio ratio to preserve.  

### setAspectRatioWidth

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
fun setAspectRatioWidth(aspectRatioWidth: @IntRange(from = 0) Int): DimensionBuilders.ProportionalDimensionProp.Builder
```

Sets the width to be used when calculating the aspect ratio to preserve.