Loading core/java/android/widget/ImageView.java +2 −0 Original line number Diff line number Diff line Loading @@ -789,6 +789,7 @@ public class ImageView extends View { if (resizeWidth) { int newWidth = (int)(desiredAspect * (heightSize - ptop - pbottom)) + pleft + pright; widthSize = resolveAdjustedSize(newWidth, mMaxWidth, widthMeasureSpec); if (newWidth <= widthSize) { widthSize = newWidth; done = true; Loading @@ -799,6 +800,7 @@ public class ImageView extends View { if (!done && resizeHeight) { int newHeight = (int)((widthSize - pleft - pright) / desiredAspect) + ptop + pbottom; heightSize = resolveAdjustedSize(newHeight, mMaxHeight, heightMeasureSpec); if (newHeight <= heightSize) { heightSize = newHeight; } Loading Loading
core/java/android/widget/ImageView.java +2 −0 Original line number Diff line number Diff line Loading @@ -789,6 +789,7 @@ public class ImageView extends View { if (resizeWidth) { int newWidth = (int)(desiredAspect * (heightSize - ptop - pbottom)) + pleft + pright; widthSize = resolveAdjustedSize(newWidth, mMaxWidth, widthMeasureSpec); if (newWidth <= widthSize) { widthSize = newWidth; done = true; Loading @@ -799,6 +800,7 @@ public class ImageView extends View { if (!done && resizeHeight) { int newHeight = (int)((widthSize - pleft - pright) / desiredAspect) + ptop + pbottom; heightSize = resolveAdjustedSize(newHeight, mMaxHeight, heightMeasureSpec); if (newHeight <= heightSize) { heightSize = newHeight; } Loading