SuccessResult

class SuccessResult(val image: Image, val request: ImageRequest, val dataSource: DataSource = DataSource.MEMORY, val memoryCacheKey: MemoryCache.Key? = null, val diskCacheKey: String? = null, val isSampled: Boolean = false, val isPlaceholderCached: Boolean = false) : ImageResult

Indicates that the request completed successfully.

Constructors

Link copied to clipboard
constructor(image: Image, request: ImageRequest, dataSource: DataSource = DataSource.MEMORY, memoryCacheKey: MemoryCache.Key? = null, diskCacheKey: String? = null, isSampled: Boolean = false, isPlaceholderCached: Boolean = false)

Properties

Link copied to clipboard

The data source that the image was loaded from.

Link copied to clipboard
val diskCacheKey: String? = null

The cache key for the image in the disk cache. It is 'null' if the image was not written to the disk cache.

Link copied to clipboard
open override val image: Image

The success drawable.

Link copied to clipboard

'true' if ImageRequest.placeholderMemoryCacheKey was present in the memory cache.

Link copied to clipboard
val isSampled: Boolean = false

'true' if the image is sampled (i.e. loaded into memory at less than its original size).

Link copied to clipboard

The cache key for the image in the memory cache. It is 'null' if the image was not written to the memory cache.

Link copied to clipboard
open override val request: ImageRequest

The request that was executed to create this result.

Functions

Link copied to clipboard
fun copy(image: Image = this.image, request: ImageRequest = this.request, dataSource: DataSource = this.dataSource, memoryCacheKey: MemoryCache.Key? = this.memoryCacheKey, diskCacheKey: String? = this.diskCacheKey, isSampled: Boolean = this.isSampled, isPlaceholderCached: Boolean = this.isPlaceholderCached): SuccessResult