# LayoutDefaults

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/material/layouts/LayoutDefaults "View this page in Java")

<br />

```
class LayoutDefaults
```

<br />

*** ** * ** ***

Contains the default values used by layout templates for ProtoLayout.

## Summary

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

|                                                             ### Constants                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [DEFAULT_LARGE_VERTICAL_SPACER_HEIGHT](https://developer.android.com/reference/kotlin/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[EdgeContentLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout)or[PrimaryLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/PrimaryLayout). |
| `const `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [DEFAULT_VERTICAL_SPACER_HEIGHT](https://developer.android.com/reference/kotlin/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[EdgeContentLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout)or[PrimaryLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/PrimaryLayout).             |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                               | [EDGE_CONTENT_LAYOUT_PADDING_ABOVE_MAIN_CONTENT_DP](https://developer.android.com/reference/kotlin/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[EdgeContentLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout).                                                                                                            |
| `const `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                               | [EDGE_CONTENT_LAYOUT_PADDING_BELOW_MAIN_CONTENT_DP](https://developer.android.com/reference/kotlin/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[EdgeContentLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout).                                                                                                            |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                   | [MULTI_BUTTON_MAX_NUMBER](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/LayoutDefaults#MULTI_BUTTON_MAX_NUMBER())` = 7` **This property is deprecated.** Use[MAX_BUTTONS](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/LayoutDefaults.MultiButtonLayoutDefaults#MAX_BUTTONS())instead. <br />                                                                                                                                                             |
| `const `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/LayoutDefaults#MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH()) The default spacer width for slots in a[MultiSlotLayout](https://developer.android.com/reference/kotlin/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)  

```
const val DEFAULT_LARGE_VERTICAL_SPACER_HEIGHT: DimensionBuilders.DpProp
```

The default spacer height that should be between main content and secondary label if set in the[EdgeContentLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout)or[PrimaryLayout](https://developer.android.com/reference/kotlin/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[setContentAndSecondaryLabelSpacing](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout.Builder#setContentAndSecondaryLabelSpacing(androidx.wear.protolayout.DimensionBuilders.DpProp))or[setVerticalSpacerHeight](https://developer.android.com/reference/kotlin/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)  

```
const val DEFAULT_VERTICAL_SPACER_HEIGHT: DimensionBuilders.DpProp
```

The default spacer height that should be between main content and secondary label if set in the[EdgeContentLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout)or[PrimaryLayout](https://developer.android.com/reference/kotlin/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[setContentAndSecondaryLabelSpacing](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/EdgeContentLayout.Builder#setContentAndSecondaryLabelSpacing(androidx.wear.protolayout.DimensionBuilders.DpProp))or[setVerticalSpacerHeight](https://developer.android.com/reference/kotlin/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)  

```
const val EDGE_CONTENT_LAYOUT_PADDING_ABOVE_MAIN_CONTENT_DP = 6.0f: Float
```

The recommended padding that should be above the main content (text) in the[EdgeContentLayout](https://developer.android.com/reference/kotlin/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)  

```
const val EDGE_CONTENT_LAYOUT_PADDING_BELOW_MAIN_CONTENT_DP = 8.0f: Float
```

The recommended padding that should be below the main content (text) in the[EdgeContentLayout](https://developer.android.com/reference/kotlin/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)  

```
const val MULTI_BUTTON_MAX_NUMBER = 7: Int
```
| **This property is deprecated.**   
|
| Use[MAX_BUTTONS](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/LayoutDefaults.MultiButtonLayoutDefaults#MAX_BUTTONS())instead.

The maximum number of button that can be added to the[MultiButtonLayout](https://developer.android.com/reference/kotlin/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)  

```
const val MULTI_SLOT_LAYOUT_HORIZONTAL_SPACER_WIDTH: DimensionBuilders.DpProp
```

The default spacer width for slots in a[MultiSlotLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/layouts/MultiSlotLayout).