InlineSuggestionUi.Content.Builder


public final class InlineSuggestionUi.Content.Builder


Builder for the Content.

Summary

Public methods

@NonNull InlineSuggestionUi.Content

Returns a subclass of SlicedContent built by this builder.

@NonNull InlineSuggestionUi.Content.Builder

Sets the content description for the suggestion view.

@NonNull InlineSuggestionUi.Content.Builder

Sets the end icon of the suggestion UI.

@NonNull InlineSuggestionUi.Content.Builder

Sets hints to indicate the kind of data in the suggestion.

@NonNull InlineSuggestionUi.Content.Builder

Sets the start icon of the suggestion UI.

@NonNull InlineSuggestionUi.Content.Builder

Sets the subtitle of the suggestion UI.

@NonNull InlineSuggestionUi.Content.Builder

Sets the title of the suggestion UI.

Public methods

build

Added in 1.1.0
public @NonNull InlineSuggestionUi.Content build()

Returns a subclass of SlicedContent built by this builder.

setContentDescription

Added in 1.1.0
public @NonNull InlineSuggestionUi.Content.Builder setContentDescription(@NonNull CharSequence contentDescription)

Sets the content description for the suggestion view.

Parameters
@NonNull CharSequence contentDescription

the content description.

setEndIcon

Added in 1.1.0
public @NonNull InlineSuggestionUi.Content.Builder setEndIcon(@NonNull Icon endIcon)

Sets the end icon of the suggestion UI.

Note that the ImageViewStyle style may specify the tint list to be applied on the icon. If you don't want that, you may disable it by calling Icon#setTintBlendMode(BlendMode.DST).

Parameters
@NonNull Icon endIcon

Icon resource displayed at end of slice.

setHints

Added in 1.1.0
public @NonNull InlineSuggestionUi.Content.Builder setHints(@NonNull List<String> hints)

Sets hints to indicate the kind of data in the suggestion.

setStartIcon

Added in 1.1.0
public @NonNull InlineSuggestionUi.Content.Builder setStartIcon(@NonNull Icon startIcon)

Sets the start icon of the suggestion UI.

Note that the ImageViewStyle style may specify the tint list to be applied on the icon. If you don't want that, you may disable it by calling Icon#setTintBlendMode(BlendMode.DST).

Parameters
@NonNull Icon startIcon

Icon resource displayed at start of slice.

setSubtitle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Content.Builder setSubtitle(@NonNull CharSequence subtitle)

Sets the subtitle of the suggestion UI.

Parameters
@NonNull CharSequence subtitle

displayed as subtitle of slice.

setTitle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Content.Builder setTitle(@NonNull CharSequence title)

Sets the title of the suggestion UI.

Parameters
@NonNull CharSequence title

displayed as title of slice.