* commit '20d544571168cad62db4d86c91b3dfde7c13a342': Don't display layout bounds of GONE views
This commit is contained in:
@@ -3236,13 +3236,15 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
|||||||
|
|
||||||
for (int i = 0; i < getChildCount(); i++) {
|
for (int i = 0; i < getChildCount(); i++) {
|
||||||
View c = getChildAt(i);
|
View c = getChildAt(i);
|
||||||
Insets insets = c.getOpticalInsets();
|
if (c.getVisibility() != View.GONE) {
|
||||||
|
Insets insets = c.getOpticalInsets();
|
||||||
|
|
||||||
drawRect(canvas, paint,
|
drawRect(canvas, paint,
|
||||||
c.getLeft() + insets.left,
|
c.getLeft() + insets.left,
|
||||||
c.getTop() + insets.top,
|
c.getTop() + insets.top,
|
||||||
c.getRight() - insets.right - 1,
|
c.getRight() - insets.right - 1,
|
||||||
c.getBottom() - insets.bottom - 1);
|
c.getBottom() - insets.bottom - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3263,8 +3265,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
|||||||
int lineWidth = dipsToPixels(1);
|
int lineWidth = dipsToPixels(1);
|
||||||
for (int i = 0; i < getChildCount(); i++) {
|
for (int i = 0; i < getChildCount(); i++) {
|
||||||
View c = getChildAt(i);
|
View c = getChildAt(i);
|
||||||
drawRectCorners(canvas, c.getLeft(), c.getTop(), c.getRight(), c.getBottom(),
|
if (c.getVisibility() != View.GONE) {
|
||||||
paint, lineLength, lineWidth);
|
drawRectCorners(canvas, c.getLeft(), c.getTop(), c.getRight(), c.getBottom(),
|
||||||
|
paint, lineLength, lineWidth);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user