Skip to content

Commit 74d81b2

Browse files
removed the android fix
1 parent 0c4c8c3 commit 74d81b2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/Controls/src/Core/Handlers/Items/Android/MauiRecyclerView.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,11 @@ protected virtual void UpdateItemSpacing()
471471

472472
if (_itemDecoration is SpacingItemDecoration spacingDecoration)
473473
{
474-
var horizontalPadding = ItemsLayout is GridItemsLayout ? 0 : -spacingDecoration.HorizontalOffset;
475-
var verticalPadding = ItemsLayout is GridItemsLayout ? 0 : -spacingDecoration.VerticalOffset;
474+
// SpacingItemDecoration applies spacing to all items & all 4 sides of the items.
475+
// We need to adjust the padding on the RecyclerView so this spacing isn't visible around the outer edge of our control.
476+
// Horizontal & vertical spacing should only exist between items.
477+
var horizontalPadding = -spacingDecoration.HorizontalOffset;
478+
var verticalPadding = -spacingDecoration.VerticalOffset;
476479
SetPadding(horizontalPadding, verticalPadding, horizontalPadding, verticalPadding);
477480
}
478481
}

0 commit comments

Comments
 (0)