Skip to content

Commit

Permalink
Correctly set the SwipeItemView size
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz committed Aug 19, 2022
1 parent 094c267 commit fd18215
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Core/src/Platform/Android/MauiSwipeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ void UpdateSwipeItems()
}

AddView(_actionView);

if (_contentView != null)
{
_contentView.BringToFront();
Expand Down Expand Up @@ -659,6 +660,10 @@ List<AView> GetNativeSwipeItems()

void UpdateSwipeItemViewLayout(ISwipeItemView swipeItemView)
{
var swipeItemSize = GetSwipeItemSize(swipeItemView);
var frame = new Rect(0, 0, swipeItemSize.Width, swipeItemSize.Height);
swipeItemView.Arrange(frame);

swipeItemView?.Handler?.ToPlatform().InvalidateMeasure(swipeItemView);
}

Expand Down

0 comments on commit fd18215

Please sign in to comment.