Skip to content

Commit bde7cfb

Browse files
committed
bugfix: #614
1 parent 366b461 commit bde7cfb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ private int layoutFlexLineMainAxisVertical(FlexLine flexLine, LayoutState layout
16621662
}
16631663

16641664
childTop += (lp.topMargin + getTopDecorationHeight(view));
1665-
childBottom -= (lp.rightMargin + getBottomDecorationHeight(view));
1665+
childBottom -= (lp.bottomMargin + getBottomDecorationHeight(view));
16661666

16671667
if (layoutState.mLayoutDirection == LayoutState.LAYOUT_END) {
16681668
calculateItemDecorationsForChild(view, TEMP_RECT);
@@ -1699,9 +1699,9 @@ private int layoutFlexLineMainAxisVertical(FlexLine flexLine, LayoutState layout
16991699
Math.round(childTop) + view.getMeasuredHeight());
17001700
}
17011701
}
1702-
childTop += (view.getMeasuredHeight() + lp.topMargin + getBottomDecorationHeight(view)
1702+
childTop += (view.getMeasuredHeight() + lp.bottomMargin + getBottomDecorationHeight(view)
17031703
+ spaceBetweenItem);
1704-
childBottom -= (view.getMeasuredHeight() + lp.bottomMargin +
1704+
childBottom -= (view.getMeasuredHeight() + lp.topMargin +
17051705
getTopDecorationHeight(view) + spaceBetweenItem);
17061706
}
17071707
layoutState.mFlexLinePosition += mLayoutState.mLayoutDirection;

0 commit comments

Comments
 (0)