Skip to content

Commit a6c90f9

Browse files
committed
Layout remaining views.
1 parent 4d1588b commit a6c90f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

flowlayout/src/main/java/com/nex3z/flowlayout/FlowLayout.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,14 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
313313
horizontalGravity, layoutWidth, horizontalPadding, row + 1);
314314
y += rowHeight + mAdjustedRowSpacing;
315315
}
316+
317+
for (int i = childIdx; i < getChildCount(); i++) {
318+
View child = getChildAt(i);
319+
if (child.getVisibility() == GONE) {
320+
continue;
321+
}
322+
child.layout(0, 0, 0, 0);
323+
}
316324
}
317325

318326
private int getHorizontalGravityOffsetForRow(int horizontalGravity, int parentWidth, int horizontalPadding, int row) {

0 commit comments

Comments
 (0)