Skip to main content

Lottie Animations in Xamarin.Android

Hello,

Today I will give you some of detail of and How to setup Lottie animation in Xamarin Android.

Lottie is a library created by Airbnb, It will provide a good animation in Android as well as iOS in Xamarin.

I want to
Specially thank to Martijn van Dijk for this awesome library is available make available in Xamarin.

Question) Why I need to write this Blog :

  Answer) I saw people were frustrated because Lottie was not working for them, With this post I will try to explain step by step how to make it work.

Okay, Guys Lets start it. Step by Step we will start and apply Lottie Animation in Xamarin.Andorid.

In 5 Steps we are able to steup Lottie Animation in Xamarin.Andorid1) Install the Lottie Xamarin.Android project :


2) Add your view in your XAML :



3) Write code to play Animation in CS file :

 

4) Place that json file in Assets foler and main point is check its build action is androis asset is checked or not : 

 

5) Compile your android project :

 


I will come with next blog Lottie Animations in Xamarin.iOS .Feel free to comment if you are not able to configure out it.

Source Code

Happy Coding :)

Comments

  1. Outstanding work author. Knowledgeable enough. We will surely share your work. Anyway, If you are interested and looking for website development you may visit this website
    web and app development company
    hire xamarin developer
    hire abp.io developer
    hire .net developer

    ReplyDelete

Post a Comment

Popular posts from this blog

"Timeouts & Waiting" function in Android Xamarin

Hello, I am here to start some of Good platform which name Xamarin , Its a Cross-Platform and its basically written in C#. First Blog for Set Timeout function  : Code : using  System . Threading ; System . Threading . Tasks . Task . Factory . StartNew (()   = >   {                 Thread . Sleep ( 5000 ) ;   //   delay   execution   for   500 0 ms }) ;

Open Webpage in Default Browser

Open webpage to default browser you need to write this code in Xamarin Andorid :) Code :  var   uri   =  Android . Net . Uri . Parse   ( " http : / / www . dharmik . me " ) ; var   intent   =   new   Intent   ( Intent . ActionView ,   uri ) ;      StartActivity   ( intent ) ;

Launch Phone Dialer in Xamarin

If you want to dial direct phone via in your application in Xamarin Android please use this code , This code is same as Andorid native code. Code:   var   uri   =  Android . Net . Uri . Parse ( " tel : 9999999999 " ) ; var   callIntent   =   new   Intent   ( Intent . ActionDial , uri ) ;     StartActivity ( callIntent ) ; For More detail prefer this URL :  https://developer.xamarin.com/recipes/android/fundamentals/intent/launch_the_phone_dialer/