How To use lottie file as Root Splash screen in Expo?

124 views Asked by At

I want to replace the default root splash screen of my expo app with a lottie file .

I have used react-native-lottie-splash-screen and followed all the instructions but the lottie is not showing.

here is my launch_screen.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context=".MainActivity"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background"
  >
<com.airbnb.lottie.LottieAnimationView
    android:id="@+id/lottie"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:lottie_rawRes="@raw/fireworks"
    app:lottie_autoPlay="true"
    app:lottie_loop="false"
    />
</LinearLayout>

There is no such specific library for expo.

Thanks in advance

0

There are 0 answers