Skip to content

Commit

Permalink
Measure SwipeItem content before layout; (#10467)
Browse files Browse the repository at this point in the history
Fixes #6018
  • Loading branch information
hartez authored Oct 3, 2022
1 parent 4c9ddf2 commit f846f4d
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 f846f4d

Please sign in to comment.