Baseflow / LottieXamarin

Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
https://baseflow.com
Apache License 2.0
1.22k stars 261 forks source link

Fixing Android repeat mode - fixes issue #288 #293

Closed martinapapaliska closed 3 years ago

martinapapaliska commented 3 years ago

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fix - it fixes the mapping of the Lottie Forms RepeatMode to the values used by the native Android Library found here

:arrow_heading_down: What is the current behavior?

RepeatMode.Infinite does not work and instead maps to ValueAnimatorRepeatMode.Reverse

:new: What is the new behavior (if this is a feature change)?

This PR introduces a ConfigureRepeat extension method which configures the repeat settings based on RepeatMode and RepeatCount

:boom: Does this PR introduce a breaking change?

No

:bug: Recommendations for testing

Test that Android RepeatMode and RepeatCount properties work as intended

:memo: Links to relevant issues/docs

Fixes this issue

:thinking: Checklist before submitting

martijn00 commented 3 years ago

@martinapapaliska thanks! I've done one more change on top of this: https://github.com/Baseflow/LottieXamarin/commit/9ed6f831e6519ed83881a394da0af683ef0faf0d

Can you confirm this is correct?

martinapapaliska commented 3 years ago

@martijn00 Yes sure, that's better!