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

StylesBuilder

class StylesBuilder
kotlin.Any
   ↳ androidx.autofill.inline.UiVersions.StylesBuilder

A builder responsible for providing a Bundle with encoded UI style specifications for one or more versions of UI templates.

Summary

Public methods
UiVersions.StylesBuilder
addStyle(@NonNull style: UiVersions.Style)

Adds a UI style.

Bundle

Returns the styles for one or more UI versions represented as a Bundle so it can be transported through IPC.

Public methods

addStyle

@NonNull fun addStyle(@NonNull style: UiVersions.Style): UiVersions.StylesBuilder

Adds a UI style.

Parameters
style UiVersions.Style: the style being added
Exceptions
IllegalArgumentException if the style version is not supported by the library

build

@NonNull fun build(): Bundle

Returns the styles for one or more UI versions represented as a Bundle so it can be transported through IPC.

Exceptions
IllegalStateException if no style has been put in the builder