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

*** ** * ** ***


```
public class ButtonDefaults
```

<br />

*** ** * ** ***

Contains the default values used by `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`.

## Summary

| ### 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/ButtonDefaults#DEFAULT_SIZE()` The default size for standard `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`. |
| `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/ButtonDefaults#EXTRA_LARGE_SIZE()` The recommended size for extra large `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`. |
| `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/ButtonDefaults#LARGE_SIZE()` The recommended size for large `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/material/ButtonColors` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ButtonDefaults#PRIMARY_COLORS()` The recommended colors for a primary `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`. |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/material/ButtonColors` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ButtonDefaults#SECONDARY_COLORS()` The recommended colors for a secondary `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`. |

| ### Public methods |
|---|---|
| `static @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/ButtonDefaults#recommendedIconSize(androidx.wear.protolayout.DimensionBuilders.DpProp)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/DimensionBuilders.DpProp buttonSize)` Returns the recommended icon size for the given size of `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`. |
| `static @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/ButtonDefaults#recommendedIconSize(float)(@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float buttonSize)` Returns the recommended icon size for the given size of `https://developer.android.com/reference/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)

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

The default size for standard `https://developer.android.com/reference/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)

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

The recommended size for extra large `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`.

### LARGE_SIZE

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

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

The recommended size for large `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`.

### PRIMARY_COLORS

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

```
public static final @NonNull ButtonColors PRIMARY_COLORS
```

The recommended colors for a primary `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`.

### SECONDARY_COLORS

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

```
public static final @NonNull ButtonColors SECONDARY_COLORS
```

The recommended colors for a secondary `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`.

## Public methods

### recommendedIconSize

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

```
public static @NonNull DimensionBuilders.DpProp recommendedIconSize(@NonNull DimensionBuilders.DpProp buttonSize)
```

Returns the recommended icon size for the given size of `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`.

### recommendedIconSize

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

```
public static @NonNull DimensionBuilders.DpProp recommendedIconSize(@Dimension(unit = 0) float buttonSize)
```

Returns the recommended icon size for the given size of `https://developer.android.com/reference/androidx/wear/protolayout/material/Button`.