GithubHelp home page GithubHelp logo

Comments (10)

martijn00 avatar martijn00 commented on May 4, 2024 1

I've released bindings for Xamarin Android for Lottie! https://github.com/martijn00/LottieXamarin

It's also available on Nuget: https://www.nuget.org/packages/Com.Airbnb.Android.Lottie/

from lottie-android.

gpeal avatar gpeal commented on May 4, 2024 1

@lucasrloliveira Can you lost this on lottie-xamarin? I don't maintain the xamarin port.

from lottie-android.

gpeal avatar gpeal commented on May 4, 2024

Thanks @martijn00! I'll add this and the NativeScript bindings to the README

from lottie-android.

martijn00 avatar martijn00 commented on May 4, 2024

It's now also available for Xamarin iOS: https://www.nuget.org/packages/Com.Airbnb.iOS.Lottie/

The source is available here: https://github.com/martijn00/LottieXamarin

from lottie-android.

modplug avatar modplug commented on May 4, 2024

It is now also available for Xamarin Forms: https://github.com/martijn00/LottieXamarin

from lottie-android.

starkovss avatar starkovss commented on May 4, 2024

Hi Martin,
can you tell me why this code is not working?
My project created using XAMARIN.FORMS

I used animation file: lottielogo1.json
This file added to all 3 projects :
(Portable)/resources/lottielogo1.json
(Droid)/Assets/lottielogo1.json
(iOS)/Resources/lottielogo1.json

Code from (Portable) project:

public partial class PageIntro : ContentPage
    {
        public PageIntro()
        {
            InitializeComponent();

            // CREATE ANIMATION LOTTIE VIEW
            AnimationView animation = new Lottie.Forms.AnimationView()
            {
                // Initial parameters
                Animation = "lottielogo1.json",
                Loop = true,
                AutoPlay = true,
                WidthRequest = 400,
                HeightRequest = 400,
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand
            };

            // START PLAYING
            animation.IsEnabled = true;
            animation.IsVisible = true;
            animation.Play();

            // ADDING ANIMATION TO THE VIEW
            CONTENT_LOCAL.Children.Add(animation);

            // CHECKING BY TAP : Playing or not
            var tap = new TapGestureRecognizer
            {
                Command = new Command(() =>
                {
                    if (animation.IsPlaying)
                    {
                        DisplayAlert("Animation", "is Playing : Progress is " + animation.Progress, "Close");

                    }
                    else
                    {
                        DisplayAlert("Animation", "is NOT Playing", "Close");
                    }
                } ),
                NumberOfTapsRequired = 1
            };
            animation.GestureRecognizers.Add(tap);
        }

So as result there is nothing happens.
I tested on Android and iOS. Just blank screen.
By TAPing , I'm getting IS NOT PLAYING message.
Can you please advice what do I miss in that code.
Thank you.

from lottie-android.

gpeal avatar gpeal commented on May 4, 2024

@starkovss You may have the most luck filing an issue directly on that repo

from lottie-android.

starkovss avatar starkovss commented on May 4, 2024

@gpeal , yup you are right. I already post it to FORMS repo. I noticed that I'm on Android branch only after the posting..

from lottie-android.

lucasrloliveira avatar lucasrloliveira commented on May 4, 2024

Hey, I´m having a problem trying to use Lottie json animation within a carousel view, I intent to change the animation´s reference when swiping my carousel, and I want to start the new animation at this very moment, but when I try to set AutoPlay to false and IsPlaying to true when swiping, my animations weren´t able to start, if I set AutoPlay to true, the animations will start independently from my swipe actions, this if I leave Loop to true, does anyone have any sugestions on how to start it at the changeIndexEvent of my carouselView? I´m using Xamarin forms Carousel View.

from lottie-android.

saamerm avatar saamerm commented on May 4, 2024

@starkovss Did you add the initializer in the AppDelegate?
AnimationViewRenderer.Init();

from lottie-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.