public final class

ModifiersBuilders.Clickable.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ModifiersBuilders.Clickable.Builder

Overview

Builder for ModifiersBuilders.Clickable

Summary

Constructors
publicBuilder()

Creates an instance of ModifiersBuilders.Clickable.Builder.

Methods
public ModifiersBuilders.Clickablebuild()

Builds an instance from accumulated values.

public ModifiersBuilders.Clickable.BuildersetId(java.lang.String id)

Sets the ID associated with this action.

public ModifiersBuilders.Clickable.BuildersetMinimumClickableHeight(DimensionBuilders.DpProp minimumClickableHeight)

Sets the minimum height of the clickable area.

public ModifiersBuilders.Clickable.BuildersetMinimumClickableWidth(DimensionBuilders.DpProp minimumClickableWidth)

Sets the minimum width of the clickable area.

public ModifiersBuilders.Clickable.BuildersetOnClick(ActionBuilders.Action onClick)

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

public ModifiersBuilders.Clickable.BuildersetVisualFeedbackEnabled(boolean visualFeedbackEnabled)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates an instance of ModifiersBuilders.Clickable.Builder.

Methods

public ModifiersBuilders.Clickable.Builder setId(java.lang.String id)

Sets the ID associated with this action.

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

public ModifiersBuilders.Clickable.Builder setMinimumClickableWidth(DimensionBuilders.DpProp minimumClickableWidth)

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.

public ModifiersBuilders.Clickable.Builder setMinimumClickableHeight(DimensionBuilders.DpProp minimumClickableHeight)

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.

public ModifiersBuilders.Clickable.Builder setVisualFeedbackEnabled(boolean visualFeedbackEnabled)

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

Builds an instance from accumulated values.