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 3d931cee..ed25e103 100644 --- a/flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java +++ b/flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java @@ -369,6 +369,8 @@ public List getFlexLines() { @Override public int getDecorationLengthMainAxis(View view, int index, int indexInFlexLine) { if (isMainAxisDirectionHorizontal()) { + view = mRecycler.getViewForPosition(index); + calculateItemDecorationsForChild(view, TEMP_RECT); return getLeftDecorationWidth(view) + getRightDecorationWidth(view); } else { return getTopDecorationHeight(view) + getBottomDecorationHeight(view);