# ModifiersBuilders.Clickable

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

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 0)
public final class ModifiersBuilders.Clickable
```

<br />

*** ** * ** ***

A modifier for an element which can have associated Actions for click events. When an element with a ClickableModifier is clicked it will fire the associated action.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable#getId()()` Gets the ID associated with this action. |
| `@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/ModifiersBuilders.Clickable#getMinimumClickableHeight()()` Gets the minimum height of the clickable area. |
| `@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/ModifiersBuilders.Clickable#getMinimumClickableWidth()()` Gets the minimum width of the clickable area. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/ActionBuilders.Action` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable#getOnClick()()` Gets the action to perform when the element this modifier is attached to is clicked. |
| `boolean` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable#isVisualFeedbackEnabled()()` Gets whether the click visual feedback (such as a ripple) should be enabled. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/ModifiersBuilders.Clickable#toString()()` |

## Public methods

### getId

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

```
public @NonNull String getId()
```

Gets the ID associated with this action.

### getMinimumClickableHeight

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

```
public @NonNull DimensionBuilders.DpProp getMinimumClickableHeight()
```

Gets the minimum height of the clickable area.

The default value is 48dp, following the Material design accessibility guideline. Note that this value does not affect the layout, so the minimum clickable height is not guaranteed unless there is enough space around the element within its parent bounds.

### getMinimumClickableWidth

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

```
public @NonNull DimensionBuilders.DpProp getMinimumClickableWidth()
```

Gets the minimum width of the clickable area.

The default value is 48dp, following the Material design accessibility guideline. Note that this value does not affect the layout, so the minimum clickable width is not guaranteed unless there is enough space around the element within its parent bounds.

### getOnClick

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

```
public @Nullable ActionBuilders.Action getOnClick()
```

Gets the action to perform when the element this modifier is attached to is clicked.

### isVisualFeedbackEnabled

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

```
public boolean isVisualFeedbackEnabled()
```

Gets whether the click visual feedback (such as a ripple) should be enabled. Defaults to true.

### toString

```
public @NonNull String toString()
```