Skip to content

Releases: TizenAPI/ElottieSharp

v0.9.7

03 Dec 05:41
78bde28

Choose a tag to compare

v0.9.7 Pre-release
Pre-release

ElottieSharp

Nuget package here.

ElottieSharp.Forms

Nuget package here.

Important Notice 📢

ElottieSharp

  • LottieAnimationView.Size property has been obsolete. Please use EvasObject.Resize() instead.

Bug fixes

  • Use resize callback to determine the canvas size (#19)
  • Fix image size correctly (#18)

v0.9.6

28 Jul 03:14
3708007

Choose a tag to compare

v0.9.6 Pre-release
Pre-release

ElottieSharp

Nuget package here.

ElottieSharp.Forms

Nuget package here.

Important Notice 📢

  • Update the version of referenced Xamarin.Forms version to 4.6.0.967

Bug fixes

  • Fix animation file issue on binding (#16)

v0.9.5

14 Oct 12:04

Choose a tag to compare

v0.9.5 Pre-release
Pre-release

ElottieSharp

Nuget package here.

ElottieSharp.Forms

Nuget package here.

Bug fixes

  • Fix garbage collected delegate issue (#11)

v0.9.4

20 Sep 06:59

Choose a tag to compare

v0.9.4 Pre-release
Pre-release

ElottieSharp

Nuget package here.

ElottieSharp.Forms

Nuget package here.

Important Notice

v0.9.3

18 Sep 08:36
fb92243

Choose a tag to compare

v0.9.3 Pre-release
Pre-release

ElottieSharp

Nuget package here.

Important Notice

Nothing to changed

ElottieSharp.Forms

Nuget package here.

Important Notice

This version (0.9.3-preview) only works on Galaxy Watch Active ,Galaxy Watch and Gear S-series that support Tizen 4.0.0.3 or higher.)

  • ElottieSharp.Forms is now available only for Tizen.

Developer's Guide

ELottieAnimationView

ElottieAnimationView is a View (Xamarin.Forms) subclass that displays animation content.

Creating Animation Views

  • C#
var animation = new ELottieAnimationView
{
    AutoPlay = true,
    AutoRepeat = false,
    Speed = 1.0,
    MinumumProgress = 0,
    MaximumProgress = 1.0,
    HorizontalOptions = LayoutOptions.FillAndExpand,
    VerticalOptions = LayoutOptions.FillAndExpand
};
  • XAML
<e:ElottieAnimationView
    AutoPlay="True"
    AutoRepeat="False"
    Speed="1.0"
    MinumumProgress="0"
    MaximumProgress="1.0"
    HorizontalOptions="FillAndExpand"
    VerticalOptions="FillAndExpand"
/>

Animation views can be allocated with or without animation data. There are a handful of convenience initializers for initializing with animations.

Properties:

  • AutoPlay: Indicates whether this animation is play automatially or not. The default value is false.
  • AutoRepeat: The loop behavior of the animation. The default value is false.
  • Speed: The speed of the animation playback. Higher speed equals faster time. The default value is 1.0.
  • MinumumProgress: The start progress of the animation (0 ~ 1.0). The default value is 0.
  • MaximumProgress: The end progress of the animation (0 ~ 1.0). The default value is 1.0.

By default. the initial value of animation view's size(width, height) is 0. Make sure that using whether WidthRequest. HeightRequest properties or LayoutOptions like FillAndExpand to request the size of animation view.

Loading from a File Path

  • C#
animation.AnimationFile = "lottie.json";
  • XAML
<e:ElottieAnimationView  AnimationFile="lottie.json" />

Loads an animation model from a animation file. After loading a animation successfully, you can receive AnimationInitialized event and get the duration time and total frame count by using TotalFrame and DurationTime properties.

Play the Animation

animation.Play();

Plays the animation from its current state to the end of its timeline. Started event occurs when the animation is started. And Finished event occurs when the animation is finished.

Stop the Animation

animation.Stop();

Stops the animation. Stopped event occurs when the animation is stopped.

Pause the Animation

animation.Pause();

Pauses the animation. Paused event occurs when the animation is paused.

Is Animation Playing

bool isPlaying = animation.IsPlaying;

Returns true if the animation is currently playing, false if it is not.

Current Frame

int currentFrame = animation.CurrentFrame;

Returns the current animation frame count.
==Note==: It returns 0, if animation is not playing.

Total Frame

int totalFrame = animation.TotalFrame;

Returns the total animation frame count.
==Note==: You should load the animation file before using it.

Duration Time

double duration = animation.DurationTime;

Returns the duration time of animation.
==Note==: You should load the animation file before using it.

v0.9.2

03 Jul 07:43

Choose a tag to compare

v0.9.2 Pre-release
Pre-release

Nuget package here.

New APIs added

  • GetFrameFromProgress(float progress)
  • SeekTo(float progress)
  • Play(float from, float to)
  • Play(int from, int to)

v0.9.1

03 Jul 07:40

Choose a tag to compare

v0.9.1 Pre-release
Pre-release

Nuget package here.

Enhancements

  • From this version (0.9.1-preview), ElottieSharp is working on Tizen emulator. 🎉

v0.9.0

23 Apr 05:28
0d746ab

Choose a tag to compare

v0.9.0 Pre-release
Pre-release

Nuget package here.

Important Notice

This version (0.9.0-preview) only works on Galaxy Watch Active, which supports Tizen 4.0.0.3. (Not Galaxy Watch and Gear S-series yet.)

Developer's Guide

LottieAnimationView

LottieAnimationView is a EvasObject (TizenFX) subclass that displays animation content.

Creating Animation Views

var animation = new LottieAnimationView(window)
{
    AutoPlay = true,
    AutoRepeat = false,
    Speed = 1.0,
    MinumumProgress = 0,
    MaximumProgress = 1.0
};

Animation views can be allocated with or without animation data. There are a handful of convenience initializers for initializing with animations.

Properties:

  • AutoPlay: Indicates whether this animation is play automatially or not. The default value is false.
  • AutoRepeat: The loop behavior of the animation. The default value is false.
  • Speed: The speed of the animation playback. Higher speed equals faster time. The default value is 1.0.
  • MinumumProgress: The start progress of the animation (0 ~ 1.0). The default value is 0.
  • MaximumProgress: The end progress of the animation (0 ~ 1.0). The default value is 1.0.

Loading from a File Path

animation.SetAnimation(Path.Combine(DirectoryInfo.Resource, "lottie.json"));

Loads an animation model from a filepath. After loading a animation successfully, you can get the duration time and total frame count by using TotalFrame and DurationTime properties.

Parameters:
: filepath: The absolute filepath of the animation to load.

Play the Animation

animation.Play();

Plays the animation from its current state to the end of its timeline. Started event occurs when the animation is started. And Finished event occurs when the animation is finished.

Stop the Animation

animation.Stop();

Stops the animation. Stopped event occurs when the animation is stopped.

Pause the Animation

animation.Pause();

Pauses the animation. Paused event occurs when the animation is paused.

Is Animation Playing

bool isPlaying = anumation.IsPlaying;

Returns true if the animation is currently playing, false if it is not.

Current Frame

int currentFrame = anumation.CurrentFrame;

Returns the current animation frame count.
==Note==: It returns -1, if animation is not playing.

Total Frame

int totalFrame = anumation.TotalFrame;

Returns the total animation frame count.
==Note==: You should load the animation file before using it.

Duration Time

double duration = anumation.DurationTime;

Returns the duration time of animation.
==Note==: You should load the animation file before using it.