public final class

MultiSlotLayout.Builder

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement.Builder

 java.lang.Object

↳androidx.wear.protolayout.material.layouts.MultiSlotLayout.Builder

Overview

Builder class for MultiSlotLayout.

Summary

Constructors
publicBuilder()

Creates a builder for the MultiSlotLayout.

Methods
public MultiSlotLayout.BuilderaddSlotContent(LayoutElementBuilders.LayoutElement slotContent)

Add one new slot to the layout with the given content inside.

public MultiSlotLayoutbuild()

Constructs and returns MultiSlotLayout with the provided content and look.

public MultiSlotLayout.BuildersetHorizontalSpacerWidth(float width)

Sets the horizontal spacer width which is used as a space between slots if there is more than one slot.

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

Constructors

public Builder()

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

Methods

Add one new slot to the layout with the given content inside.

public MultiSlotLayout.Builder setHorizontalSpacerWidth(float width)

Sets the horizontal spacer width which is used as a space between slots if there is more than one slot. If not set, LayoutDefaults.MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH will be used.

public MultiSlotLayout build()

Constructs and returns MultiSlotLayout with the provided content and look.