AsyncDifferConfig.Builder


class AsyncDifferConfig.Builder

Builder class for AsyncDifferConfig.

Parameters

Summary

Public constructors

Public functions

AsyncDifferConfig

Creates a AsyncListDiffer with the given parameters.

AsyncDifferConfig.Builder

If provided, defines the background executor used to calculate the diff between an old and a new list.

Public constructors

Builder

Added in 1.0.0
Builder(diffCallback: DiffUtil.ItemCallback)

Public functions

build

Added in 1.0.0
fun build(): AsyncDifferConfig

Creates a AsyncListDiffer with the given parameters.

Returns
AsyncDifferConfig

A new AsyncDifferConfig.

setBackgroundThreadExecutor

Added in 1.0.0
fun setBackgroundThreadExecutor(executor: Executor?): AsyncDifferConfig.Builder

If provided, defines the background executor used to calculate the diff between an old and a new list.

If not provided or null, defaults to two thread pool executor, shared by all ListAdapterConfigs.

Parameters
executor: Executor?

The background executor to run list diffing.