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

Commit 9861973c authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 2b6be701: Fix bug 3312807 - Fix child margin measurement in FrameLayout

* commit '2b6be701':
  Fix bug 3312807 - Fix child margin measurement in FrameLayout
parents 033553c2 2b6be701
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -265,11 +265,13 @@ public class FrameLayout extends ViewGroup {
            final View child = getChildAt(i);
            if (mMeasureAllChildren || child.getVisibility() != GONE) {
                measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);
                maxWidth = Math.max(maxWidth, child.getMeasuredWidth());
                maxHeight = Math.max(maxHeight, child.getMeasuredHeight());
                final LayoutParams lp = (LayoutParams) child.getLayoutParams();
                maxWidth = Math.max(maxWidth,
                        child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
                maxHeight = Math.max(maxHeight,
                        child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
                childState = combineMeasuredStates(childState, child.getMeasuredState());
                if (measureMatchParentChildren) {
                    final ViewGroup.LayoutParams lp = child.getLayoutParams();
                    if (lp.width == LayoutParams.MATCH_PARENT ||
                            lp.height == LayoutParams.MATCH_PARENT) {
                        mMatchParentChildren.add(child);