public abstract class CursorAdapterWithImageCache
extends android.widget.CursorAdapter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DISK_CACHE_UNIQUE_NAME_USER_AVATARS |
| Constructor and Description |
|---|
CursorAdapterWithImageCache(android.content.Context context,
android.database.Cursor c,
int flags,
java.lang.String diskCacheUniqueName,
int avatarSizeInDP) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBitmapToDiskCache(java.lang.String key,
android.graphics.Bitmap bitmap)
Save bitmap to disk cache.
|
void |
addBitmapToMemoryCache(java.lang.String key,
android.graphics.Bitmap bitmap)
Save bitmap to memory cache.
|
void |
closeDiskCache()
Close disk cache.
|
android.graphics.Bitmap |
getBitmapFromDiskCache(java.lang.String key)
Retrieve the bitmap from disk cache.
|
android.graphics.Bitmap |
getBitmapFromMemCache(java.lang.String key)
Retrieve the bitmap from memory cache.
|
void |
loadAvatar(java.lang.String avatarAssetId,
java.lang.ref.WeakReference<android.widget.ImageView> imageViewWeakReference)
Load avatar image from the network.
|
bindView, changeCursor, convertToString, getCount, getCursor, getDropDownView, getDropDownViewTheme, getFilter, getFilterQueryProvider, getItem, getItemId, getView, hasStableIds, init, newDropDownView, newView, onContentChanged, runQueryOnBackgroundThread, setDropDownViewTheme, setFilterQueryProvider, swapCursorareAllItemsEnabled, getItemViewType, getViewTypeCount, isEmpty, isEnabled, notifyDataSetChanged, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserverpublic static final java.lang.String DISK_CACHE_UNIQUE_NAME_USER_AVATARS
public CursorAdapterWithImageCache(android.content.Context context,
android.database.Cursor c,
int flags,
java.lang.String diskCacheUniqueName,
int avatarSizeInDP)
public void loadAvatar(java.lang.String avatarAssetId,
java.lang.ref.WeakReference<android.widget.ImageView> imageViewWeakReference)
avatarAssetId - Avatar ID on the network.imageViewWeakReference - Weak reference to image to which the avatar should be loaded.public void addBitmapToMemoryCache(java.lang.String key,
android.graphics.Bitmap bitmap)
key - The unique id for the bitmap. Avatar id.bitmap - Bitmap to save.public android.graphics.Bitmap getBitmapFromMemCache(java.lang.String key)
key - The unique id for the bitmap. Avatar id.public void addBitmapToDiskCache(java.lang.String key,
android.graphics.Bitmap bitmap)
key - The unique id for the bitmap. Avatar id.bitmap - Bitmap to save.public android.graphics.Bitmap getBitmapFromDiskCache(java.lang.String key)
key - The unique id for the bitmap. Avatar id.public void closeDiskCache()