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

Commit eabc9198 authored by Adam Powell's avatar Adam Powell
Browse files

Fix LinearLayout measureWithLargestChild for wrap_content views

Bug 6442795

When the measureWithLargestChild setting is enabled, LL used to
measure the full container taking the largest child rule into account,
but the child views were not properly remeasured for AT_MOST
measurespecs. Correct this.

Fix measureWithLargestChild for height

Change-Id: Ieb91114bc2ae65f9104337bd6d16a7d9e559571d
parent e825b3e3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -867,7 +867,7 @@ public class LinearLayout extends ViewGroup {

            // We have no limit, so make all weighted views as tall as the largest child.
            // Children will have already been measured once.
            if (useLargestChild && widthMode == MeasureSpec.UNSPECIFIED) {
            if (useLargestChild && heightMode != MeasureSpec.EXACTLY) {
                for (int i = 0; i < count; i++) {
                    final View child = getVirtualChildAt(i);

@@ -1283,7 +1283,7 @@ public class LinearLayout extends ViewGroup {

            // We have no limit, so make all weighted views as wide as the largest child.
            // Children will have already been measured once.
            if (useLargestChild && widthMode == MeasureSpec.UNSPECIFIED) {
            if (useLargestChild && widthMode != MeasureSpec.EXACTLY) {
                for (int i = 0; i < count; i++) {
                    final View child = getVirtualChildAt(i);