MultiButtonLayout.Builder


class MultiButtonLayout.Builder


Builder class for MultiButtonLayout.

Summary

Public constructors

Creates a builder for the MultiButtonLayout.

Public functions

MultiButtonLayout.Builder

Add one new button to the layout.

MultiButtonLayout

Constructs and returns MultiButtonLayout with the provided content and look.

MultiButtonLayout.Builder
setFiveButtonDistribution(fiveButtonDistribution: Int)

Sets the button distribution for this layout.

Public constructors

Builder

Added in 1.0.0
Builder()

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

Public functions

addButtonContent

Added in 1.0.0
fun addButtonContent(buttonContent: LayoutElementBuilders.LayoutElement): MultiButtonLayout.Builder

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 MAX_BUTTONS is reached will be discarded.

build

Added in 1.0.0
fun build(): MultiButtonLayout

Constructs and returns MultiButtonLayout with the provided content and look.

Throws
java.lang.IllegalArgumentException

if no buttons are added or the number of buttons added is larger than MAX_BUTTONS.

setFiveButtonDistribution

Added in 1.0.0
fun setFiveButtonDistribution(fiveButtonDistribution: Int): MultiButtonLayout.Builder

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.