Hello,
have I padding in the swipe view, that I don't know where is coming from
When you swipe the view, the SwipeItem will have zoomed animation to make the size of SwipeItem bigger. Then you can see the red background.
If you want to remove this result, you can add zoom out animation in the SwipeItemMenuItemHandler for android platform like following code.
Microsoft.Maui.Handlers.SwipeItemMenuItemHandler.Mapper.AppendToMapping("MyCustomization", (handler, view) =>
{
#if ANDROID
AndroidX.AppCompat.Widget.AppCompatButton res=handler.PlatformView as AndroidX.AppCompat.Widget.AppCompatButton;
Android.Animation.ObjectAnimator scaleDownX = Android.Animation.ObjectAnimator.OfFloat(res,
"scaleX", 0.98f);
Android.Animation.ObjectAnimator scaleDownY = Android.Animation.ObjectAnimator.OfFloat(res,
"scaleY", 0.98f);
scaleDownX.SetDuration(100);
scaleDownY.SetDuration(100);
Android.Animation.AnimatorSet scaleDown = new Android.Animation.AnimatorSet();
scaleDown.Play(scaleDownX).With(scaleDownY);
scaleDown.Start();
#endif
});
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.