TileRenderer.Builder


class TileRenderer.Builder


Builder for TileRenderer.

Summary

Public constructors

Builder(
    uiContext: Context,
    loadActionExecutor: Executor,
    loadActionListener: Consumer<StateBuilders.State!>
)

Builder for the TileRenderer class.

Public functions

TileRenderer.Builder
addPlatformDataProvider(
    platformDataProvider: PlatformDataProvider,
    supportedKeys: Array<PlatformDataKey<Any!>!>
)

Adds a PlatformDataProvider that will be registered for the given supportedKeys.

TileRenderer

Builds TileRenderer object.

TileRenderer.Builder
setTilesTheme(tilesTheme: @StyleRes Int)

Sets the theme to use for this Tile instance.

Public constructors

Builder

Added in 1.4.0
Builder(
    uiContext: Context,
    loadActionExecutor: Executor,
    loadActionListener: Consumer<StateBuilders.State!>
)

Builder for the TileRenderer class.

Parameters
uiContext: Context

A Context suitable for interacting with the UI.

loadActionExecutor: Executor

Executor for loadActionListener.

loadActionListener: Consumer<StateBuilders.State!>

Listener for clicks that will cause the contents to be reloaded.

Public functions

addPlatformDataProvider

fun addPlatformDataProvider(
    platformDataProvider: PlatformDataProvider,
    supportedKeys: Array<PlatformDataKey<Any!>!>
): TileRenderer.Builder

Adds a PlatformDataProvider that will be registered for the given supportedKeys. Adding the same PlatformDataProvider several times will override previous entries instead of adding multiple entries.

build

Added in 1.4.0
fun build(): TileRenderer

Builds TileRenderer object.

setTilesTheme

Added in 1.4.0
fun setTilesTheme(tilesTheme: @StyleRes Int): TileRenderer.Builder

Sets the theme to use for this Tile instance. This can be used to customise things like the default font family. If not set, zero (default theme) will be used.