ModifiersBuilders.Clickable.Builder


class ModifiersBuilders.Clickable.Builder


Builder for Clickable

Summary

Public constructors

Creates an instance of Builder.

Public functions

ModifiersBuilders.Clickable

Builds an instance from accumulated values.

ModifiersBuilders.Clickable.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setId(id: String)

Sets the ID associated with this action.

ModifiersBuilders.Clickable.Builder
@RequiresSchemaVersion(major = 1, minor = 300)
setMinimumClickableHeight(
    minimumClickableHeight: DimensionBuilders.DpProp
)

Sets the minimum height of the clickable area.

ModifiersBuilders.Clickable.Builder
@RequiresSchemaVersion(major = 1, minor = 300)
setMinimumClickableWidth(
    minimumClickableWidth: DimensionBuilders.DpProp
)

Sets the minimum width of the clickable area.

ModifiersBuilders.Clickable.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setOnClick(onClick: ActionBuilders.Action)

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

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.0.0
fun build(): ModifiersBuilders.Clickable

Builds an instance from accumulated values.

setId

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setId(id: String): ModifiersBuilders.Clickable.Builder

Sets the ID associated with this action.

setMinimumClickableHeight

Added in 1.1.0
@RequiresSchemaVersion(major = 1, minor = 300)
fun setMinimumClickableHeight(
    minimumClickableHeight: DimensionBuilders.DpProp
): ModifiersBuilders.Clickable.Builder

Sets 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.

Note that this field only supports static values.

setMinimumClickableWidth

Added in 1.1.0
@RequiresSchemaVersion(major = 1, minor = 300)
fun setMinimumClickableWidth(
    minimumClickableWidth: DimensionBuilders.DpProp
): ModifiersBuilders.Clickable.Builder

Sets 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.

Note that this field only supports static values.

setOnClick

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setOnClick(onClick: ActionBuilders.Action): ModifiersBuilders.Clickable.Builder

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