# ButtonDefaults

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/ButtonDefaults.java+class:androidx.wear.tiles.material.ButtonDefaults) 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 class ButtonDefaults
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use the new class `https://developer.android.com/reference/androidx/wear/protolayout/material/ButtonDefaults` which provides the same API and functionality.

Contains the default values used by button Tiles components.

## Summary

| ### Constants |
|---|---|
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.DpProp` | `https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#DEFAULT_SIZE()` **This field is deprecated.** Deprecated in Java |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.DpProp` | `https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#EXTRA_LARGE_SIZE()` **This field is deprecated.** Deprecated in Java |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.DpProp` | `https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#LARGE_SIZE()` **This field is deprecated.** Deprecated in Java |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors` | `https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#PRIMARY_COLORS()` **This field is deprecated.** Deprecated in Java |
| `static final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/material/ButtonColors` | `https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#SECONDARY_COLORS()` **This field is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.DpProp` | `[recommendedIconSize](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#recommendedIconSize(androidx.wear.tiles.DimensionBuilders.DpProp))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.DpProp buttonSize)` **This method is deprecated.** Deprecated in Java |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/tiles/DimensionBuilders.DpProp` | `[recommendedIconSize](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#recommendedIconSize(float))(@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 0) float buttonSize)` **This method is deprecated.** Deprecated in Java |

## Constants

### DEFAULT_SIZE

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 static final @NonNull DimensionBuilders.DpProp DEFAULT_SIZE
```

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

The default size for standard `https://developer.android.com/reference/androidx/wear/tiles/material/Button`.

### EXTRA_LARGE_SIZE

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 static final @NonNull DimensionBuilders.DpProp EXTRA_LARGE_SIZE
```

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

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

### LARGE_SIZE

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 static final @NonNull DimensionBuilders.DpProp LARGE_SIZE
```

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

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

### PRIMARY_COLORS

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 static final @NonNull ButtonColors PRIMARY_COLORS
```

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

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

### SECONDARY_COLORS

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 static final @NonNull ButtonColors SECONDARY_COLORS
```

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

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

## Public methods

### recommendedIconSize

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 static @NonNull DimensionBuilders.DpProp [recommendedIconSize](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#recommendedIconSize(androidx.wear.tiles.DimensionBuilders.DpProp))(@NonNull DimensionBuilders.DpProp buttonSize)
```

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

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

### recommendedIconSize

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 static @NonNull DimensionBuilders.DpProp [recommendedIconSize](https://developer.android.com/reference/androidx/wear/tiles/material/ButtonDefaults#recommendedIconSize(float))(@Dimension(unit = 0) float buttonSize)
```

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

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