Skip to content

Commit

Permalink
Measure SwipeItem content before layout;
Browse files Browse the repository at this point in the history
Fixes #6018
  • Loading branch information
hartez committed Oct 3, 2022
1 parent 0dc7faf commit 2e014f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Core/src/Platform/Android/MauiSwipeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,12 @@ void LayoutSwipeItems(List<AView> childs)
b = contentHeight;
break;
}

child.Measure(
MeasureSpec.MakeMeasureSpec(swipeItemWidth, MeasureSpecMode.AtMost),
MeasureSpec.MakeMeasureSpec(swipeItemHeight, MeasureSpecMode.AtMost)
);

child.Layout(l, t, r, b);

i++;
Expand Down

0 comments on commit 2e014f4

Please sign in to comment.