Request.Method, Request.Priority| Modifier and Type | Field and Description |
|---|---|
static float |
DEFAULT_IMAGE_BACKOFF_MULT
Default backoff multiplier for image requests
|
static int |
DEFAULT_IMAGE_MAX_RETRIES
Default number of retries for image requests
|
static int |
DEFAULT_IMAGE_TIMEOUT_MS
Socket timeout in milliseconds for image requests
|
| 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)
Deprecated.
|
ImageRequest(java.lang.String url,
Response.Listener<android.graphics.Bitmap> listener,
int maxWidth,
int maxHeight,
android.widget.ImageView.ScaleType scaleType,
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, getErrorListener, getHeaders, getMethod, getParams, getParamsEncoding, getPostBody, getPostBodyContentType, getPostParams, getPostParamsEncoding, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, isCanceled, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setShouldRetryServerErrors, setTag, shouldCache, shouldRetryServerErrors, toStringpublic static final int DEFAULT_IMAGE_TIMEOUT_MS
public static final int DEFAULT_IMAGE_MAX_RETRIES
public static final float DEFAULT_IMAGE_BACKOFF_MULT
public ImageRequest(java.lang.String url,
Response.Listener<android.graphics.Bitmap> listener,
int maxWidth,
int maxHeight,
android.widget.ImageView.ScaleType scaleType,
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
nonescaleType - The ImageViews ScaleType used to calculate the needed image size.decodeConfig - Format to decode the bitmap toerrorListener - Error listener, or null to ignore errors@Deprecated
public ImageRequest(java.lang.String url,
Response.Listener<android.graphics.Bitmap> listener,
int maxWidth,
int maxHeight,
android.graphics.Bitmap.Config decodeConfig,
Response.ErrorListener errorListener)
ScaleType.CENTER_INSIDE.public Request.Priority getPriority()
RequestRequest.Priority of this request; Request.Priority.NORMAL by default.getPriority in class Request<android.graphics.Bitmap>protected Response<android.graphics.Bitmap> parseNetworkResponse(NetworkResponse response)
RequestparseNetworkResponse in class Request<android.graphics.Bitmap>response - Response from the networkprotected void deliverResponse(android.graphics.Bitmap response)
RequestdeliverResponse in class Request<android.graphics.Bitmap>response - The parsed response returned by
Request.parseNetworkResponse(NetworkResponse)