Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf184875 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix adjustViewBounds handling for ImageView" into jb-mr1-dev

parents 51ce1607 b1271ac1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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;
                        }