Skip to content

Commit

Permalink
Layout remaining views.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3z committed Dec 14, 2020
1 parent 4d1588b commit a6c90f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flowlayout/src/main/java/com/nex3z/flowlayout/FlowLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
horizontalGravity, layoutWidth, horizontalPadding, row + 1);
y += rowHeight + mAdjustedRowSpacing;
}

for (int i = childIdx; i < getChildCount(); i++) {
View child = getChildAt(i);
if (child.getVisibility() == GONE) {
continue;
}
child.layout(0, 0, 0, 0);
}
}

private int getHorizontalGravityOffsetForRow(int horizontalGravity, int parentWidth, int horizontalPadding, int row) {
Expand Down

0 comments on commit a6c90f9

Please sign in to comment.