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

Commit 5aa944d9 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Fix RelativeLayout measurement"

parents 3024f102 d5694f02
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -748,14 +748,14 @@ public class RelativeLayout extends ViewGroup {
        // measurement is code for, "we got an unspecified mode in the
        // RelativeLayout's measure spec."
        if (mySize < 0 && !mAllowBrokenMeasureSpecs) {
            if (childSize >= 0) {
                // The child specified an exact size.
                childSpecSize = childSize;
                childSpecMode = MeasureSpec.EXACTLY;
            } else if (childStart >= 0 && childEnd >= 0) {
            if (childStart >= 0 && childEnd >= 0) {
                // Constraints fixed both edges, so child has an exact size.
                childSpecSize = Math.max(0, childEnd - childStart);
                childSpecMode = MeasureSpec.EXACTLY;
            } else if (childSize >= 0) {
                // The child specified an exact size.
                childSpecSize = childSize;
                childSpecMode = MeasureSpec.EXACTLY;
            } else {
                // Allow the child to be whatever size it wants.
                childSpecSize = 0;