MultiButtonLayout.Builder

Added in 1.1.0
Deprecated in 1.2.0

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


Builder class for MultiButtonLayout.

Summary

Public constructors

Creates a builder for the MultiButtonLayout.

Public methods

@NonNull MultiButtonLayout.Builder

Add one new button to the layout.

@NonNull MultiButtonLayout

Constructs and returns MultiButtonLayout with the provided content and look.

@NonNull MultiButtonLayout.Builder
setFiveButtonDistribution(int fiveButtonDistribution)

Sets the button distribution for this layout.

Public constructors

Builder

Added in 1.1.0
Deprecated in 1.2.0
public Builder()

Creates a builder for the MultiButtonLayout. Content inside of it can later be added with addButtonContent.

Public methods

addButtonContent

Added in 1.1.0
Deprecated in 1.2.0
public @NonNull MultiButtonLayout.Builder addButtonContent(
    @NonNull LayoutElementBuilders.LayoutElement buttonContent
)

Add one new button to the layout. Note that it is accepted to pass in any , but it is strongly recommended to add a Button as the layout is optimized for it. Any button added after MULTI_BUTTON_MAX_NUMBER is reached will be discarded.

build

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

Constructs and returns MultiButtonLayout with the provided content and look.

setFiveButtonDistribution

Added in 1.1.0
Deprecated in 1.2.0
public @NonNull MultiButtonLayout.Builder setFiveButtonDistribution(int fiveButtonDistribution)

Sets the button distribution for this layout. Button distribution is used in case when there is 5 buttons in the layout to determine whether the 3 buttons row is at the top or bottom.