# DividerAttributes

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) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/window#1.4.0)

*** ** * ** ***


```
public abstract class DividerAttributes
```

<br />

Known direct subclasses [DividerAttributes.DraggableDividerAttributes](https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes), [DividerAttributes.FixedDividerAttributes](https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes)

|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes` | The attributes of a draggable divider. |
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` | The attributes of a fixed divider. |

*** ** * ** ***

The attributes of the divider layout and behavior.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/SplitAttributes.Builder#setDividerAttributes(androidx.window.embedding.DividerAttributes)` |   |
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` |   |
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes` |   |
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes#NO_DIVIDER()` |   |

## Summary

| ### Nested types |
|---|
| `public abstract class https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DragRange` Describes the range that the user is allowed to drag the draggable divider. |
| `public final class https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DragRange.SplitRatioDragRange extends https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DragRange` A drag range represented as an interval of the primary container's split ratios. |
| `public final class https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes extends https://developer.android.com/reference/androidx/window/embedding/DividerAttributes` The attributes of a draggable divider. |
| `@https://developer.android.com/reference/androidx/window/RequiresWindowSdkExtension(version = 6) public final class https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes.Builder` The `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes` builder. |
| `public final class https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes extends https://developer.android.com/reference/androidx/window/embedding/DividerAttributes` The attributes of a fixed divider. |
| `@https://developer.android.com/reference/androidx/window/RequiresWindowSdkExtension(version = 6) public final class https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder` The `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes` builder. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes#WIDTH_SYSTEM_DEFAULT()` A special value to indicate that the system will choose a default value based on the display size and form factor. |

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/DividerAttributes` | `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes#NO_DIVIDER()` Indicates that no divider is requested. |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes#getColor()()` the color of the divider. |
| `final int` | `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes#getWidthDp()()` the width of the divider. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes#toString()()` |

## Constants

### WIDTH_SYSTEM_DEFAULT

```
public static final int WIDTH_SYSTEM_DEFAULT
```

A special value to indicate that the system will choose a default value based on the display size and form factor. Some devices may choose 0 as the default width, while the same app may be shown with a wider divider on other devices that have a different default value. If an app prefers to show a divider of a fixed width on all device, it should set the fixed width in `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder#setWidthDp(kotlin.Int)` or `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes.Builder#setWidthDp(kotlin.Int)`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes#widthDp()` |   |
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.FixedDividerAttributes.Builder#setWidthDp(kotlin.Int)` |   |
| `https://developer.android.com/reference/androidx/window/embedding/DividerAttributes.DraggableDividerAttributes.Builder#setWidthDp(kotlin.Int)` |   |

## Public fields

### NO_DIVIDER

```
public static final @NonNull DividerAttributes NO_DIVIDER
```

Indicates that no divider is requested.

## Public methods

### getColor

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

```
public final int getColor()
```

the color of the divider.

### getWidthDp

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

```
public final int getWidthDp()
```

the width of the divider.

### toString

```
public @NonNull String toString()
```