Interface IImageLoader
interface IImageLoader
Extends com.amazon.apmf.IStandard
Interface to load the IImage from a URI.
Methods
load()
Initiates an asynchronous image load request. SeeIImageLoadRequest*load(stringuri,IImageLoadListener*listener,IImageOptions?config)
IImageLoadListener for more details on receiving the IImage result.
See IImageLoadRequest for more details on managing a request while it is running.
Parameters
uri
string — Required
URI from where image has to be downloaded.
listener
IImageLoadListener* — Required
IImageLoadListener which can be used to listen to the image load events.
config
IImageOptions? — Optional
IImageOptions using which the download will be processed.
Returns
IImageLoadRequest*
IImageLoadRequest on which user can call cancel on.
prefetch()
Initiates an asynchronous pre-fetch request. Pre-fetching ensures that subsequentIImageLoadRequest*prefetch(stringuri,IImageLoadListener*listener,IImageOptions?config)
IImageLoader::load requests perform faster through implementation-specific mechanisms.
Parameters
uri
string — Required
URI from where image has to be downloaded.
listener
IImageLoadListener* — Required
IImageLoadListener which can be used to listen to the image load events.
config
IImageOptions? — Optional
IImageOptions using which the download will be processed.
Returns
IImageLoadRequest*
IImageLoadRequest on which user can call cancel on.
getImageSize()
Gets the dimensions (height and width) of thecom.amazon.kepler.uitoolkit.graphics.SizegetImageSize(stringuri)
IImage.
If there is a cache hit, the dimensions will be fetched from the cache.
Otherwise, it will be fetched from the originating source.
Note: This is a synchronous blocking call. If the image is not in the cache,
it will fetch from the originating source which may involve a network request.
Avoid calling on the UI thread if a cache miss is possible.
Parameters
uri
string — Required
URI of the IImage.
Returns
com.amazon.kepler.uitoolkit.graphics.Size
Dimensions of the IImage.

