dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22k stars 1.72k forks source link

SwipeView does not animate correctly if there is no BackgroundColor in the #20939

Open rutgersc opened 6 months ago

rutgersc commented 6 months ago

Description

The SwipeView does not seem to animate correctly when the SwipeView.Contents (or some child item) does not have any BackgroundColor set. Seeing this on Both Android and iOS

swipeview-bug

Steps to Reproduce

  1. Create a SwipeView without a BackgroundColor
  2. Run the app, Swipe the view and notice the items pop into existence instead of animating

Here is a branch that shows the bug: https://github.com/dotnet/maui/commit/b2bb2df4a670137bd1c88581bdf01e51628c9ea1 go to Controls -> SwipeView -> Basic SwipeView Gallery

Link to public reproduction project repository

https://github.com/dotnet/maui/commit/b2bb2df4a670137bd1c88581bdf01e51628c9ea1

Version with bug

8.0.6 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

iOS 17.2, Android API 33, 34

Did you find any workaround?

Add a BackgroundColor to the item inside <SwipeView.Content>

Relevant log output

No response

RoiChen001 commented 6 months ago

Can repro this issue at Android platform on the latest 17.10 preview2. MauiApp16.zip

danielancines commented 3 months ago

Same problem here with .net 8 8.0.301. Working well in 7.0.408.