ComponentRegistry

class 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

ComponentRegistry
Link copied to clipboard
fun ComponentRegistry()

Types

Builder
Link copied to clipboard
class Builder

Functions

key
Link copied to clipboard
fun key(data: Any, options: Options): String?
Convert data to a string key using the registered keyers.
map
Link copied to clipboard
fun map(data: Any, options: Options): Any
Convert data using the registered mappers.
newBuilder
Link copied to clipboard
fun newBuilder(): ComponentRegistry.Builder
newDecoder
Link copied to clipboard
fun newDecoder(result: SourceResult, options: Options, imageLoader: ImageLoader, startIndex: Int = 0): Pair<Decoder, Int>?
Create a new Decoder using the registered decoderFactories.
newFetcher
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.

Properties

decoderFactories
Link copied to clipboard
val decoderFactories: List<Decoder.Factory>
fetcherFactories
Link copied to clipboard
val fetcherFactories: List<Pair<Fetcher.Factory<out Any>, Class<out Any>>>
interceptors
Link copied to clipboard
val interceptors: List<Interceptor>
keyers
Link copied to clipboard
val keyers: List<Pair<Keyer<out Any>, Class<out Any>>>
mappers
Link copied to clipboard
val mappers: List<Pair<Mapper<out Any, out Any>, Class<out Any>>>