public class ImageLoaderFactory
extends java.lang.Object
ImageLoader.
Here defines two ImageLoader, one is the default, the other one is the stable.
You can use the stable one to load the images which will not change frequently.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_FILE_CACHE_SIZE_IN_KB |
| Constructor and Description |
|---|
ImageLoaderFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ImageLoader |
create(android.content.Context context) |
static ImageLoader |
create(android.content.Context context,
ImageLoadHandler imageLoadHandler) |
static ImageLoader |
createStableImageLoader(android.content.Context context) |
static ImageLoader |
createStableImageLoader(android.content.Context context,
ImageLoadHandler imageLoadHandler) |
static void |
customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
int defaultDiskCacheSizeInKB)
customize cache
|
static void |
customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
int defaultDiskCacheSizeInKB,
int stableDiskCacheSizeInKB)
customize cache
|
static void |
customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
java.lang.String defaultDiskCachePath,
int defaultDiskCacheSizeInKB)
customize cache
|
static void |
customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
java.lang.String defaultDiskCachePath,
int defaultDiskCacheSizeInKB,
java.lang.String stableDiskCachePath,
int stableDiskCacheSizeInKB)
customize cache
|
static ImageProvider |
getDefaultImageProvider(android.content.Context context) |
static int |
getDefaultMemoryCacheSizeInKB() |
static ImageProvider |
getStableImageProvider(android.content.Context context) |
static void |
setDefaultImageDownloader(ImageDownloader imageDownloader)
set a default
ImageDownloader for all ImageLoader |
static void |
setDefaultImageLoadHandler(ImageLoadHandler imageLoadHandler) |
static void |
setDefaultImageProvider(ImageProvider imageProvider) |
static void |
setDefaultImageReSizer(ImageReSizer imageReSizer) |
static void |
setDefaultImageTaskExecutor(ImageTaskExecutor imageTaskExecutor) |
static void |
setStableImageProvider(ImageProvider imageProvider) |
public static int getDefaultMemoryCacheSizeInKB()
public static void customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
int defaultDiskCacheSizeInKB)
context - memoryCacheSizeInKB - How many memory should use. Will not be greater than 50% of free memorydefaultDiskCacheSizeInKB - Default disk cache size.public static void customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
java.lang.String defaultDiskCachePath,
int defaultDiskCacheSizeInKB)
context - memoryCacheSizeInKB - How many memory should use. Will not be greater than 50% of free memorydefaultDiskCachePath - Default image cache path.
Absolute path or a relative path under cache directory. External cache first.
If not specified, using DEFAULT_FILE_CACHE_DIR under cache directory.defaultDiskCacheSizeInKB - Default disk cache size.public static void customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
int defaultDiskCacheSizeInKB,
int stableDiskCacheSizeInKB)
context - memoryCacheSizeInKB - How many memory should use. Will not be greater than 50% of free memorydefaultDiskCacheSizeInKB - Default disk cache size.stableDiskCacheSizeInKB - Stable disk cache size.public static void customizeCache(android.content.Context context,
int memoryCacheSizeInKB,
java.lang.String defaultDiskCachePath,
int defaultDiskCacheSizeInKB,
java.lang.String stableDiskCachePath,
int stableDiskCacheSizeInKB)
context - memoryCacheSizeInKB - How many memory should use. Will not be greater than 50% of free memorydefaultDiskCachePath - Default image cache path.
Absolute path or a relative path under cache directory. External cache first.
If not specified, using DEFAULT_FILE_CACHE_DIR under cache directory.defaultDiskCacheSizeInKB - Default disk cache size.stableDiskCachePath - Path for stable cache directory. Default is STABLE_FILE_CACHE_DIRstableDiskCacheSizeInKB - Stable disk cache size.public static ImageLoader createStableImageLoader(android.content.Context context)
public static ImageLoader createStableImageLoader(android.content.Context context, ImageLoadHandler imageLoadHandler)
public static ImageLoader create(android.content.Context context)
public static ImageLoader create(android.content.Context context, ImageLoadHandler imageLoadHandler)
public static void setDefaultImageDownloader(ImageDownloader imageDownloader)
ImageDownloader for all ImageLoaderimageDownloader - public static void setDefaultImageReSizer(ImageReSizer imageReSizer)
public static void setDefaultImageTaskExecutor(ImageTaskExecutor imageTaskExecutor)
public static void setDefaultImageLoadHandler(ImageLoadHandler imageLoadHandler)
public static void setDefaultImageProvider(ImageProvider imageProvider)
public static void setStableImageProvider(ImageProvider imageProvider)
public static ImageProvider getDefaultImageProvider(android.content.Context context)
public static ImageProvider getStableImageProvider(android.content.Context context)