SimpleResource

open class SimpleResource<T> : Resource<Z>

Simple wrapper for an arbitrary object which helps to satisfy some of the glide engine's contracts. Suggested usages only include resource object which don't have size and cannot be recycled/closed.

Parameters

<T>

type of the wrapped resource

Constructors

Link copied to clipboard
open fun SimpleResource(data: T)

Functions

Link copied to clipboard
fun get(): T
Returns an instance of the wrapped resource.
Link copied to clipboard
open fun getResourceClass(): Class<T>
Returns the Class of the wrapped resource.
Link copied to clipboard
fun getSize(): Int
Returns the size in bytes of the wrapped resource to use to determine how much of the memory cache this resource uses.
Link copied to clipboard
open fun recycle()
Cleans up and recycles internal resources.

Inheritors

Link copied to clipboard