DividerAttributes.FixedDividerAttributes.Builder


@RequiresWindowSdkExtension(version = 6)
public final 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 methods

final @NonNull DividerAttributes.FixedDividerAttributes

Builds a FixedDividerAttributes instance.

final @NonNull DividerAttributes.FixedDividerAttributes.Builder
@RequiresWindowSdkExtension(version = 6)
setColor(@ColorInt int color)

Sets the color of the divider.

final @NonNull DividerAttributes.FixedDividerAttributes.Builder
@RequiresWindowSdkExtension(version = 6)
setWidthDp(@IntRange(from = -1) int widthDp)

Sets the divider width.

Public constructors

Builder

Added in 1.4.0-alpha05
public Builder()

creates a new FixedDividerAttributes.Builder

Builder

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

The FixedDividerAttributes builder constructor initialized by an existing FixedDividerAttributes.

Parameters
@NonNull DividerAttributes.FixedDividerAttributes original

the original FixedDividerAttributes to initialize the Builder.

Public methods

setColor

Added in 1.4.0-alpha05
@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 Color.BLACK is used.

Throws
kotlin.IllegalArgumentException

if the provided value is invalid.

setWidthDp

Added in 1.4.0-alpha05
@RequiresWindowSdkExtension(version = 6)
public final @NonNull DividerAttributes.FixedDividerAttributes.Builder setWidthDp(@IntRange(from = -1) int widthDp)

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.