Comments (10)
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.
@lucasrloliveira Can you lost this on lottie-xamarin? I don't maintain the xamarin port.
from lottie-android.
Thanks @martijn00! I'll add this and the NativeScript bindings to the README
from lottie-android.
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.
It is now also available for Xamarin Forms: https://github.com/martijn00/LottieXamarin
from lottie-android.
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.
@starkovss You may have the most luck filing an issue directly on that repo
from lottie-android.
@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.
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.
@starkovss Did you add the initializer in the AppDelegate?
AnimationViewRenderer.Init();
from lottie-android.
Related Issues (20)
- App Crash with EOF error HOT 1
- Seeking Solutions: Lottie Animation Freezing Issue on Android 10 (Version 5.1.0) HOT 1
- Cache issue introduced in 6.3.0
- How to load lottie file from internal storage (compose) HOT 2
- How to replay the animation after a drawable resource is set to LottieAnimationView?
- Migrating Compose-BOM library to alpha version.
- Lottie-compose feature parity HOT 2
- Uncaught exception on Lottie that causes large canvas allocation HOT 1
- Binary incompatibility between 6.3.0 and 6.4.0 HOT 2
- java.lang.IllegalStateException: Missing values for keyframe.
- LottieAnimationView.duration returns 0 HOT 3
- Incorrect icon loading when manually selecting a dark or light theme HOT 1
- NullPointer crash problem
- [6.3.0] use compatible lottie resource but crash HOT 4
- Provide a Global Configuration to Default Cache Composition to Disabled HOT 1
- Improve Gzip and Zip animation detection for `File` and `ContentProvider` animations in Compose HOT 2
- Lottie Compose: playing compositions in a sequence is buggy HOT 6
- 6.4.0 Delete the setScale API. Are there any other alternative APIs that do the same thing as the setScale API? HOT 1
- Correct the frequent GC issues caused by L.beginSection and L.endSection methods. HOT 1
- Cannot render when using LottieDrawable without setting bounds with SOFTWARE rendering HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lottie-android.