public final class

MultiButtonLayout.Builder

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement.Builder

 java.lang.Object

↳androidx.wear.tiles.material.layouts.MultiButtonLayout.Builder

Overview

Builder class for MultiButtonLayout.

Summary

Constructors
publicBuilder()

Creates a builder for the MultiButtonLayout.

Methods
public MultiButtonLayout.BuilderaddButtonContent(LayoutElementBuilders.LayoutElement buttonContent)

Add one new button to the layout.

public MultiButtonLayoutbuild()

Constructs and returns MultiButtonLayout with the provided content and look.

public MultiButtonLayout.BuildersetFiveButtonDistribution(int fiveButtonDistribution)

Sets the button distribution for this layout.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a builder for the MultiButtonLayout. Content inside of it can later be added with MultiButtonLayout.Builder.addButtonContent(LayoutElementBuilders.LayoutElement).

Methods

public MultiButtonLayout.Builder addButtonContent(LayoutElementBuilders.LayoutElement buttonContent)

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

public 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.

public MultiButtonLayout build()

Constructs and returns MultiButtonLayout with the provided content and look.