diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:44:00 -0800 |
| commit | d24b8183b93e781080b2c16c487e60d51c12da31 (patch) | |
| tree | fbb89154858984eb8e41556da7e9433040d55cd4 /core/java/android/widget/LinearLayout.java | |
| parent | f1e484acb594a726fb57ad0ae4cfe902c7f35858 (diff) | |
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'core/java/android/widget/LinearLayout.java')
| -rw-r--r-- | core/java/android/widget/LinearLayout.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index 36ed8bd401d1..85a733916731 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -336,7 +336,7 @@ public class LinearLayout extends ViewGroup { // heightMode is either UNSPECIFIED OR AT_MOST, and this child // wanted to stretch to fill available space. Translate that to // WRAP_CONTENT so that it does not end up with a height of 0 - oldHeight = lp.height; + oldHeight = 0; lp.height = LayoutParams.WRAP_CONTENT; } @@ -475,8 +475,6 @@ public class LinearLayout extends ViewGroup { matchWidthLocally ? margin : measuredWidth); allFillParent = allFillParent && lp.width == LayoutParams.FILL_PARENT; - alternativeMaxWidth = Math.max(alternativeMaxWidth, - matchWidthLocally ? margin : measuredWidth); mTotalLength += child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin + getNextLocationOffset(child); @@ -607,7 +605,7 @@ public class LinearLayout extends ViewGroup { // widthMode is either UNSPECIFIED OR AT_MOST, and this child // wanted to stretch to fill available space. Translate that to // WRAP_CONTENT so that it does not end up with a width of 0 - oldWidth = lp.width; + oldWidth = 0; lp.width = LayoutParams.WRAP_CONTENT; } @@ -766,8 +764,6 @@ public class LinearLayout extends ViewGroup { matchHeightLocally ? margin : childHeight); allFillParent = allFillParent && lp.height == LayoutParams.FILL_PARENT; - alternativeMaxHeight = Math.max(alternativeMaxHeight, - matchHeightLocally ? margin : childHeight); if (baselineAligned) { final int childBaseline = child.getBaseline(); @@ -803,8 +799,7 @@ public class LinearLayout extends ViewGroup { maxHeight = Math.max(maxHeight, ascent + descent); } } else { - alternativeMaxHeight = Math.max(alternativeMaxHeight, - weightedMaxHeight); + alternativeMaxHeight = Math.max(alternativeMaxHeight, weightedMaxHeight); } if (!allFillParent && heightMode != MeasureSpec.EXACTLY) { |
