.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.

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Rob Caplan - MSFT 6,032 Reputation points Microsoft Employee Moderator
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.