# InlinePresentationSpec.Builder

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Builder

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/widget/inline/InlinePresentationSpec.Builder "View this page in Java")  

```
class Builder
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                               ||
| ↳ | [android.widget.inline.InlinePresentationSpec.Builder](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec.Builder#) |

A builder for [InlinePresentationSpec](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec)

## Summary

|                                                                                                                                                                                 Public constructors                                                                                                                                                                                  ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec.Builder#Builder(android.util.Size,%20android.util.Size))`(`minSize:` `[Size](https://developer.android.com/reference/kotlin/android/util/Size.html#)`, `maxSize:` `[Size](https://developer.android.com/reference/kotlin/android/util/Size.html#)`)` Creates a new Builder. |

|                                                                                                                                                                                                          Public methods                                                                                                                                                                                                          ||
|----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [InlinePresentationSpec](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec)                  | [build](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec.Builder#build())`()` Builds the instance.                                                                                                                                            |
| [InlinePresentationSpec.Builder](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec.Builder#) | [setStyle](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec.Builder#setStyle(android.os.Bundle))`(`value:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)`)` The extras encoding the UI style information. |

## Public constructors

### Builder

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
Builder(
    minSize: Size, 
    maxSize: Size)
```

Creates a new Builder.

|                                                                         Parameters                                                                          ||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `minSize` | [Size](https://developer.android.com/reference/kotlin/android/util/Size.html#): The minimal size of the suggestion. This value cannot be `null`. |
| `maxSize` | [Size](https://developer.android.com/reference/kotlin/android/util/Size.html#): The maximal size of the suggestion. This value cannot be `null`. |

## Public methods

### build

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun build(): InlinePresentationSpec
```

Builds the instance. This builder should not be touched after calling this!

|                                                                       Return                                                                        ||
|-----------------------------------------------------------------------------------------------------------------------|------------------------------|
| [InlinePresentationSpec](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec) | This value cannot be `null`. |

### setStyle

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun setStyle(value: Bundle): InlinePresentationSpec.Builder
```

The extras encoding the UI style information.

The style bundles can be created using the relevant Style classes and their builders in the androidx autofill library e.g. `androidx.autofill.inline.UiVersions.StylesBuilder`.

The style must be set for the suggestion to render properly.

Note: There should be no remote objects in the bundle, all included remote objects will be removed from the bundle before transmission.

|                                                       Parameters                                                        ||
|---------|----------------------------------------------------------------------------------------------------------------|
| `value` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#): This value cannot be `null`. |

|                                                                                Return                                                                                ||
|----------------------------------------------------------------------------------------------------------------------------------------|------------------------------|
| [InlinePresentationSpec.Builder](https://developer.android.com/reference/kotlin/android/widget/inline/InlinePresentationSpec.Builder#) | This value cannot be `null`. |