MultiButtonLayout.Builder

Added in 1.1.0
Deprecated in 1.2.0

class MultiButtonLayout.Builder : LayoutElementBuilders.LayoutElement.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.1.0
Deprecated in 1.2.0
Builder()

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

Public functions

addButtonContent

Added in 1.1.0
Deprecated in 1.2.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 MULTI_BUTTON_MAX_NUMBER is reached will be discarded.

build

Added in 1.1.0
Deprecated in 1.2.0
fun build(): MultiButtonLayout

Constructs and returns MultiButtonLayout with the provided content and look.

setFiveButtonDistribution

Added in 1.1.0
Deprecated in 1.2.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.