am 20d54457: am ca985b54: Merge "Don\'t display layout bounds of GONE views" into mnc-dev

* commit '20d544571168cad62db4d86c91b3dfde7c13a342':
  Don't display layout bounds of GONE views
This commit is contained in:
Chris Craik
2015-06-30 21:40:51 +00:00
committed by Android Git Automerger

View File

@@ -3236,13 +3236,15 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
for (int i = 0; i < getChildCount(); i++) {
View c = getChildAt(i);
Insets insets = c.getOpticalInsets();
if (c.getVisibility() != View.GONE) {
Insets insets = c.getOpticalInsets();
drawRect(canvas, paint,
c.getLeft() + insets.left,
c.getTop() + insets.top,
c.getRight() - insets.right - 1,
c.getBottom() - insets.bottom - 1);
drawRect(canvas, paint,
c.getLeft() + insets.left,
c.getTop() + insets.top,
c.getRight() - insets.right - 1,
c.getBottom() - insets.bottom - 1);
}
}
}
@@ -3263,8 +3265,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
int lineWidth = dipsToPixels(1);
for (int i = 0; i < getChildCount(); i++) {
View c = getChildAt(i);
drawRectCorners(canvas, c.getLeft(), c.getTop(), c.getRight(), c.getBottom(),
paint, lineLength, lineWidth);
if (c.getVisibility() != View.GONE) {
drawRectCorners(canvas, c.getLeft(), c.getTop(), c.getRight(), c.getBottom(),
paint, lineLength, lineWidth);
}
}
}
}