diff options
author | Ficus Kirkpatrick <ficus@android.com> | 2015-02-17 09:00:59 -0800 |
---|---|---|
committer | Ficus Kirkpatrick <ficus@android.com> | 2015-02-17 09:00:59 -0800 |
commit | cf498d16c616989edb5e2791da801bd29f548628 (patch) | |
tree | 922f318193f8818bb313fed2d3d88281975fde5c /src/main/java/com/android/volley | |
parent | f4c5d9578e248a8871f278880a38f8d71a68280c (diff) | |
download | volley-cf498d16c616989edb5e2791da801bd29f548628.tar.gz |
Add a backwards-compatible ImageRequest constructor.
Restores the API surface to before ScaleType was required.
Diffstat (limited to 'src/main/java/com/android/volley')
-rw-r--r-- | src/main/java/com/android/volley/toolbox/ImageRequest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/android/volley/toolbox/ImageRequest.java b/src/main/java/com/android/volley/toolbox/ImageRequest.java index 8a09ea1..27c1fe2 100644 --- a/src/main/java/com/android/volley/toolbox/ImageRequest.java +++ b/src/main/java/com/android/volley/toolbox/ImageRequest.java @@ -81,6 +81,16 @@ public class ImageRequest extends Request<Bitmap> { mScaleType = scaleType; } + /** + * For API compatibility with the pre-ScaleType variant of the constructor. Equivalent to + * the normal constructor with {@code ScaleType.CENTER_INSIDE}. + */ + @Deprecated + public ImageRequest(String url, Response.Listener<Bitmap> listener, int maxWidth, int maxHeight, + Config decodeConfig, Response.ErrorListener errorListener) { + this(url, listener, maxWidth, maxHeight, + ScaleType.CENTER_INSIDE, decodeConfig, errorListener); + } @Override public Priority getPriority() { return Priority.LOW; |