# ModifiersBuilders.Clickable

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

*** ** * ** ***

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

<br />

```
@RequiresSchemaVersion(major = 1, minor = 0)
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                                                                                                                                     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[ModifiersBuilders.Clickable.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable.Builder) Builder for[Clickable](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable) |

|                                                     ### Public functions                                                      |
|-------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                             | [getId](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable#getId())`()` Gets the ID associated with this action.                                                                         |
| [DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [getMinimumClickableHeight](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable#getMinimumClickableHeight())`()` Gets the minimum height of the clickable area.                           |
| [DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp) | [getMinimumClickableWidth](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable#getMinimumClickableWidth())`()` Gets the minimum width of the clickable area.                              |
| [ActionBuilders.Action](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ActionBuilders.Action)`?`    | [getOnClick](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable#getOnClick())`()` Gets the action to perform when the element this modifier is attached to is clicked.                   |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                           | [isVisualFeedbackEnabled](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable#isVisualFeedbackEnabled())`()` Gets whether the click visual feedback (such as a ripple) should be enabled. |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                             | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Clickable#toString())`()`                                                                                                            |

## Public functions

### getId

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

```
fun getId(): String
```

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)  

```
fun getMinimumClickableHeight(): DimensionBuilders.DpProp
```

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)  

```
fun getMinimumClickableWidth(): DimensionBuilders.DpProp
```

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)  

```
fun getOnClick(): ActionBuilders.Action?
```

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)  

```
fun isVisualFeedbackEnabled(): Boolean
```

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

### toString

```
fun toString(): String
```