diff --git a/flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java b/flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java index 21ea7338..febd9c2d 100644 --- a/flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java +++ b/flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java @@ -749,7 +749,7 @@ public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State int filledToEnd = fill(recycler, state, mLayoutState); if (mAnchorInfo.mLayoutFromEnd) { if (DEBUG) { - Log.d(TAG, String.format("filled: %d toward start", filledToEnd)); +// Log.d(TAG, String.format("filled: %d toward start", filledToEnd)); } startOffset = mLayoutState.mOffset; updateLayoutStateToFillEnd(mAnchorInfo, true, false); @@ -1662,7 +1662,7 @@ private int layoutFlexLineMainAxisVertical(FlexLine flexLine, LayoutState layout } childTop += (lp.topMargin + getTopDecorationHeight(view)); - childBottom -= (lp.rightMargin + getBottomDecorationHeight(view)); + childBottom -= (lp.bottomMargin + getBottomDecorationHeight(view)); if (layoutState.mLayoutDirection == LayoutState.LAYOUT_END) { calculateItemDecorationsForChild(view, TEMP_RECT); @@ -1699,9 +1699,9 @@ private int layoutFlexLineMainAxisVertical(FlexLine flexLine, LayoutState layout Math.round(childTop) + view.getMeasuredHeight()); } } - childTop += (view.getMeasuredHeight() + lp.topMargin + getBottomDecorationHeight(view) + childTop += (view.getMeasuredHeight() + lp.bottomMargin + getBottomDecorationHeight(view) + spaceBetweenItem); - childBottom -= (view.getMeasuredHeight() + lp.bottomMargin + + childBottom -= (view.getMeasuredHeight() + lp.topMargin + getTopDecorationHeight(view) + spaceBetweenItem); } layoutState.mFlexLinePosition += mLayoutState.mLayoutDirection;