diff options
author | Romain Guy <romainguy@google.com> | 2011-01-07 13:27:39 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-01-07 13:27:39 -0800 |
commit | a174d7a0d5475dbae2b48f7359abf1637a882896 (patch) | |
tree | 6b7b2d97a776207e8e51a32b06d32a5f8cc71c9d /core/java/android/widget/FrameLayout.java | |
parent | cf70dcb0f76d1175f1d3c31da1c827eb443a323a (diff) | |
download | frameworks_base-a174d7a0d5475dbae2b48f7359abf1637a882896.zip frameworks_base-a174d7a0d5475dbae2b48f7359abf1637a882896.tar.gz frameworks_base-a174d7a0d5475dbae2b48f7359abf1637a882896.tar.bz2 |
Don't match wrap_content/match_parent children with child count = 1.
Bug #3328711
Change-Id: Ic131f2feecbeec4a7250d47193c9794aa70d22ee
Diffstat (limited to 'core/java/android/widget/FrameLayout.java')
-rw-r--r-- | core/java/android/widget/FrameLayout.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java index 2bc6301..8c7205e 100644 --- a/core/java/android/widget/FrameLayout.java +++ b/core/java/android/widget/FrameLayout.java @@ -297,15 +297,15 @@ public class FrameLayout extends ViewGroup { resolveSizeAndState(maxHeight, heightMeasureSpec, childState << MEASURED_HEIGHT_STATE_SHIFT)); - if (mMatchParentChildren.size() > 0) { - count = mMatchParentChildren.size(); + count = mMatchParentChildren.size(); + if (count > 1) { for (int i = 0; i < count; i++) { final View child = mMatchParentChildren.get(i); final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); int childWidthMeasureSpec; int childHeightMeasureSpec; - + if (lp.width == LayoutParams.MATCH_PARENT) { childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth() - mPaddingLeft - mPaddingRight - lp.leftMargin - lp.rightMargin, |