UiVersions.StylesBuilder


public final class 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

@NonNull UiVersions.StylesBuilder

Adds a UI style.

@NonNull Bundle

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

Public methods

addStyle

Added in 1.1.0
public @NonNull UiVersions.StylesBuilder addStyle(@NonNull UiVersions.Style style)

Adds a UI style.

Parameters
@NonNull UiVersions.Style style

the style being added

Throws
java.lang.IllegalArgumentException

if the style version is not supported by the library

build

Added in 1.1.0
public @NonNull Bundle build()

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

Throws
java.lang.IllegalStateException

if no style has been put in the builder