InlineSuggestionUi.Style.Builder


public final class InlineSuggestionUi.Style.Builder


Builder for the Style.

Summary

Public methods

@NonNull InlineSuggestionUi.Style

Returns a subclass of BundledStyle built by this builder.

@NonNull InlineSuggestionUi.Style.Builder

Sets the chip style.

@NonNull InlineSuggestionUi.Style.Builder

Sets the end icon style.

@NonNull InlineSuggestionUi.Style.Builder
setLayoutDirection(int layoutDirection)

Sets the layout direction for the UI.

@NonNull InlineSuggestionUi.Style.Builder

Sets the icon style for the case where there is a single icon and no text in the chip.

@NonNull InlineSuggestionUi.Style.Builder

Sets the chip style for the case where there is a single icon and no text.

@NonNull InlineSuggestionUi.Style.Builder

Sets the start icon style.

@NonNull InlineSuggestionUi.Style.Builder

Sets the subtitle style.

@NonNull InlineSuggestionUi.Style.Builder

Sets the title style.

Public methods

build

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

Returns a subclass of BundledStyle built by this builder.

setChipStyle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setChipStyle(@NonNull ViewStyle chipStyle)

Sets the chip style.

See setSingleIconChipStyle for more information about setting a special chip style for the case where the entire chip is a single icon.

setEndIconStyle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setEndIconStyle(@NonNull ImageViewStyle endIconStyle)

Sets the end icon style.

setLayoutDirection

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setLayoutDirection(int layoutDirection)

Sets the layout direction for the UI.

Note that the process that renders the UI needs to have android:supportsRtl="true" for this to take effect.

Parameters
int layoutDirection

the layout direction to set. Should be one of: LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL.

setSingleIconChipIconStyle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setSingleIconChipIconStyle(@NonNull ImageViewStyle iconStyle)

Sets the icon style for the case where there is a single icon and no text in the chip. If not provided, will fallback to use the icon style provided by setStartIconStyle

setSingleIconChipStyle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setSingleIconChipStyle(@NonNull ViewStyle chipStyle)

Sets the chip style for the case where there is a single icon and no text. If not provided, will fallback to use the chip style provided by (ViewStyle).

setStartIconStyle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setStartIconStyle(@NonNull ImageViewStyle startIconStyle)

Sets the start icon style.

See setSingleIconChipIconStyle for more information about setting a special icon style for the case where the entire chip is a single icon.

setSubtitleStyle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setSubtitleStyle(@NonNull TextViewStyle subtitleStyle)

Sets the subtitle style.

setTitleStyle

Added in 1.1.0
public @NonNull InlineSuggestionUi.Style.Builder setTitleStyle(@NonNull TextViewStyle titleStyle)

Sets the title style.