R
- The type of resource this FutureTarget will retrieve.public interface FutureTarget<R> extends Future<R>, Target<R>
Target
and a
Future
. For example:
FutureTarget<Bitmap> futureTarget = Glide.with(fragment)
.load("http://goo.gl/1asf12")
.asBitmap()
.into(250, 250);
Bitmap myBitmap = futureTarget.get();
... // do things with bitmap and then release when finished:
futureTarget.cancel(false);
Note - Future.get()
and Future.get(long, java.util.concurrent.TimeUnit)
must be called
off of the main thread or they will block forever.
SIZE_ORIGINAL
getRequest, getSize, onLoadCleared, onLoadFailed, onLoadStarted, onResourceReady, removeCallback, setRequest
onDestroy, onStart, onStop