oops, wrong operator

This commit is contained in:
Hocuri
2020-08-18 12:37:57 +02:00
parent 84c492192a
commit e11252ab28
@@ -112,7 +112,7 @@ public class ScaleStableImageView
large = storedSizes.get(landscapeWidth + "x" + landscapeHeight);
if (large == null) return; // no baseline. can't work.
Bitmap original = ((BitmapDrawable) large).getBitmap();
if (height <= original.getHeight() && width <= original.getWidth()) {
if (height <= original.getHeight() || width <= original.getWidth()) {
Bitmap cropped = Bitmap.createBitmap(original, 0, 0, width, height);
Drawable croppedDrawable = new BitmapDrawable(getResources(), cropped);
overrideDrawable(croppedDrawable);