From cf498d16c616989edb5e2791da801bd29f548628 Mon Sep 17 00:00:00 2001 From: Ficus Kirkpatrick Date: Tue, 17 Feb 2015 09:00:59 -0800 Subject: Add a backwards-compatible ImageRequest constructor. Restores the API surface to before ScaleType was required. --- src/main/java/com/android/volley/toolbox/ImageRequest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/com') 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 { 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 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; -- cgit v1.2.3