RequestOptions

open class RequestOptions : BaseRequestOptions<T>

Provides type independent options to customize loads with Glide.

Non-final to allow Glide's generated classes to be assignable to their non-generated equivalents.

Functions

Link copied to clipboard
open fun apply(o: BaseRequestOptions<out Any>): T
Updates this options set with any options that are explicitly set in the given T object and returns this object if autoClone is disabled or a new T object if autoClone is enabled.
Link copied to clipboard
open fun autoClone(): T
Similar to lock except that mutations cause a clone operation to happen before the mutation resulting in all methods returning a new Object and leaving the original locked object unmodified.
Link copied to clipboard
open fun bitmapTransform(transformation: Transformation<Bitmap>): RequestOptions
Returns a RequestOptions object with transform set.
Link copied to clipboard
open fun centerCrop(): T
Applies CenterCrop to all default types and throws an exception if asked to transform an unknown type.
Link copied to clipboard
open fun centerCropTransform(): RequestOptions
Returns a RequestOptions object with centerCrop set.
Link copied to clipboard
open fun centerInside(): T
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
open fun centerInsideTransform(): RequestOptions
Returns a RequestOptions object with centerInside set.
Link copied to clipboard
open fun circleCrop(): T
Applies CircleCrop to all default types and throws an exception if asked to transform an unknown type.
Link copied to clipboard
open fun circleCropTransform(): RequestOptions
Returns a RequestOptions object with circleCrop set.
Link copied to clipboard
open fun clone(): T
Returns a copy of this request builder with all of the options put so far on this builder.
Link copied to clipboard
open fun decode(resourceClass: Class<out Any>): T
Link copied to clipboard
open fun decodeTypeOf(resourceClass: Class<out Any>): RequestOptions
Returns a RequestOptions object with decode set.
Link copied to clipboard
open fun disallowHardwareConfig(): T
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
open fun diskCacheStrategy(strategy: DiskCacheStrategy): T
Sets the DiskCacheStrategy to use for this load.
Link copied to clipboard
open fun diskCacheStrategyOf(diskCacheStrategy: DiskCacheStrategy): RequestOptions
Returns a RequestOptions object with diskCacheStrategy set.
Link copied to clipboard
open fun dontAnimate(): T
Disables resource decoders that return animated resources so any resource returned will be static.
Link copied to clipboard
open fun dontTransform(): T
Removes all applied Transformations for all resource classes and allows unknown resource types to be transformed without throwing an exception.
Link copied to clipboard
open fun downsample(strategy: DownsampleStrategy): T
Sets the DownsampleStrategy to use when decoding Bitmaps using .
Link copied to clipboard
open fun downsampleOf(strategy: DownsampleStrategy): RequestOptions
Returns a RequestOptions object with downsample set.
Link copied to clipboard
open fun encodeFormat(format: CompressFormat): T
Sets the value for key COMPRESSION_FORMAT.
Link copied to clipboard
open fun encodeFormatOf(format: CompressFormat): RequestOptions
Returns a com.bumptech.glide.request.RequestOptions with encodeFormat called with the given format.
Link copied to clipboard
open fun encodeQuality(quality: Int): T
Sets the value for key COMPRESSION_QUALITY.
Link copied to clipboard
open fun encodeQualityOf(quality: Int): RequestOptions
Returns a com.bumptech.glide.request.RequestOptions with encodeQuality called with the given quality.
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun error(drawable: Drawable): T
Sets a Drawable to display if a load fails.
open fun error(resourceId: Int): T
Sets a resource to display if a load fails.
Link copied to clipboard
open fun errorOf(errorDrawable: Drawable): RequestOptions
Returns a RequestOptions object with error set.
open fun errorOf(errorId: Int): RequestOptions
Returns a RequestOptions object with error} set.
Link copied to clipboard
open fun fallback(drawable: Drawable): T
Sets an Drawable to display if the model provided to load is null.
open fun fallback(resourceId: Int): T
Sets a resource to display if the model provided to load is null.
Link copied to clipboard
open fun fitCenter(): T
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
open fun fitCenterTransform(): RequestOptions
Returns a RequestOptions object with fitCenter set.
Link copied to clipboard
open fun format(format: DecodeFormat): T
Sets the DecodeFormat to use when decoding Bitmap objects using and Glide's default GIF decoders.
Link copied to clipboard
open fun formatOf(format: DecodeFormat): RequestOptions
Returns a RequestOptions object with format set.
Link copied to clipboard
open fun frame(frameTimeMicros: Long): T
Sets the time position of the frame to extract from a video.
Link copied to clipboard
open fun frameOf(frameTimeMicros: Long): RequestOptions
Returns a RequestOptions object with frame set.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
fun isDiskCacheStrategySet(): Boolean
Link copied to clipboard
fun isMemoryCacheable(): Boolean
Link copied to clipboard
fun isPrioritySet(): Boolean
Link copied to clipboard
fun isSkipMemoryCacheSet(): Boolean
Link copied to clipboard
fun isTransformationSet(): Boolean
Link copied to clipboard
fun isValidOverride(): Boolean
Link copied to clipboard
open fun lock(): T
Throws if any further mutations are attempted.
Link copied to clipboard
open fun noAnimation(): RequestOptions
Link copied to clipboard
open fun noTransformation(): RequestOptions
Returns a RequestOptions object with dontTransform set.
Link copied to clipboard
open fun onlyRetrieveFromCache(flag: Boolean): T
If set to true, will only load an item if found in the cache, and will not fetch from source.
Link copied to clipboard
open fun <T> option(option: Option<T>, value: T): RequestOptions
Returns a RequestOptions object with the given Option set via set.
Link copied to clipboard
open fun optionalCenterCrop(): T
Applies com.bumptech.glide.load.resource.bitmap.CenterCrop to all default types, and ignores unknown types.
Link copied to clipboard
open fun optionalCenterInside(): T
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
open fun optionalCircleCrop(): T
Applies CircleCrop to all default types, and ignores unknown types.
Link copied to clipboard
open fun optionalFitCenter(): T
Applies FitCenter and to all default types, FIT_CENTER to image types, and ignores unknown types.
Link copied to clipboard
open fun optionalTransform(transformation: Transformation<Bitmap>): T
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
Applies the given Transformation for any decoded resource of the given type and allows unknown resource types to be ignored.
Link copied to clipboard
open fun override(size: Int): T
Overrides the com.bumptech.glide.request.target.Target's width and height with the given size.
open fun override(width: Int, height: Int): T
Overrides the com.bumptech.glide.request.target.Target's width and height with the given values.
Link copied to clipboard
open fun overrideOf(size: Int): RequestOptions
Returns a RequestOptions with override set where both the width and height are the given size.
open fun overrideOf(width: Int, height: Int): RequestOptions
Returns a RequestOptions object with override} set.
Link copied to clipboard
open fun placeholder(drawable: Drawable): T
Sets an Drawable to display while a resource is loading.
open fun placeholder(resourceId: Int): T
Sets an Android resource id for a Drawable resource to display while a resource is loading.
Link copied to clipboard
open fun placeholderOf(placeholder: Drawable): RequestOptions
open fun placeholderOf(placeholderId: Int): RequestOptions
Returns a RequestOptions object with placeholder set.
Link copied to clipboard
open fun priority(priority: Any): T
Sets the priority for this load.
Link copied to clipboard
open fun priorityOf(priority: Any): RequestOptions
Returns a RequestOptions object with priority} set.
Link copied to clipboard
open fun <Y> set(option: Option<Y>, value: Y): T
Link copied to clipboard
open fun signature(signature: Key): T
Sets some additional data to be mixed in to the memory and disk cache keys allowing the caller more control over when cached data is invalidated.
Link copied to clipboard
open fun signatureOf(signature: Key): RequestOptions
Returns a RequestOptions object with signature set.
Link copied to clipboard
open fun sizeMultiplier(sizeMultiplier: Float): T
Applies a multiplier to the com.bumptech.glide.request.target.Target's size before loading the resource.
Link copied to clipboard
open fun sizeMultiplierOf(sizeMultiplier: Float): RequestOptions
Returns a RequestOptions object with sizeMultiplier set.
Link copied to clipboard
open fun skipMemoryCache(skip: Boolean): T
Allows the loaded resource to skip the memory cache.
Link copied to clipboard
open fun skipMemoryCacheOf(skipMemoryCache: Boolean): RequestOptions
Returns a RequestOptions object with skipMemoryCache set.
Link copied to clipboard
open fun theme(theme: Theme): T
Sets the android.content.res.Resources.
Link copied to clipboard
open fun timeout(timeoutMs: Int): T
Sets the read and write timeout for the http requests used to load the image.
Link copied to clipboard
open fun timeoutOf(timeout: Int): RequestOptions
Returns a RequestOptions object with timeout set.
Link copied to clipboard
open fun transform(transformations: Array<Transformation<Bitmap>>): T
Applies the given Transformations in the given order for Bitmaps to the default types (Bitmap, android.graphics.drawable.
open fun transform(transformation: Transformation<Bitmap>): T
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
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
open fun transforms(transformations: Array<Transformation<Bitmap>>): T
Applies the given Transformations in the given order for Bitmaps to the default types (Bitmap, android.graphics.drawable.
Link copied to clipboard
open fun useAnimationPool(flag: Boolean): T
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
open fun useUnlimitedSourceGeneratorsPool(flag: Boolean): T
If set to true, uses a cached unlimited java.util.concurrent.Executor to run the request.

Properties

Link copied to clipboard
open val diskCacheStrategy: DiskCacheStrategy
Link copied to clipboard
open val errorId: Int
Link copied to clipboard
open val errorPlaceholder: Drawable
Link copied to clipboard
open val fallbackDrawable: Drawable
Link copied to clipboard
open val fallbackId: Int
Link copied to clipboard
open val isLocked: Boolean
Link copied to clipboard
open val isTransformationAllowed: Boolean
Link copied to clipboard
open val isTransformationRequired: Boolean
Link copied to clipboard
open val onlyRetrieveFromCache: Boolean
Link copied to clipboard
open val options: Options
Link copied to clipboard
open val overrideHeight: Int
Link copied to clipboard
open val overrideWidth: Int
Link copied to clipboard
open val placeholderDrawable: Drawable
Link copied to clipboard
open val placeholderId: Int
Link copied to clipboard
open val priority: Any
Link copied to clipboard
open val resourceClass: Class<out Any>
Link copied to clipboard
open val signature: Key
Link copied to clipboard
open val sizeMultiplier: Float
Link copied to clipboard
open val theme: Theme
Link copied to clipboard
open val transformations: Map<Class<out Any>, Transformation<out Any>>
Link copied to clipboard
open val useAnimationPool: Boolean
Link copied to clipboard
open val useUnlimitedSourceGeneratorsPool: Boolean