Google is committed to advancing racial equity for Black communities. See how.

InlineSuggestionUi.Style.Builder

public static final class InlineSuggestionUi.Style.Builder
extends Object

java.lang.Object
   ↳ androidx.autofill.inline.v1.InlineSuggestionUi.Style.Builder


Builder for the InlineSuggestionUi.Style.

Summary

Fields

protected final Bundle mBundle

Public methods

InlineSuggestionUi.Style build()

Returns a subclass of BundledStyle built by this builder.

InlineSuggestionUi.Style.Builder setChipStyle(ViewStyle chipStyle)

Sets the chip style.

InlineSuggestionUi.Style.Builder setEndIconStyle(ImageViewStyle endIconStyle)

Sets the end icon style.

InlineSuggestionUi.Style.Builder setLayoutDirection(int layoutDirection)

Sets the layout direction for the UI.

InlineSuggestionUi.Style.Builder setSingleIconChipIconStyle(ImageViewStyle iconStyle)

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

InlineSuggestionUi.Style.Builder setSingleIconChipStyle(ViewStyle chipStyle)

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

InlineSuggestionUi.Style.Builder setStartIconStyle(ImageViewStyle startIconStyle)

Sets the start icon style.

InlineSuggestionUi.Style.Builder setSubtitleStyle(TextViewStyle subtitleStyle)

Sets the subtitle style.

InlineSuggestionUi.Style.Builder setTitleStyle(TextViewStyle titleStyle)

Sets the title style.

Inherited methods

Fields

mBundle

protected final Bundle mBundle

Public methods

build

public InlineSuggestionUi.Style build ()

Returns a subclass of BundledStyle built by this builder.

Returns
InlineSuggestionUi.Style

setChipStyle

public InlineSuggestionUi.Style.Builder setChipStyle (ViewStyle chipStyle)

Sets the chip style.

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

Parameters
chipStyle ViewStyle

Returns
InlineSuggestionUi.Style.Builder

setEndIconStyle

public InlineSuggestionUi.Style.Builder setEndIconStyle (ImageViewStyle endIconStyle)

Sets the end icon style.

Parameters
endIconStyle ImageViewStyle

Returns
InlineSuggestionUi.Style.Builder

setLayoutDirection

public 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
layoutDirection int: the layout direction to set. Should be one of: View.LAYOUT_DIRECTION_LTR, View.LAYOUT_DIRECTION_RTL.

Returns
InlineSuggestionUi.Style.Builder

setSingleIconChipIconStyle

public InlineSuggestionUi.Style.Builder setSingleIconChipIconStyle (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(ImageViewStyle)

Parameters
iconStyle ImageViewStyle

Returns
InlineSuggestionUi.Style.Builder

setSingleIconChipStyle

public InlineSuggestionUi.Style.Builder setSingleIconChipStyle (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).

Parameters
chipStyle ViewStyle

Returns
InlineSuggestionUi.Style.Builder

setStartIconStyle

public InlineSuggestionUi.Style.Builder setStartIconStyle (ImageViewStyle startIconStyle)

Sets the start icon style.

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

Parameters
startIconStyle ImageViewStyle

Returns
InlineSuggestionUi.Style.Builder

setSubtitleStyle

public InlineSuggestionUi.Style.Builder setSubtitleStyle (TextViewStyle subtitleStyle)

Sets the subtitle style.

Parameters
subtitleStyle TextViewStyle

Returns
InlineSuggestionUi.Style.Builder

setTitleStyle

public InlineSuggestionUi.Style.Builder setTitleStyle (TextViewStyle titleStyle)

Sets the title style.

Parameters
titleStyle TextViewStyle

Returns
InlineSuggestionUi.Style.Builder