Baseflow / Baseflow/LottieXamarin

Lottie.Forms.AnimationView.OnFinishedAnimation does not fire all the time.

Open
#355 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
253
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report

`Lottie.Forms.AnimationView.OnFinishedAnimation` doesn't fire all the time.
I have noticed this in the cases where web-view is part of the Page where animation view is present
Also noticed it in the cases where ImageView is part of the pge where the animation view is present.

So irrespective of what we have the event doesn't get fired sometimes.

As a work-around we are setting explcit `Task.Delay` but that should not be the ideal way of handling these.

### Expected behavior

Should trigger `OnFinishedAnimation` every time

### Reproduction steps

- Create a Xamarin forms project and Lottie Xamarin forms NuGet
- Add a `ContentPage` with a `Lottie.Forms.AnimationView` and `Webview`
- Add `OnFinishedAnimation` event handler
- Subscribe for WebView.Navigated event : Once web page loaded run the animation with `AnimationView.PlayAnimation`
- Notice that `OnFinishedAnimaton` does not fire all the time.

### Configuration

**Version:** Com.Airbng.Xamarin.Forms.Lottie 4.0.10

**Platform:**
- [x] :iphone: iOS
- [x] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [x] :monkey: Xamarin.Forms

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with AnimationView.PlayAnimation after WebView.Navigated on a Xamarin.Forms ContentPage containing a WebView or ImageView. Read the AnimationView.OnFinishedAnimation event and its completion path on iOS and Android. Done means the event fires reliably every time the animation completes in the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.