jelin Tirsha
jelin Tirsha

Reputation: 11

How to design Splash Screen Animated Attractive Landing Screen Animation in xamarin forms. cross platform

I need splash screen animation before entering the main page in android and iOS. but I unable to find this type of animation. tell me anyone knows this means, kindly give me an idea. I attach the below reference. its in developed in native android. how to develop this process in xamarin forms cross-platform(android & iOS).

Reference : https://demonuts.com/splash-screen-animation/

Upvotes: 1

Views: 879

Answers (1)

Lucas Zhang
Lucas Zhang

Reputation: 18861

You can set the animation on a ContentPage and set it as MainPage firstly to let it looks like an illusory splash screen. Then you can change the MainPage use Timer Task.Delay(1000);

And you can use the library Lottie from Nuget. Lottie is a library, designed for iOS, Android that allows you run animations. These animations are defined in a JSON file, containing all the details of colors, shapes, transforms and more.

Usage

First install the following Nuget package to your native and share projects.

Com.Airbnb.Xamarin.Forms.Lottie

In your native projects, after the Xamarin.Forms.Forms.Init line, add the following, into each project.(AppDelegate.cs in iOS and MainActivity.cs in Android)

AnimationViewRenderer.Init();

In order to show an animation, you first need the after effects JSON file. Put this in your Assets (Android) or Resources (iOS) folder.

<forms:AnimationView x:Name="AnimationView"
                         Animation="LottieLogo1.json"
                         Loop="True"
                         AutoPlay="True"
                         VerticalOptions="FillAndExpand"
                         HorizontalOptions="FillAndExpand" />

There is a sample maybe can help you.

Upvotes: 1

Related Questions