# DividerAttributes.FixedDividerAttributes.Builder

Artifact: [androidx.window:window](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/embedding/DividerAttributes.kt+class:androidx.window.embedding.DividerAttributes.FixedDividerAttributes.Builder) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

*** ** * ** ***

<br />

```
@RequiresWindowSdkExtension(version = 6)
class DividerAttributes.FixedDividerAttributes.Builder
```

<br />

*** ** * ** ***

The `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` builder.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder#Builder()()` creates a new `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder` |
| `@https://developer.android.com/reference/kotlin/androidx/window/RequiresWindowSdkExtension(version = 6) https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder#Builder(androidx.window.embedding.DividerAttributes.FixedDividerAttributes)(original: https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes)` The `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` builder constructor initialized by an existing `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes`. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` | `@https://developer.android.com/reference/kotlin/androidx/window/RequiresWindowSdkExtension(version = 6) https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder#build()()` Builds a `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` instance. |
| `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder` | `@https://developer.android.com/reference/kotlin/androidx/window/RequiresWindowSdkExtension(version = 6) https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder#setColor(kotlin.Int)(color: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the color of the divider. |
| `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder` | `@https://developer.android.com/reference/kotlin/androidx/window/RequiresWindowSdkExtension(version = 6) https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder#setWidthDp(kotlin.Int)(widthDp: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = -1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the divider width. |

## Public constructors

### Builder

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

```
Builder()
```

creates a new `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder`

### Builder

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

```
@RequiresWindowSdkExtension(version = 6)
Builder(original: DividerAttributes.FixedDividerAttributes)
```

The `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` builder constructor initialized by an existing `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes`.

| Parameters |
|---|---|
| `original: https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` | the original `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` to initialize the `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder`. |

## Public functions

### build

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

```
@RequiresWindowSdkExtension(version = 6)
fun build(): DividerAttributes.FixedDividerAttributes
```

Builds a `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` instance.

### setColor

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

```
@RequiresWindowSdkExtension(version = 6)
fun setColor(color: @ColorInt Int): DividerAttributes.FixedDividerAttributes.Builder
```

Sets the color of the divider. If not set, the default color `https://developer.android.com/reference/android/graphics/Color.html#BLACK` is used.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the provided value is invalid. |

### setWidthDp

Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

```
@RequiresWindowSdkExtension(version = 6)
fun setWidthDp(widthDp: @IntRange(from = -1) Int): DividerAttributes.FixedDividerAttributes.Builder
```

Sets the divider width. It defaults to `https://developer.android.com/reference/kotlin/androidx/window/embedding/DividerAttributes#WIDTH_SYSTEM_DEFAULT()`, which means the system will choose a default value based on the display size and form factor.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the provided value is invalid. |