|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.android.volley.toolbox.ImageLoader
public class ImageLoader
Helper that handles loading and caching images from remote URLs.
The simple way to use this class is to call get(String, ImageListener)
and to pass in the default image listener provided by
getImageListener(ImageView, int, int)
. Note that all function calls to
this class must be made from the main thead, and all responses will be delivered to the main
thread as well.
入れ子のクラスの概要 | |
---|---|
static interface |
ImageLoader.ImageCache
Simple cache adapter interface. |
class |
ImageLoader.ImageContainer
Container object for all of the data surrounding an image request. |
static interface |
ImageLoader.ImageListener
Interface for the response handlers on image requests. |
コンストラクタの概要 | |
---|---|
ImageLoader(RequestQueue queue,
ImageLoader.ImageCache imageCache)
Constructs a new ImageLoader. |
メソッドの概要 | |
---|---|
ImageLoader.ImageContainer |
get(java.lang.String requestUrl,
ImageLoader.ImageListener listener)
Returns an ImageContainer for the requested URL. |
ImageLoader.ImageContainer |
get(java.lang.String requestUrl,
ImageLoader.ImageListener imageListener,
int maxWidth,
int maxHeight)
Issues a bitmap request with the given URL if that image is not available in the cache, and returns a bitmap container that contains all of the data relating to the request (as well as the default image if the requested image is not available). |
static ImageLoader.ImageListener |
getImageListener(ImageView view,
int defaultImageResId,
int errorImageResId)
The default implementation of ImageListener which handles basic functionality of showing a default image until the network response is received, at which point it will switch to either the actual image or the error image. |
void |
setBatchedResponseDelay(int newBatchedResponseDelayMs)
Sets the amount of time to wait after the first response arrives before delivering all responses. |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public ImageLoader(RequestQueue queue, ImageLoader.ImageCache imageCache)
queue
- The RequestQueue to use for making image requests.imageCache
- The cache to use as an L1 cache.メソッドの詳細 |
---|
public static ImageLoader.ImageListener getImageListener(ImageView view, int defaultImageResId, int errorImageResId)
imageView
- The imageView that the listener is associated with.defaultImageResId
- Default image resource ID to use, or 0 if it doesn't exist.errorImageResId
- Error image resource ID to use, or 0 if it doesn't exist.public ImageLoader.ImageContainer get(java.lang.String requestUrl, ImageLoader.ImageListener listener)
ImageLoader
will be invoked when the
request is fulfilled.
requestUrl
- The URL of the image to be loaded.defaultImage
- Optional default image to return until the actual image is loaded.public ImageLoader.ImageContainer get(java.lang.String requestUrl, ImageLoader.ImageListener imageListener, int maxWidth, int maxHeight)
requestUrl
- The url of the remote imageimageListener
- The listener to call when the remote image is loadedmaxWidth
- The maximum width of the returned image.maxHeight
- The maximum height of the returned image.
public void setBatchedResponseDelay(int newBatchedResponseDelayMs)
newBatchedResponseDelayMs
- The time in milliseconds to wait.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |