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

Commit d5694f02 authored by Alan Viverette's avatar Alan Viverette
Browse files

Fix RelativeLayout measurement

BUG: 12993953
Change-Id: Idf82734eb9a06ea7610e8eb42705da9f4a4639e9
parent c65d26ee
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;