DividerAttributes.FixedDividerAttributes.Builder


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


The FixedDividerAttributes builder.

Summary

Public constructors

creates a new FixedDividerAttributes.Builder

The FixedDividerAttributes builder constructor initialized by an existing FixedDividerAttributes.

Public functions

DividerAttributes.FixedDividerAttributes

Builds a FixedDividerAttributes instance.

DividerAttributes.FixedDividerAttributes.Builder

Sets the color of the divider.

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

Sets the divider width.

Public constructors

Builder

Added in 1.4.0-alpha05
Builder()

creates a new FixedDividerAttributes.Builder

Builder

Added in 1.4.0-alpha05
@RequiresWindowSdkExtension(version = 6)
Builder(original: DividerAttributes.FixedDividerAttributes)

The FixedDividerAttributes builder constructor initialized by an existing FixedDividerAttributes.

Parameters
original: DividerAttributes.FixedDividerAttributes

the original FixedDividerAttributes to initialize the Builder.

Public functions

setColor

Added in 1.4.0-alpha05
@RequiresWindowSdkExtension(version = 6)
fun setColor(color: @ColorInt Int): DividerAttributes.FixedDividerAttributes.Builder

Sets the color of the divider. If not set, the default color Color.BLACK is used.

Throws
kotlin.IllegalArgumentException

if the provided value is invalid.

setWidthDp

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

Sets the divider width. It defaults to WIDTH_SYSTEM_DEFAULT, which means the system will choose a default value based on the display size and form factor.

Throws
kotlin.IllegalArgumentException

if the provided value is invalid.