Request.Method, Request.Priority
Constructor and Description |
---|
ImageRequest(java.lang.String url,
Response.Listener<android.graphics.Bitmap> listener,
int maxWidth,
int maxHeight,
android.graphics.Bitmap.Config decodeConfig,
Response.ErrorListener errorListener)
Creates a new image request, decoding to a maximum specified width and
height.
|
Modifier and Type | Method and Description |
---|---|
protected void |
deliverResponse(android.graphics.Bitmap response)
Subclasses must implement this to perform delivery of the parsed
response to their listeners.
|
Request.Priority |
getPriority()
Returns the
Request.Priority of this request; Request.Priority.NORMAL by default. |
protected Response<android.graphics.Bitmap> |
parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response
and return an appropriate response type.
|
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
public ImageRequest(java.lang.String url, Response.Listener<android.graphics.Bitmap> listener, int maxWidth, int maxHeight, android.graphics.Bitmap.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 errorspublic Request.Priority getPriority()
Request
Request.Priority
of this request; Request.Priority.NORMAL
by default.getPriority
in class Request<android.graphics.Bitmap>
protected Response<android.graphics.Bitmap> parseNetworkResponse(NetworkResponse response)
Request
parseNetworkResponse
in class Request<android.graphics.Bitmap>
response
- Response from the networkprotected void deliverResponse(android.graphics.Bitmap response)
Request
deliverResponse
in class Request<android.graphics.Bitmap>
response
- The parsed response returned by
Request.parseNetworkResponse(NetworkResponse)