# 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)
public final class DividerAttributes.FixedDividerAttributes.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

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

## Public constructors

### Builder

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

```
public Builder()
```

creates a new `https://developer.android.com/reference/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)
public Builder(@NonNull DividerAttributes.FixedDividerAttributes original)
```

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

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

## Public methods

### build

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

```
@RequiresWindowSdkExtension(version = 6)
public final @NonNull DividerAttributes.FixedDividerAttributes build()
```

Builds a `https://developer.android.com/reference/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)
public final @NonNull DividerAttributes.FixedDividerAttributes.Builder setColor(@ColorInt int color)
```

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)
public final @NonNull DividerAttributes.FixedDividerAttributes.Builder setWidthDp(@IntRange(from = -1) int widthDp)
```

Sets the divider width. It defaults to `https://developer.android.com/reference/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. |