# ButtonDefaults

# ButtonDefaults

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/ButtonDefaults.java+class:androidx.wear.protolayout.material.ButtonDefaults)  
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/ButtonDefaults "View this page in Java")

<br />

```
class ButtonDefaults
```

<br />

*** ** * ** ***

Contains the default values used by[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).

## Summary

|                                                             ### Constants                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [DEFAULT_SIZE](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonDefaults#DEFAULT_SIZE()) The default size for standard[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).                  |
| `const `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [EXTRA_LARGE_SIZE](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonDefaults#EXTRA_LARGE_SIZE()) The recommended size for extra large[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).   |
| `const `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [LARGE_SIZE](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonDefaults#LARGE_SIZE()) The recommended size for large[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).                     |
| `const `[ButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonColors)                | [PRIMARY_COLORS](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonDefaults#PRIMARY_COLORS()) The recommended colors for a primary[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).       |
| `const `[ButtonColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonColors)                | [SECONDARY_COLORS](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonDefaults#SECONDARY_COLORS()) The recommended colors for a secondary[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button). |

|                                                            ### Public functions                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [recommendedIconSize](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonDefaults#recommendedIconSize(androidx.wear.protolayout.DimensionBuilders.DpProp))`(buttonSize: `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp)`)` Returns the recommended icon size for the given size of[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).             |
| `java-static `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [recommendedIconSize](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ButtonDefaults#recommendedIconSize(float))`(buttonSize: @`[Dimension](https://developer.android.com/reference/kotlin/androidx/annotation/Dimension)`(unit = 0) `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` Returns the recommended icon size for the given size of[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button). |

## Constants

### DEFAULT_SIZE

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

```
const val DEFAULT_SIZE: DimensionBuilders.DpProp
```

The default size for standard[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).  

### EXTRA_LARGE_SIZE

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

```
const val EXTRA_LARGE_SIZE: DimensionBuilders.DpProp
```

The recommended size for extra large[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).  

### LARGE_SIZE

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

```
const val LARGE_SIZE: DimensionBuilders.DpProp
```

The recommended size for large[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).  

### PRIMARY_COLORS

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

```
const val PRIMARY_COLORS: ButtonColors
```

The recommended colors for a primary[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).  

### SECONDARY_COLORS

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

```
const val SECONDARY_COLORS: ButtonColors
```

The recommended colors for a secondary[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).  

## Public functions

### recommendedIconSize

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

```
java-static fun recommendedIconSize(buttonSize: DimensionBuilders.DpProp): DimensionBuilders.DpProp
```

Returns the recommended icon size for the given size of[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).  

### recommendedIconSize

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

```
java-static fun recommendedIconSize(buttonSize: @Dimension(unit = 0) Float): DimensionBuilders.DpProp
```

Returns the recommended icon size for the given size of[Button](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Button).