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

This function is deprecated. Deprecated in Java

Public functions

MultiButtonLayout.Builder

This function is deprecated. Deprecated in Java

MultiButtonLayout

This function is deprecated. Deprecated in Java

MultiButtonLayout.Builder
setFiveButtonDistribution(fiveButtonDistribution: Int)

This function is deprecated. Deprecated in Java

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 androidx.wear.tiles.LayoutElementBuilders.LayoutElement, 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.