.NET MAUI Animation doesn't work on Android platform

zc 51 Reputation points
2022-06-24T08:28:27.037+00:00

Animation doesn't work on Android platform on .NET MAUI.

Code:

<Image Source="spin.gif" IsAnimationPlaying="true" BackgroundColor="Black" ></Image>  

I don't have ideas why it doesn't work. For example, on Windows platform I don't have problem with that.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,056 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rob Caplan - MSFT 5,427 Reputation points Microsoft Employee
    2022-06-28T20:08:53.453+00:00

    Animated GIFs should (mostly) work on Android. Most of the problems mentioned in Animated gifs are not working properly #7021 are either for other platforms or already fixed in current versions.

    The remaining Android problem is Animated gifs do not start initially #7019, and that affects only the initial startup. Until that is fixed you can work around the problem by setting IsAnimationPlaying from code instead of from markup: set IsAnimationPlaying to false in XAML then true in (for example) your ContentPage.Loaded event.