diff options
| author | Alan Viverette <alanv@google.com> | 2016-06-30 17:36:40 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2016-06-30 17:36:40 +0000 |
| commit | 6259ae459298ed0d0684c691b901145b96e674c1 (patch) | |
| tree | 86150d1deea0ed8d1370bb0a815d2f6e05cfd422 /core/java/android/widget/LinearLayout.java | |
| parent | 4c1cba64f10b2d138b4b96b84198bff2c1ad466d (diff) | |
| parent | 0c359bad531eb50d70b45600d5deb7cf736f772a (diff) | |
Merge \\\"Exclude children from excess space distribution when using largest child\\\" into nyc-dev am: 7705d5fd6e am: 650cc68f10
am: 0c359bad53
Change-Id: I116d4bd532751159c59f8178dead7503e562af85
Diffstat (limited to 'core/java/android/widget/LinearLayout.java')
| -rw-r--r-- | core/java/android/widget/LinearLayout.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index 3ced25359397..33d335a1a9aa 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -914,7 +914,9 @@ public class LinearLayout extends ViewGroup { remainingWeightSum -= childWeight; final int childHeight; - if (lp.height == 0 && (!mAllowInconsistentMeasurement + if (mUseLargestChild && heightMode != MeasureSpec.EXACTLY) { + childHeight = largestChildHeight; + } else if (lp.height == 0 && (!mAllowInconsistentMeasurement || heightMode == MeasureSpec.EXACTLY)) { // This child needs to be laid out from scratch using // only its share of excess space. @@ -1299,7 +1301,9 @@ public class LinearLayout extends ViewGroup { remainingWeightSum -= childWeight; final int childWidth; - if (lp.width == 0 && (!mAllowInconsistentMeasurement + if (mUseLargestChild && widthMode != MeasureSpec.EXACTLY) { + childWidth = largestChildWidth; + } else if (lp.width == 0 && (!mAllowInconsistentMeasurement || widthMode == MeasureSpec.EXACTLY)) { // This child needs to be laid out from scratch using // only its share of excess space. |
