Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[F100] Basic GIF animation support #1704

@PureWeen

Description

@PureWeen

Rationale

Animated Gifs are popular. Providing the image view with features that allowed it to animate gifs would allow users to not have to use webviews or create other custom renderers

Implementation

Add an AnimationPlayBehaviorProperty for the Image control which indicates that a gif should start playing once it has loaded or if it should be started through other mechanisms.

Add two methods for starting and stopping the animation

public enum ImagePlayBehavior
{
   None,
   OnLoad
}

public static readonly BindableProperty AnimationPlayBehaviorProperty = BindableProperty.Create(nameof(AnimationPlayBehavior), typeof(ImagePlayBehavior), typeof(Image), ImagePlayBehavior.None);

public void StartAnimation();
public void StopAnimation();

Expected Result

Android

If user has specified they want the animation to play onload or they call StartAnimation then start playing the gif animation

iOS

See Android

UWP

See Android

Implications for CSS

Backward Compatibility

Ensure the way the current Image control processes gifs does not change unless the user opts in for the given properties

Difficulty : Medium

Work that's been done
https://forums.xamarin.com/discussion/17448/animated-gif-in-image-view
https://github.com/jamesmontemagno/PuppyKittyOverflow/blob/master/PuppyKittyOverflow.Touch/AnimatedImageView.cs
https://github.com/jamesmontemagno/GifImageView-Xamarin.Android
https://github.com/luberda-molinet/FFImageLoading/pull/470/files

Metadata

Metadata

Assignees

Labels

F100blockerIssue blocks next stable release. Prioritize fixing and reviewing this issue.community-sprintin-progressThis issue has an associated pull request that may resolve it!roadmapt/enhancement ➕

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions