Registry
Manages component registration to extend or replace Glide's default loading, decoding, and encoding logic.
Constructors
Types
Link copied to clipboard
Thrown when some necessary component is missing for a load.
Link copied to clipboard
Thrown when no ImageHeaderParser is registered.
Link copied to clipboard
open class NoModelLoaderAvailableException : Registry.MissingComponentException
Content copied to clipboard
Thrown when no com.bumptech.glide.load.model.ModelLoader is registered for a given model class.
Link copied to clipboard
open class NoResultEncoderAvailableException : Registry.MissingComponentException
Content copied to clipboard
Thrown when no ResourceEncoder is registered for a given resource class.
Link copied to clipboard
open class NoSourceEncoderAvailableException : Registry.MissingComponentException
Content copied to clipboard
Thrown when no Encoder is registered for a given data class.
Functions
Link copied to clipboard
open fun <Data> append(dataClass: Class<Data>, encoder: Encoder<Data>): Registry
Content copied to clipboard
Appends the given Encoder onto the list of available Encoders so that it is attempted after all earlier and default Encoders for the given data class.
open fun <TResource> append(resourceClass: Class<TResource>, encoder: ResourceEncoder<TResource>): Registry
Content copied to clipboard
Appends the given ResourceEncoder into the list of available ResourceEncoders so that it is attempted after all earlier and default ResourceEncoders for the given data type.
open fun <Data, TResource> append( dataClass: Class<Data>, resourceClass: Class<TResource>, decoder: ResourceDecoder<Data, TResource>): Registry
Content copied to clipboard
Appends the given ResourceDecoder onto the list of all available s allowing it to be used if all earlier and default ResourceDecoders for the given types fail (or there are none).
open fun <Model, Data> append( modelClass: Class<Model>, dataClass: Class<Data>, factory: ModelLoaderFactory<Model, Data>): Registry
Content copied to clipboard
Appends a new ModelLoaderFactory onto the end of the existing set so that the constructed ModelLoader will be tried after all default and previously registered ModelLoaders for the given model and data classes.
open fun <Data, TResource> append( bucket: String, dataClass: Class<Data>, resourceClass: Class<TResource>, decoder: ResourceDecoder<Data, TResource>): Registry
Content copied to clipboard
Appends the given ResourceDecoder onto the list of available ResourceDecoders in this bucket, allowing it to be used if all earlier and default ResourceDecoders for the given types in this bucket fail (or there are none).
Link copied to clipboard
Link copied to clipboard
open fun <Model> getModelLoaders(model: Model): List<ModelLoader<Model, out Any>>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isResourceEncoderAvailable(resource: Resource<out Any>): Boolean
Content copied to clipboard
Link copied to clipboard
open fun <Data> prepend(dataClass: Class<Data>, encoder: Encoder<Data>): Registry
Content copied to clipboard
Prepends the given Encoder into the list of available Encoders so that it is attempted before all later and default Encoders for the given data class.
open fun <TResource> prepend(resourceClass: Class<TResource>, encoder: ResourceEncoder<TResource>): Registry
Content copied to clipboard
Prepends the given ResourceEncoder into the list of available ResourceEncoders so that it is attempted before all later and default ResourceEncoders for the given data type.
open fun <Data, TResource> prepend( dataClass: Class<Data>, resourceClass: Class<TResource>, decoder: ResourceDecoder<Data, TResource>): Registry
Content copied to clipboard
Prepends the given ResourceDecoder into the list of all available s so that it is attempted before all later and default ResourceDecoders for the given types.
open fun <Model, Data> prepend( modelClass: Class<Model>, dataClass: Class<Data>, factory: ModelLoaderFactory<Model, Data>): Registry
Content copied to clipboard
Prepends a new ModelLoaderFactory onto the beginning of the existing set so that the constructed ModelLoader will be tried before all default and previously registered ModelLoaders for the given model and data classes.
open fun <Data, TResource> prepend( bucket: String, dataClass: Class<Data>, resourceClass: Class<TResource>, decoder: ResourceDecoder<Data, TResource>): Registry
Content copied to clipboard
Prepends the given ResourceDecoder into the list of available ResourceDecoders in the same bucket so that it is attempted before all later and default s for the given types in that bucket.
Link copied to clipboard
Registers a new ImageHeaderParser that can obtain some basic metadata from an image header (orientation, type etc).
Registers a new com.bumptech.glide.load.data.DataRewinder.Factory to handle a non-default data type that can be rewind to allow for efficient reads of file headers.
Content copied to clipboard
Registers the given Encoder for the given data class (InputStream, FileDescriptor etc).
Content copied to clipboard
Appends the given ResourceEncoder into the list of available ResourceEncoders so that it is attempted after all earlier and default ResourceEncoders for the given data type.
open fun <TResource, Transcode> register( resourceClass: Class<TResource>, transcodeClass: Class<Transcode>, transcoder: ResourceTranscoder<TResource, Transcode>): Registry
Content copied to clipboard
Registers the given ResourceTranscoder to convert from the given resource Class to the given transcode Class.
Link copied to clipboard
open fun <Model, Data> replace( modelClass: Class<Model>, dataClass: Class<Data>, factory: ModelLoaderFactory<out Model, out Data>): Registry
Content copied to clipboard
Removes all default and previously registered ModelLoaderFactorys for the given data and model class and replaces all of them with the single ModelLoader provided.
Link copied to clipboard
fun setResourceDecoderBucketPriorityList(buckets: List<String>): Registry
Content copied to clipboard
Overrides the default ordering of resource decoder buckets.