MultiSlotLayout.Builder

Added in 1.1.0
Deprecated in 1.2.0

public final class MultiSlotLayout.Builder implements LayoutElementBuilders.LayoutElement.Builder


Builder class for MultiSlotLayout.

Summary

Public constructors

Creates a builder for the MultiSlotLayout.

Public methods

@NonNull MultiSlotLayout.Builder

Add one new slot to the layout with the given content inside.

@NonNull MultiSlotLayout

Constructs and returns MultiSlotLayout with the provided content and look.

@NonNull MultiSlotLayout.Builder
setHorizontalSpacerWidth(@Dimension(unit = 0) float width)

Sets the horizontal spacer width which is used as a space between slots if there is more than one slot.

Public constructors

Builder

Added in 1.1.0
Deprecated in 1.2.0
public Builder()

Creates a builder for the MultiSlotLayout. Content inside of it can later be added with addSlotContent.

Public methods

addSlotContent

Added in 1.1.0
Deprecated in 1.2.0
public @NonNull MultiSlotLayout.Builder addSlotContent(@NonNull LayoutElementBuilders.LayoutElement slotContent)

Add one new slot to the layout with the given content inside.

build

Added in 1.1.0
Deprecated in 1.2.0
public @NonNull MultiSlotLayout build()

Constructs and returns MultiSlotLayout with the provided content and look.

setHorizontalSpacerWidth

Added in 1.1.0
Deprecated in 1.2.0
public @NonNull MultiSlotLayout.Builder setHorizontalSpacerWidth(@Dimension(unit = 0) float width)

Sets the horizontal spacer width which is used as a space between slots if there is more than one slot. If not set, MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH will be used.