SpotlightSection.Builder


public final class SpotlightSection.Builder extends Section.BaseBuilder


A builder of SpotlightSection.

Summary

Public constructors

Creates a new SpotlightSection builder.

Public methods

@NonNull SpotlightSection

Constructs a new SpotlightSection from the current state of this builder.

@NonNull SpotlightSection.Builder

Sets the OnClickListener for the image.

Inherited methods

From androidx.car.app.model.Section.BaseBuilder
@NonNull B

Adds an item to this section, appending to the existing list of items.

@NonNull B

Delete all items in this section.

@NonNull B

Sets the items for this section, overwriting any other previously set items.

@NonNull B

Sets or clears the optional message to display in this section when there are 0 items added to it.

@NonNull B

Sets or clears the optional message to display in this section when there are 0 items added to it.

@NonNull B

Sets the OnItemVisibilityChangedListener to call when the visible items in this Section changes.

@NonNull B

Sets or clears the optional title that appears above the items in this section.

@NonNull B

Sets or clears the optional title that appears above the items in this section.

Public constructors

Builder

Added in 1.8.0-beta01
public Builder(@NonNull CarIcon image)

Creates a new SpotlightSection builder.

Public methods

build

Added in 1.8.0-beta01
public @NonNull SpotlightSection build()

Constructs a new SpotlightSection from the current state of this builder.

Throws
java.lang.IllegalStateException

if there are no items.

setImageOnClickListener

Added in 1.8.0-beta01
@CanIgnoreReturnValue
public @NonNull SpotlightSection.Builder setImageOnClickListener(@NonNull OnClickListener onClickListener)

Sets the OnClickListener for the image. Setting this makes the image interactable.