ComponentRegistry

Registry for all the components that an ImageLoader uses to fulfil image requests.

Use this class to register support for custom Interceptors, Mappers, Keyers, Fetchers, and Decoders.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class Builder

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val keyers: List<Pair<Keyer<out Any>, KClass<out Any>>>
Link copied to clipboard
val mappers: List<Pair<Mapper<out Any, out Any>, KClass<out Any>>>

Functions

Link copied to clipboard
fun key(data: Any, options: Options): String?

Convert data to a string key using the registered keyers.

Link copied to clipboard
fun map(data: Any, options: Options): Any

Convert data using the registered mappers.

Link copied to clipboard
Link copied to clipboard
fun newDecoder(result: SourceFetchResult, options: Options, imageLoader: ImageLoader, startIndex: Int = 0): Pair<Decoder, Int>?

Create a new Decoder using the registered decoderFactories.

Link copied to clipboard
fun newFetcher(data: Any, options: Options, imageLoader: ImageLoader, startIndex: Int = 0): Pair<Fetcher, Int>?

Create a new Fetcher using the registered fetcherFactories.