summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-02-16 22:53:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-02-16 22:53:42 +0000
commit243239504acb4a78c7cf1a47a08b5898a371ba1b (patch)
tree2f2877ae99faa9a64ea5d483b452bd5a92c8b2bf
parent1d96275756cdc68788198e2026182adfc886b332 (diff)
parent9049fd996a32ca5331b1eb9a9c009db8810a5fc2 (diff)
Merge "Always remeasure weighted children, even if there's no excess space"
-rw-r--r--core/java/android/widget/LinearLayout.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index 7ea1f1edadf5..d32e93c7a862 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -917,7 +917,7 @@ public class LinearLayout extends ViewGroup {
// measurement on any children, we need to measure them now.
int remainingExcess = heightSize - mTotalLength
+ (mAllowInconsistentMeasurement ? 0 : consumedExcessSpace);
- if (skippedMeasure || remainingExcess != 0 && totalWeight > 0.0f) {
+ if (skippedMeasure || totalWeight > 0.0f) {
float remainingWeightSum = mWeightSum > 0.0f ? mWeightSum : totalWeight;
mTotalLength = 0;
@@ -1300,7 +1300,7 @@ public class LinearLayout extends ViewGroup {
// measurement on any children, we need to measure them now.
int remainingExcess = widthSize - mTotalLength
+ (mAllowInconsistentMeasurement ? 0 : usedExcessSpace);
- if (skippedMeasure || remainingExcess != 0 && totalWeight > 0.0f) {
+ if (skippedMeasure || totalWeight > 0.0f) {
float remainingWeightSum = mWeightSum > 0.0f ? mWeightSum : totalWeight;
maxAscent[0] = maxAscent[1] = maxAscent[2] = maxAscent[3] = -1;