Options

class Options(val context: PlatformContext, val size: Size = Size.ORIGINAL, val scale: Scale = Scale.FIT, val precision: Precision = Precision.EXACT, val diskCacheKey: String? = null, val fileSystem: FileSystem = defaultFileSystem(), val memoryCachePolicy: CachePolicy = CachePolicy.ENABLED, val diskCachePolicy: CachePolicy = CachePolicy.ENABLED, val networkCachePolicy: CachePolicy = CachePolicy.ENABLED, val extras: Extras = Extras.EMPTY)

A set of configuration options for fetching and decoding an image.

Fetchers and Decoders should respect these options as best as possible.

Constructors

Link copied to clipboard
constructor(context: PlatformContext, size: Size = Size.ORIGINAL, scale: Scale = Scale.FIT, precision: Precision = Precision.EXACT, diskCacheKey: String? = null, fileSystem: FileSystem = defaultFileSystem(), memoryCachePolicy: CachePolicy = CachePolicy.ENABLED, diskCachePolicy: CachePolicy = CachePolicy.ENABLED, networkCachePolicy: CachePolicy = CachePolicy.ENABLED, extras: Extras = Extras.EMPTY)

Properties

Link copied to clipboard

The PlatformContext used to execute this request.

Link copied to clipboard
val diskCacheKey: String? = null

The cache key to use when persisting images to the disk cache or 'null' if the component can compute its own.

Link copied to clipboard

Determines if this request is allowed to read/write from/to disk.

Link copied to clipboard

Extras that are used to configure/extend an image loader's base functionality.

Link copied to clipboard

The FileSystem that will be used to perform any disk read/write operations.

Link copied to clipboard
Link copied to clipboard

Determines if this request is allowed to read/write from/to memory.

Link copied to clipboard

Determines if this request is allowed to read from the network.

Link copied to clipboard

Precision.EXACT if the output image needs to fit/fill the target's dimensions exactly.

Link copied to clipboard

The scaling algorithm for how to fit the source image's dimensions into the target's dimensions.

Link copied to clipboard
val size: Size

The requested output size for the image request.

Functions

Link copied to clipboard
fun copy(context: PlatformContext = this.context, size: Size = this.size, scale: Scale = this.scale, precision: Precision = this.precision, diskCacheKey: String? = this.diskCacheKey, fileSystem: FileSystem = this.fileSystem, memoryCachePolicy: CachePolicy = this.memoryCachePolicy, diskCachePolicy: CachePolicy = this.diskCachePolicy, networkCachePolicy: CachePolicy = this.networkCachePolicy, extras: Extras = this.extras): Options
Link copied to clipboard
fun <T> Options.getExtra(key: Extras.Key<T>): T