RequestBuilder
open class RequestBuilder<TranscodeType> : BaseRequestOptions<T> , Cloneable, ModelTypes<T>
Content copied to clipboard
A generic class that can handle setting options and staring loads for generic resource types.
Parameters
<TranscodeType>
The type of resource that will be delivered to the .
Functions
Link copied to clipboard
open fun addListener(requestListener: RequestListener<TranscodeType>): RequestBuilder<TranscodeType>
Content copied to clipboard
Adds a RequestListener to the list that will be called in the order they were added when the request ends.
Link copied to clipboard
open fun apply(requestOptions: BaseRequestOptions<out Any>): RequestBuilder<TranscodeType>
Content copied to clipboard
Applies the given options to the request.
Link copied to clipboard
Applies CenterCrop to all default types and throws an exception if asked to transform an unknown type.
Link copied to clipboard
Applies CenterInside to all default types, CENTER_INSIDE to image types and throws an exception if asked to transform an unknown type.
Link copied to clipboard
Applies CircleCrop to all default types and throws an exception if asked to transform an unknown type.
Link copied to clipboard
Returns a copy of this request builder with all of the options put so far on this builder.
Link copied to clipboard
Disables the use of HARDWARE in Downsampler to avoid errors caused by inspecting Bitmap pixels, drawing with hardware support disabled, drawing to android.graphics.
Link copied to clipboard
Sets the DiskCacheStrategy to use for this load.
Link copied to clipboard
Disables resource decoders that return animated resources so any resource returned will be static.
Link copied to clipboard
Removes all applied Transformations for all resource classes and allows unknown resource types to be transformed without throwing an exception.
Link copied to clipboard
Loads the original unmodified data into the cache and calls the given Target with the cache File.
Loads the original unmodified data into the cache and returns a that can be used to retrieve the cache File containing the data.
Link copied to clipboard
Sets the DownsampleStrategy to use when decoding Bitmaps using .
Link copied to clipboard
Sets the value for key COMPRESSION_FORMAT.
Link copied to clipboard
Sets the value for key COMPRESSION_QUALITY.
Link copied to clipboard
Sets a Drawable to display if a load fails.
Sets a resource to display if a load fails.
open fun error(errorBuilder: RequestBuilder<TranscodeType>): RequestBuilder<TranscodeType>
Content copied to clipboard
Sets a RequestBuilder that is built and run if the load started by this fails.
Link copied to clipboard
Applies FitCenter and to all default types, FIT_CENTER to image types, and throws an exception if asked to transform an unknown type.
Link copied to clipboard
Sets the DecodeFormat to use when decoding Bitmap objects using and Glide's default GIF decoders.
Link copied to clipboard
Sets the ImageView the resource will be loaded into, cancels any existing loads into the view, and frees any resources Glide may have previously loaded into the view so they may be reused.
Set the target the resource will be loaded into.
Returns a future that can be used to do a blocking get on a background thread.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun listener(requestListener: RequestListener<TranscodeType>): RequestBuilder<TranscodeType>
Content copied to clipboard
Sets a RequestListener to monitor the resource load and removes all previously set listeners (either via this method or from addListener .
Link copied to clipboard
Returns an object to load the given Bitmap.
Returns a request builder to load the given Drawable.
Returns a request builder to load the given Uri.
Returns a request to load the given byte array.
Returns a request builder to load the given File.
Returns a request builder that uses the currently registered or Integer to load the image represented by the given Integer resource id.
Sets the specific model to load data for.
Returns a request builder to load the given java.lang.String.
Returns a request builder to load the given URL.
Link copied to clipboard
If set to true, will only load an item if found in the cache, and will not fetch from source.
Link copied to clipboard
Applies com.bumptech.glide.load.resource.bitmap.CenterCrop to all default types, and ignores unknown types.
Link copied to clipboard
Applies com.bumptech.glide.load.resource.bitmap.CenterInside to all default types, CENTER_INSIDE to image types, and ignores unknown types.
Link copied to clipboard
Applies CircleCrop to all default types, and ignores unknown types.
Link copied to clipboard
Applies FitCenter and to all default types, FIT_CENTER to image types, and ignores unknown types.
Link copied to clipboard
Applies the given Transformation for Bitmaps to the default types (Bitmap, android.graphics.drawable.
open fun <Y> optionalTransform(resourceClass: Class<Y>, transformation: Transformation<Y>): T
Content copied to clipboard
Applies the given Transformation for any decoded resource of the given type and allows unknown resource types to be ignored.
Link copied to clipboard
Overrides the com.bumptech.glide.request.target.Target's width and height with the given size.
Overrides the com.bumptech.glide.request.target.Target's width and height with the given values.
Link copied to clipboard
Sets an Drawable to display while a resource is loading.
Sets an Android resource id for a Drawable resource to display while a resource is loading.
Link copied to clipboard
Preloads the resource into the cache using SIZE_ORIGINAL as the target width and height.
Preloads the resource into the cache using the given width and height.
Link copied to clipboard
Applies a multiplier to the com.bumptech.glide.request.target.Target's size before loading the resource.
Link copied to clipboard
Allows the loaded resource to skip the memory cache.
Link copied to clipboard
Returns a future that can be used to do a blocking get on a background thread.
Link copied to clipboard
open fun thumbnail(thumbnails: Array<RequestBuilder<TranscodeType>>): RequestBuilder<TranscodeType>
Content copied to clipboard
open fun thumbnail(thumbnails: List<RequestBuilder<TranscodeType>>): RequestBuilder<TranscodeType>
Content copied to clipboard
Recursively applies thumbnail so that the RequestBuilders are loaded as thumbnails in the given priority order.
open fun thumbnail(thumbnailRequest: RequestBuilder<TranscodeType>): RequestBuilder<TranscodeType>
Content copied to clipboard
Loads and displays the resource retrieved by the given thumbnail request if it finishes before this request.
Loads a resource in an identical manner to this request except with the dimensions of the target multiplied by the given size multiplier.
Link copied to clipboard
Applies the given Transformations in the given order for Bitmaps to the default types (Bitmap, android.graphics.drawable.
Applies the given Transformation for Bitmaps to the default types (Bitmap, android.graphics.drawable.
open fun <Y> transform(resourceClass: Class<Y>, transformation: Transformation<Y>): T
Content copied to clipboard
Applies the given Transformation for any decoded resource of the given type and throws if asked to transform an unknown resource type.
Link copied to clipboard
Applies the given Transformations in the given order for Bitmaps to the default types (Bitmap, android.graphics.drawable.
Link copied to clipboard
open fun transition(transitionOptions: TransitionOptions<out Any, out Any>): RequestBuilder<TranscodeType>
Content copied to clipboard
Sets the TransitionOptions to use to transition from the placeholder or thumbnail when this load completes.
Link copied to clipboard
If set to
true
, uses a special java.util.concurrent.Executor that is used exclusively for decoding frames of animated resources, like GIFs.Link copied to clipboard
If set to
true
, uses a cached unlimited java.util.concurrent.Executor to run the request.