TileRenderer.Builder


public final class TileRenderer.Builder


Builder for TileRenderer.

Summary

Public constructors

Builder(
    @NonNull Context uiContext,
    @NonNull Executor loadActionExecutor,
    @NonNull Consumer<StateBuilders.State> loadActionListener
)

Builder for the TileRenderer class.

Public methods

@NonNull TileRenderer.Builder
addPlatformDataProvider(
    @NonNull PlatformDataProvider platformDataProvider,
    @NonNull PlatformDataKey[] supportedKeys
)

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

@NonNull TileRenderer

Builds TileRenderer object.

@NonNull TileRenderer.Builder
setTilesTheme(@StyleRes int tilesTheme)

Sets the theme to use for this Tile instance.

Public constructors

Builder

Added in 1.4.0
public Builder(
    @NonNull Context uiContext,
    @NonNull Executor loadActionExecutor,
    @NonNull Consumer<StateBuilders.State> loadActionListener
)

Builder for the TileRenderer class.

Parameters
@NonNull Context uiContext

A Context suitable for interacting with the UI.

@NonNull Executor loadActionExecutor

Executor for loadActionListener.

@NonNull Consumer<StateBuilders.State> loadActionListener

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

Public methods

addPlatformDataProvider

public @NonNull TileRenderer.Builder addPlatformDataProvider(
    @NonNull PlatformDataProvider platformDataProvider,
    @NonNull PlatformDataKey[] supportedKeys
)

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
public @NonNull TileRenderer build()

Builds TileRenderer object.

setTilesTheme

Added in 1.4.0
public @NonNull TileRenderer.Builder setTilesTheme(@StyleRes int tilesTheme)

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.