ModifiersBuilders.Clickable
@RequiresSchemaVersion(major = 1, minor = 0)
public final 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 |
|---|
public final class ModifiersBuilders.Clickable.BuilderBuilder for |
Public methods |
|
|---|---|
@NonNull String |
getId()Gets the ID associated with this action. |
@NonNull DimensionBuilders.DpProp |
Gets the minimum height of the clickable area. |
@NonNull DimensionBuilders.DpProp |
Gets the minimum width of the clickable area. |
@Nullable 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. |
@NonNull String |
toString() |
Public methods
getMinimumClickableHeight
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
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
public @Nullable ActionBuilders.Action getOnClick()
Gets the action to perform when the element this modifier is attached to is clicked.
isVisualFeedbackEnabled
public boolean isVisualFeedbackEnabled()
Gets whether the click visual feedback (such as a ripple) should be enabled. Defaults to true.