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

Commit a1dab8bb authored by Chris Craik's avatar Chris Craik
Browse files

Don't display layout bounds of GONE views

bug:22126532

Change-Id: Ib7816346e0f6ff54fcf7b180bf4042ce113728b9
parent 82b3f677
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -3236,6 +3236,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager

            for (int i = 0; i < getChildCount(); i++) {
                View c = getChildAt(i);
                if (c.getVisibility() != View.GONE) {
                    Insets insets = c.getOpticalInsets();

                    drawRect(canvas, paint,
@@ -3245,6 +3246,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                            c.getBottom() - insets.bottom - 1);
                }
            }
        }

        // Draw margins
        {
@@ -3263,11 +3265,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            int lineWidth = dipsToPixels(1);
            for (int i = 0; i < getChildCount(); i++) {
                View c = getChildAt(i);
                if (c.getVisibility() != View.GONE) {
                    drawRectCorners(canvas, c.getLeft(), c.getTop(), c.getRight(), c.getBottom(),
                            paint, lineLength, lineWidth);
                }
            }
        }
    }

    /**
     * {@inheritDoc}