GlideBuilder

class GlideBuilder

A builder class for setting default structural classes for Glide to use.

Types

Link copied to clipboard
Link copied to clipboard
Use the androidx lifecycle instead of injecting custom fragments when using androidx fragments and activities.
Link copied to clipboard
This is an internal only class that may be deleted at any time without notice.

Functions

Link copied to clipboard
open fun addGlobalRequestListener(listener: RequestListener<Any>): GlideBuilder
Adds a global RequestListener that will be added to every request started with Glide.
Link copied to clipboard
open fun setAnimationExecutor(service: GlideExecutor): GlideBuilder
Sets the GlideExecutor to use when loading frames of animated images and particularly of com.bumptech.glide.load.resource.gif.GifDrawables.
Link copied to clipboard
open fun setArrayPool(arrayPool: ArrayPool): GlideBuilder
Sets the ArrayPool implementation to allow variable sized arrays to be stored and retrieved as needed.
Link copied to clipboard
open fun setBitmapPool(bitmapPool: BitmapPool): GlideBuilder
Sets the com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool implementation to use to store and retrieve reused android.graphics.
Link copied to clipboard
open fun setConnectivityMonitorFactory(factory: ConnectivityMonitorFactory): GlideBuilder
Sets the com.bumptech.glide.manager.ConnectivityMonitorFactory to use to notify of connectivity events.
Link copied to clipboard
open fun setDefaultRequestOptions(factory: Glide.RequestOptionsFactory): GlideBuilder
Sets a factory for the default RequestOptions to use for all loads across the app and returns this GlideBuilder.
open fun setDefaultRequestOptions(requestOptions: RequestOptions): GlideBuilder
Sets the default RequestOptions to use for all loads across the app.
Link copied to clipboard
open fun <T> setDefaultTransitionOptions(clazz: Class<T>, options: TransitionOptions<out Any, T>): GlideBuilder
Sets the default TransitionOptions to use when starting a request that will load a resource with the given Class.
Link copied to clipboard
open fun setDiskCache(diskCacheFactory: DiskCache.Factory): GlideBuilder
Sets the com.bumptech.glide.load.engine.cache.DiskCache.Factory implementation to use to construct the com.bumptech.glide.load.engine.cache.DiskCache to use to store data on disk.
Link copied to clipboard
open fun setDiskCacheExecutor(service: GlideExecutor): GlideBuilder
Sets the GlideExecutor to use when retrieving s that are currently in Glide's disk caches.
Link copied to clipboard
open fun setImageDecoderEnabledForBitmaps(isEnabled: Boolean): GlideBuilder
Set to true to make Glide use android.graphics.
Link copied to clipboard
open fun setIsActiveResourceRetentionAllowed(isActiveResourceRetentionAllowed: Boolean): GlideBuilder
If set to true, allows Glide to re-capture resources that are loaded into s which are subsequently de-referenced and garbage collected without being cleared.
Link copied to clipboard
open fun setLogLevel(logLevel: Int): GlideBuilder
Sets a log level constant from those in Log to indicate the desired log verbosity.
Link copied to clipboard
open fun setLogRequestOrigins(isEnabled: Boolean): GlideBuilder
Set to true to make Glide populate setOrigin for failed requests.
Link copied to clipboard
open fun setMemoryCache(memoryCache: MemoryCache): GlideBuilder
Sets the com.bumptech.glide.load.engine.cache.MemoryCache implementation to store com.bumptech.glide.load.engine.Resources that are not currently in use.
Link copied to clipboard
open fun setMemorySizeCalculator(builder: MemorySizeCalculator.Builder): GlideBuilder
open fun setMemorySizeCalculator(calculator: MemorySizeCalculator): GlideBuilder
Sets the MemorySizeCalculator to use to calculate maximum sizes for default MemoryCaches and/or default BitmapPools.
Link copied to clipboard
open fun setResizeExecutor(service: GlideExecutor): GlideBuilder
Sets the GlideExecutor to use when retrieving s that are not already in the cache.
Link copied to clipboard
open fun setSourceExecutor(service: GlideExecutor): GlideBuilder
Sets the GlideExecutor to use when retrieving s that are not already in the cache.
Link copied to clipboard
open fun useLifecycleInsteadOfInjectingFragments(isEnabled: Boolean): GlideBuilder
When given androidx Fragments and Activities, use androidx.lifecycle.