# MultiSlotLayout.Builder

Artifact: [androidx.wear.tiles:tiles-material](https://developer.android.com/jetpack/androidx/releases/wear-tiles) [View Source](https://cs.android.com/search?q=file:androidx/wear/tiles/material/layouts/MultiSlotLayout.java+class:androidx.wear.tiles.material.layouts.MultiSlotLayout.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

*** ** * ** ***


```
public final class MultiSlotLayout.Builder implements LayoutElementBuilders.LayoutElement.Builder
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Deprecated in Java

Builder class for `https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout`.

## Summary

| ### Public constructors |
|---|
| `[Builder](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#Builder())()` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder` | `[addSlotContent](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#addSlotContent(androidx.wear.tiles.LayoutElementBuilders.LayoutElement))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/LayoutElementBuilders.LayoutElement slotContent)` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout` | `[build](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#build())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder` | `[setHorizontalSpacerWidth](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#setHorizontalSpacerWidth(float))(@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float width)` **This method is deprecated.** Deprecated in Java |

## Public constructors

### Builder

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public [Builder](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#Builder())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Creates a builder for the `https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout`. Content inside of it can later be added with `https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#addSlotContent(androidx.wear.tiles.LayoutElementBuilders.LayoutElement)`.

## Public methods

### addSlotContent

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public @NonNull MultiSlotLayout.Builder [addSlotContent](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#addSlotContent(androidx.wear.tiles.LayoutElementBuilders.LayoutElement))(@NonNull LayoutElementBuilders.LayoutElement slotContent)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

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

### build

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public @NonNull MultiSlotLayout [build](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#build())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Constructs and returns `https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout` with the provided content and look.

### setHorizontalSpacerWidth

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-tiles#1.2.0)

```
public @NonNull MultiSlotLayout.Builder [setHorizontalSpacerWidth](https://developer.android.com/reference/androidx/wear/tiles/material/layouts/MultiSlotLayout.Builder#setHorizontalSpacerWidth(float))(@Dimension(unit = 0) float width)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the horizontal spacer width which is used as a space between slots if there is more than one slot. If not set, `https://developer.android.com/reference/androidx/wear/tiles/material/layouts/LayoutDefaults#MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH()` will be used.