public final class

RowConstraints.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.model.constraints.RowConstraints.Builder

Overview

A builder of RowConstraints.

Summary

Constructors
publicBuilder()

Returns an empty RowConstraints.Builder instance.

publicBuilder(RowConstraints constraints)

Returns a new builder that contains the same data as the given RowConstraints instance.

Methods
public RowConstraintsbuild()

Constructs the RowConstraints defined by this builder.

public RowConstraints.BuildersetCarIconConstraints(CarIconConstraints carIconConstraints)

Sets the CarIconConstraints enforced for the row images.

public RowConstraints.BuildersetImageAllowed(boolean imageAllowed)

Sets whether an image can be added to the row.

public RowConstraints.BuildersetMaxActionsExclusive(int maxActionsExclusive)

Sets the maximum number actions to allowed in a row that consists only of actions.

public RowConstraints.BuildersetMaxTextLinesPerRow(int maxTextLinesPerRow)

Sets the maximum number lines of text, excluding the title, to render in the row.

public RowConstraints.BuildersetOnClickListenerAllowed(boolean isOnClickListenerAllowed)

Sets whether the row can have a click listener associated with it.

public RowConstraints.BuildersetToggleAllowed(boolean toggleAllowed)

Sets whether a toggle can be added to the row.

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

Constructors

public Builder()

Returns an empty RowConstraints.Builder instance.

public Builder(RowConstraints constraints)

Returns a new builder that contains the same data as the given RowConstraints instance.

Methods

public RowConstraints.Builder setOnClickListenerAllowed(boolean isOnClickListenerAllowed)

Sets whether the row can have a click listener associated with it.

public RowConstraints.Builder setMaxTextLinesPerRow(int maxTextLinesPerRow)

Sets the maximum number lines of text, excluding the title, to render in the row.

public RowConstraints.Builder setMaxActionsExclusive(int maxActionsExclusive)

Sets the maximum number actions to allowed in a row that consists only of actions.

public RowConstraints.Builder setImageAllowed(boolean imageAllowed)

Sets whether an image can be added to the row.

public RowConstraints.Builder setToggleAllowed(boolean toggleAllowed)

Sets whether a toggle can be added to the row.

public RowConstraints.Builder setCarIconConstraints(CarIconConstraints carIconConstraints)

Sets the CarIconConstraints enforced for the row images.

public RowConstraints build()

Constructs the RowConstraints defined by this builder.