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.

Boolean

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

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.

isVisualFeedbackEnabled

Added in 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