public interface PhotoManager
BaseRecipientAdapter
to handle fetching
photos from external sources and caching them for faster lookup later.Modifier and Type | Interface and Description |
---|---|
static interface |
PhotoManager.PhotoManagerCallback |
Modifier and Type | Field and Description |
---|---|
static int |
PHOTO_CACHE_SIZE
The number of photos cached in this Adapter.
|
Modifier and Type | Method and Description |
---|---|
void |
populatePhotoBytesAsync(RecipientEntry entry,
PhotoManager.PhotoManagerCallback callback)
Sets the
RecipientEntry 's photo bytes. |
static final int PHOTO_CACHE_SIZE
void populatePhotoBytesAsync(RecipientEntry entry, PhotoManager.PhotoManagerCallback callback)
RecipientEntry
's photo bytes. If the photo bytes
are cached, this action happens immediately. Otherwise, the work to fetch the photo
bytes is performed asynchronously before setting the value on the UI thread.
If the photo bytes were fetched asynchronously,
PhotoManager.PhotoManagerCallback.onPhotoBytesAsynchronouslyPopulated()
is called. This
method is not called if the photo bytes have been cached previously (because no
asynchronous work was performed). In that case,
PhotoManager.PhotoManagerCallback.onPhotoBytesPopulated()
is called.