Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9049fd99 authored by Alan Viverette's avatar Alan Viverette
Browse files

Always remeasure weighted children, even if there's no excess space

Bug: 72630654
Test: atest LinearLayoutTest
Change-Id: Ie9637950aef32f080b8284a63003eb61c0a88841
parent 85a6db68
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;