This commit is contained in:
lixiaopeng
2020-09-29 16:21:18 +08:00
parent 6b971d1ce2
commit 54327be8c5

View File

@@ -26,9 +26,9 @@ public class SurroundingMarginDecoration extends RecyclerView.ItemDecoration {
//由于每行都只有2个所以第一个都是2的倍数
if (parent.getChildLayoutPosition(view) % 2 == 0) {
outRect.left = marginLeft;
outRect.right = 0;
outRect.right = margin / 2;
} else {
outRect.left = margin;
outRect.left = margin / 2;
outRect.right = marginLeft;
}
}