|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nostra13.universalimageloader.core.ImageLoader
public class ImageLoader
Singletone for image loading and displaying at ImageViews
NOTE: init(ImageLoaderConfiguration) method must be called before any other method.
| Field Summary | |
|---|---|
static String |
TAG
|
| Constructor Summary | |
|---|---|
protected |
ImageLoader()
|
| Method Summary | |
|---|---|
void |
cancelDisplayTask(android.widget.ImageView imageView)
Cancel the task of loading and displaying image for passed ImageView. |
void |
clearDiscCache()
Clears disc cache. |
void |
clearMemoryCache()
Clears memory cache |
void |
displayImage(String uri,
android.widget.ImageView imageView)
Adds display image task to execution pool. |
void |
displayImage(String uri,
android.widget.ImageView imageView,
DisplayImageOptions options)
Adds display image task to execution pool. |
void |
displayImage(String uri,
android.widget.ImageView imageView,
DisplayImageOptions options,
ImageLoadingListener listener)
Adds display image task to execution pool. |
void |
displayImage(String uri,
android.widget.ImageView imageView,
ImageLoadingListener listener)
Adds display image task to execution pool. |
DiscCacheAware |
getDiscCache()
Returns disc cache |
static ImageLoader |
getInstance()
Returns singleton class instance |
String |
getLoadingUriForView(android.widget.ImageView imageView)
Returns URI of image which is loading at this moment into passed ImageView |
MemoryCacheAware<String,android.graphics.Bitmap> |
getMemoryCache()
Returns memory cache |
void |
init(ImageLoaderConfiguration configuration)
Initializes ImageLoader's singleton instance with configuration. |
boolean |
isInited()
Returns true - if ImageLoader is initialized with configuration; false - otherwise |
void |
loadImage(android.content.Context context,
String uri,
DisplayImageOptions options,
ImageLoadingListener listener)
Adds load image task to execution pool. |
void |
loadImage(android.content.Context context,
String uri,
ImageLoadingListener listener)
Adds load image task to execution pool. |
void |
loadImage(android.content.Context context,
String uri,
ImageSize minImageSize,
DisplayImageOptions options,
ImageLoadingListener listener)
Adds load image task to execution pool. |
void |
loadImage(android.content.Context context,
String uri,
ImageSize minImageSize,
ImageLoadingListener listener)
Adds load image task to execution pool. |
void |
pause()
Pause ImageLoader. |
void |
resume()
Resumes waiting "load&display" tasks |
void |
stop()
Stops all running display image tasks, discards all other scheduled tasks |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG
| Constructor Detail |
|---|
protected ImageLoader()
| Method Detail |
|---|
public static ImageLoader getInstance()
public void init(ImageLoaderConfiguration configuration)
configuration - ImageLoader configuration
IllegalArgumentException - if configuration parameter is nullpublic boolean isInited()
public void displayImage(String uri,
android.widget.ImageView imageView)
init(ImageLoaderConfiguration) method must be called before this method call
uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")imageView - ImageView which should display image
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called before
IllegalArgumentException - if passed imageView is null
public void displayImage(String uri,
android.widget.ImageView imageView,
DisplayImageOptions options)
init(ImageLoaderConfiguration) method must be called before this method call
uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")imageView - ImageView which should display imageoptions - Display image options for image displaying. If null -
default display image options
from
configuration will be used.
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called before
IllegalArgumentException - if passed imageView is null
public void displayImage(String uri,
android.widget.ImageView imageView,
ImageLoadingListener listener)
init(ImageLoaderConfiguration) method must be called before this method call
uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")imageView - ImageView which should display imagelistener - Listener for image loading process. Listener fires events on UI
thread.
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called before
IllegalArgumentException - if passed imageView is null
public void displayImage(String uri,
android.widget.ImageView imageView,
DisplayImageOptions options,
ImageLoadingListener listener)
init(ImageLoaderConfiguration) method must be called before this method call
uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")imageView - ImageView which should display imageoptions - Display image options for image displaying. If null -
default display image options
from
configuration will be used.listener - Listener for image loading process. Listener fires events on UI
thread.
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called before
IllegalArgumentException - if passed imageView is null
public void loadImage(android.content.Context context,
String uri,
ImageLoadingListener listener)
callback.init(ImageLoaderConfiguration) method must be called before this method call
context - Application context (used for creation of fake ImageView)uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")listener - Listener for image loading process. Listener fires events on UI
thread.
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called before
public void loadImage(android.content.Context context,
String uri,
ImageSize minImageSize,
ImageLoadingListener listener)
callback.init(ImageLoaderConfiguration) method must be called before this method call
context - Application context (used for creation of fake ImageView)uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")minImageSize - Minimal size for Bitmap which will be returned in
callback. Downloaded image will be decoded
and scaled to Bitmap of the size which is equal or larger (usually a bit larger) than
incoming minImageSize .listener - Listener for image loading process. Listener fires events on UI
thread.
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called before
public void loadImage(android.content.Context context,
String uri,
DisplayImageOptions options,
ImageLoadingListener listener)
callback.init(ImageLoaderConfiguration) method must be called before this method call
context - Application context (used for creation of fake ImageView)uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")options - Display image options for image displaying. If null -
default display image options
from
configuration will be used.FakeBitmapDisplayer as displayer.listener - Listener for image loading process. Listener fires events on UI
thread.
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called before
public void loadImage(android.content.Context context,
String uri,
ImageSize minImageSize,
DisplayImageOptions options,
ImageLoadingListener listener)
callback.init(ImageLoaderConfiguration) method must be called before this method call
context - Application context (used for creation of fake ImageView)uri - Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png")minImageSize - Minimal size for Bitmap which will be returned in
callback. Downloaded image will be decoded
and scaled to Bitmap of the size which is equal or larger (usually a bit larger) than
incoming minImageSize .options - Display image options for image displaying. If null -
default display image options
from
configuration will be used.FakeBitmapDisplayer as displayer.listener - Listener for image loading process. Listener fires events on UI
thread.
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called beforepublic MemoryCacheAware<String,android.graphics.Bitmap> getMemoryCache()
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called beforepublic void clearMemoryCache()
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called beforepublic DiscCacheAware getDiscCache()
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called beforepublic void clearDiscCache()
IllegalStateException - if init(ImageLoaderConfiguration) method wasn't called beforepublic String getLoadingUriForView(android.widget.ImageView imageView)
ImageView
public void cancelDisplayTask(android.widget.ImageView imageView)
ImageView.
imageView - ImageView for which display task will be cancelledpublic void pause()
resumed.
public void resume()
public void stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||