# InlineSuggestionUi.Content.Builder

Artifact: [androidx.autofill:autofill](https://developer.android.com/jetpack/androidx/releases/autofill) [View Source](https://cs.android.com/search?q=file:androidx/autofill/inline/v1/InlineSuggestionUi.java+class:androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

*** ** * ** ***


```
public final class InlineSuggestionUi.Content.Builder
```

<br />

*** ** * ** ***

Builder for the `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content`.

## Summary

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content` | `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder#build()()` Returns a subclass of `https://developer.android.com/reference/androidx/autofill/inline/common/SlicedContent` built by this builder. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder` | `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder#setContentDescription(java.lang.CharSequence)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html contentDescription)` Sets the content description for the suggestion view. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder` | `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder#setEndIcon(android.graphics.drawable.Icon)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html endIcon)` Sets the end icon of the suggestion UI. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder` | `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder#setHints(java.util.List<java.lang.String>)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> hints)` Sets hints to indicate the kind of data in the suggestion. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder` | `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder#setStartIcon(android.graphics.drawable.Icon)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html startIcon)` Sets the start icon of the suggestion UI. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder` | `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder#setSubtitle(java.lang.CharSequence)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html subtitle)` Sets the subtitle of the suggestion UI. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder` | `https://developer.android.com/reference/androidx/autofill/inline/v1/InlineSuggestionUi.Content.Builder#setTitle(java.lang.CharSequence)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html title)` Sets the title of the suggestion UI. |

## Public methods

### build

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
public @NonNull InlineSuggestionUi.Content build()
```

Returns a subclass of `https://developer.android.com/reference/androidx/autofill/inline/common/SlicedContent` built by this builder.

### setContentDescription

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
public @NonNull InlineSuggestionUi.Content.Builder setContentDescription(@NonNull CharSequence contentDescription)
```

Sets the content description for the suggestion view.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html contentDescription` | the content description. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/View.html#setContentDescription(java.lang.CharSequence)` |   |

### setEndIcon

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
public @NonNull InlineSuggestionUi.Content.Builder setEndIcon(@NonNull Icon endIcon)
```

Sets the end icon of the suggestion UI.

Note that the `https://developer.android.com/reference/androidx/autofill/inline/common/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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html endIcon` | `https://developer.android.com/reference/android/graphics/drawable/Icon.html` resource displayed at end of slice. |

### setHints

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
public @NonNull InlineSuggestionUi.Content.Builder setHints(@NonNull List<String> hints)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> hints` | defined in `https://developer.android.com/reference/androidx/autofill/inline/SuggestionHintConstants` |

### setStartIcon

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
public @NonNull InlineSuggestionUi.Content.Builder setStartIcon(@NonNull Icon startIcon)
```

Sets the start icon of the suggestion UI.

Note that the `https://developer.android.com/reference/androidx/autofill/inline/common/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 |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html startIcon` | `https://developer.android.com/reference/android/graphics/drawable/Icon.html` resource displayed at start of slice. |

### setSubtitle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
public @NonNull InlineSuggestionUi.Content.Builder setSubtitle(@NonNull CharSequence subtitle)
```

Sets the subtitle of the suggestion UI.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html subtitle` | displayed as subtitle of slice. |

### setTitle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
public @NonNull InlineSuggestionUi.Content.Builder setTitle(@NonNull CharSequence title)
```

Sets the title of the suggestion UI.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html title` | displayed as title of slice. |