ModifiersBuilders.Clickable


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


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

Builder for Clickable

Public functions

String

Gets the ID associated with this action.

DimensionBuilders.DpProp

Gets the minimum height of the clickable area.

DimensionBuilders.DpProp

Gets the minimum width of the clickable area.

ActionBuilders.Action?

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

String

Public functions

getId

Added in 1.0.0
fun getId(): String

Gets the ID associated with this action.

getMinimumClickableHeight

Added in 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
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
fun getOnClick(): ActionBuilders.Action?

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

toString

fun toString(): String