CustomTarget

open fun CustomTarget()

Creates a new CustomTarget that will attempt to load the resource in its original size.

This constructor can cause very memory inefficient loads if the resource is large and can cause OOMs. It's provided as a convenience for when you'd like to specify dimensions with override. In all other cases, prefer CustomTarget.


open fun CustomTarget(width: Int, height: Int)

Creates a new CustomTarget that will return the given width and height as the requested size (unless overridden by override in the request).

Parameters

width

The requested width (> 0, or == Target.SIZE_ORIGINAL).

height

The requested height (> 0, or == Target.SIZE_ORIGINAL).

Throws

if width/height doesn't meet the requirement: > 0, or == Target.SIZE_ORIGINAL