# LayoutDefaults

Artifact: [androidx.wear.protolayout:protolayout-material](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/material/layouts/LayoutDefaults.java+class:androidx.wear.protolayout.material.layouts.LayoutDefaults) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public class LayoutDefaults
```

<br />

*** ** * ** ***

Contains the default values used by layout templates for ProtoLayout.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults.MultiButtonLayoutDefaults` Contains default values used for `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/MultiButtonLayout`. |

| ### Constants |
|---|---|
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp` | `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults#DEFAULT_LARGE_VERTICAL_SPACER_HEIGHT()` The default spacer height that should be between main content and secondary label if set in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout` or `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/PrimaryLayout`. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp` | `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults#DEFAULT_VERTICAL_SPACER_HEIGHT()` The default spacer height that should be between main content and secondary label if set in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout` or `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/PrimaryLayout`. |
| `static final float` | `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults#EDGE_CONTENT_LAYOUT_PADDING_ABOVE_MAIN_CONTENT_DP() = 6.0f` The recommended padding that should be above the main content (text) in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout`. |
| `static final float` | `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults#EDGE_CONTENT_LAYOUT_PADDING_BELOW_MAIN_CONTENT_DP() = 8.0f` The recommended padding that should be below the main content (text) in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout`. |
| `static final int` | `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults#MULTI_BUTTON_MAX_NUMBER() = 7` **This field is deprecated.** Use `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults.MultiButtonLayoutDefaults#MAX_BUTTONS()` instead. <br /> |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp` | `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults#MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH()` The default spacer width for slots in a `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/MultiSlotLayout`. |

## Constants

### DEFAULT_LARGE_VERTICAL_SPACER_HEIGHT

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

```
public static final @NonNull DimensionBuilders.DpProp DEFAULT_LARGE_VERTICAL_SPACER_HEIGHT
```

The default spacer height that should be between main content and secondary label if set in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout` or `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/PrimaryLayout`. It's not applicable to other layouts.

It is recommended to use this on larger screen sizes (screen sizes above 225dp).

This spacing can be customized by calling `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout.Builder#setContentAndSecondaryLabelSpacing(androidx.wear.protolayout.DimensionBuilders.DpProp)` or `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/PrimaryLayout.Builder#setVerticalSpacerHeight(float)`.

### DEFAULT_VERTICAL_SPACER_HEIGHT

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public static final @NonNull DimensionBuilders.DpProp DEFAULT_VERTICAL_SPACER_HEIGHT
```

The default spacer height that should be between main content and secondary label if set in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout` or `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/PrimaryLayout`. It's not applicable to other layouts.

It is recommended to use this on smaller screen sizes or when there's a lot of content in the layout.

This spacing can be customized by calling `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout.Builder#setContentAndSecondaryLabelSpacing(androidx.wear.protolayout.DimensionBuilders.DpProp)` or `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/PrimaryLayout.Builder#setVerticalSpacerHeight(float)`.

### EDGE_CONTENT_LAYOUT_PADDING_ABOVE_MAIN_CONTENT_DP

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public static final float EDGE_CONTENT_LAYOUT_PADDING_ABOVE_MAIN_CONTENT_DP = 6.0f
```

The recommended padding that should be above the main content (text) in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout`.

### EDGE_CONTENT_LAYOUT_PADDING_BELOW_MAIN_CONTENT_DP

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public static final float EDGE_CONTENT_LAYOUT_PADDING_BELOW_MAIN_CONTENT_DP = 8.0f
```

The recommended padding that should be below the main content (text) in the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/EdgeContentLayout`.

### MULTI_BUTTON_MAX_NUMBER

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

```
public static final int MULTI_BUTTON_MAX_NUMBER = 7
```

> [!CAUTION]
> **This field is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults.MultiButtonLayoutDefaults#MAX_BUTTONS()` instead.

The maximum number of button that can be added to the `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/MultiButtonLayout`.

### MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public static final @NonNull DimensionBuilders.DpProp MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH
```

The default spacer width for slots in a `https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/MultiSlotLayout`.