Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
A builder for InlinePresentationSpec
Summary
Public constructors |
Creates a new Builder.
|
Public constructors
Builder
Builder(
minSize: Size,
maxSize: Size)
Creates a new Builder.
Parameters |
minSize |
Size: The minimal size of the suggestion. This value cannot be null . |
maxSize |
Size: The maximal size of the suggestion. This value cannot be null . |
Public methods
build
fun build(): InlinePresentationSpec
Builds the instance. This builder should not be touched after calling this!
setStyle
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: This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# InlinePresentationSpec.Builder\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/widget/inline/InlinePresentationSpec.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|-----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.widget.inline.InlinePresentationSpec.Builder](#) |\n\nA builder for [InlinePresentationSpec](/reference/kotlin/android/widget/inline/InlinePresentationSpec)\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(android.util.Size,%20android.util.Size))`(`minSize:` `[Size](../../util/Size.html#)`, `maxSize:` `[Size](../../util/Size.html#)`)` Creates a new Builder. |\n\n| Public methods ||\n|------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [InlinePresentationSpec](/reference/kotlin/android/widget/inline/InlinePresentationSpec) | [build](#build())`()` Builds the instance. |\n| [InlinePresentationSpec.Builder](#) | [setStyle](#setStyle(android.os.Bundle))`(`value:` `[Bundle](../../os/Bundle.html#)`)` The extras encoding the UI style information. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(\n minSize: Size, \n maxSize: Size)\n```\n\nCreates a new Builder.\n\n| Parameters ||\n|-----------|-------------------------------------------------------------------------------------------------|\n| `minSize` | [Size](../../util/Size.html#): The minimal size of the suggestion. This value cannot be `null`. |\n| `maxSize` | [Size](../../util/Size.html#): The maximal size of the suggestion. This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): InlinePresentationSpec\n```\n\nBuilds the instance. This builder should not be touched after calling this!\n\n| Return ||\n|------------------------------------------------------------------------------------------|------------------------------|\n| [InlinePresentationSpec](/reference/kotlin/android/widget/inline/InlinePresentationSpec) | This value cannot be `null`. |\n\n### setStyle\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setStyle(value: Bundle): InlinePresentationSpec.Builder\n```\n\nThe extras encoding the UI style information.\n\nThe 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`.\n\nThe style must be set for the suggestion to render properly.\n\nNote: There should be no remote objects in the bundle, all included remote objects will be removed from the bundle before transmission.\n\n| Parameters ||\n|---------|---------------------------------------------------------------|\n| `value` | [Bundle](../../os/Bundle.html#): This value cannot be `null`. |\n\n| Return ||\n|-------------------------------------|------------------------------|\n| [InlinePresentationSpec.Builder](#) | This value cannot be `null`. |"]]