|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.android.volley.Request<Bitmap>
com.android.volley.toolbox.ImageRequest
public class ImageRequest
A canned request for getting an image at a given URL and calling back with a decoded Bitmap.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.android.volley.Request |
---|
Request.Method, Request.Priority |
Constructor Summary | |
---|---|
ImageRequest(String url,
Response.Listener<Bitmap> listener,
int maxWidth,
int maxHeight,
Config decodeConfig,
Response.ErrorListener errorListener)
Creates a new image request, decoding to a maximum specified width and height. |
Method Summary | |
---|---|
protected void |
deliverResponse(Bitmap response)
Subclasses must implement this to perform delivery of the parsed response to their listeners. |
(package private) static int |
findBestSampleSize(int actualWidth,
int actualHeight,
int desiredWidth,
int desiredHeight)
Returns the largest power-of-two divisor for use in downscaling a bitmap that will not result in the scaling past the desired dimensions. |
Request.Priority |
getPriority()
Returns the Request.Priority of this request; Request.Priority.NORMAL by default. |
protected Response<Bitmap> |
parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response and return an appropriate response type. |
Methods inherited from class com.android.volley.Request |
---|
addMarker, cancel, compareTo, deliverError, getBody, getBodyContentType, getCacheEntry, getCacheKey, getHeaders, getMethod, getParams, getParamsEncoding, getPostBody, getPostBodyContentType, getPostParams, getPostParamsEncoding, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setTag, shouldCache, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImageRequest(String url, Response.Listener<Bitmap> listener, int maxWidth, int maxHeight, Config decodeConfig, Response.ErrorListener errorListener)
url
- URL of the imagelistener
- Listener to receive the decoded bitmapmaxWidth
- Maximum width to decode this bitmap to, or zero for nonemaxHeight
- Maximum height to decode this bitmap to, or zero for
nonedecodeConfig
- Format to decode the bitmap toerrorListener
- Error listener, or null to ignore errorsMethod Detail |
---|
public Request.Priority getPriority()
Request
Request.Priority
of this request; Request.Priority.NORMAL
by default.
getPriority
in class Request<Bitmap>
protected Response<Bitmap> parseNetworkResponse(NetworkResponse response)
Request
parseNetworkResponse
in class Request<Bitmap>
response
- Response from the network
protected void deliverResponse(Bitmap response)
Request
deliverResponse
in class Request<Bitmap>
response
- The parsed response returned by
Request.parseNetworkResponse(NetworkResponse)
static int findBestSampleSize(int actualWidth, int actualHeight, int desiredWidth, int desiredHeight)
actualWidth
- Actual width of the bitmapactualHeight
- Actual height of the bitmapdesiredWidth
- Desired width of the bitmapdesiredHeight
- Desired height of the bitmap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |