diff options
author | Adam Powell <adamp@google.com> | 2012-09-26 15:21:39 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2012-09-26 15:21:39 -0700 |
commit | b1271ac183c36d0e9e3a524bec8908ed5aab9a45 (patch) | |
tree | 239a1cac72d56c36e1a843bb65dcf88755956834 /core | |
parent | 4368ba45adebf17d7962ad551363ac302cb2b1c7 (diff) | |
download | frameworks_base-b1271ac183c36d0e9e3a524bec8908ed5aab9a45.zip frameworks_base-b1271ac183c36d0e9e3a524bec8908ed5aab9a45.tar.gz frameworks_base-b1271ac183c36d0e9e3a524bec8908ed5aab9a45.tar.bz2 |
Fix adjustViewBounds handling for ImageView
When computing the adjusted view bounds, don't constrain the
dimensions by the original estimate. This can result in the view never
getting properly enlarged.
Bug 7240251
Change-Id: I44fc017f8b661121f0042fcd59a4efde70be6bbe
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/widget/ImageView.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index 87396fb..7ca8322 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -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; } |