Is it possible to load a Lottie animation in the layout of my splash screen?
Currently my splash screen layout is as such:
background.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@drawable/path_background_gradient" />
<item
android:drawable="@drawable/ic_locky"
android:gravity="center" />
</layer-list>
styles.xml
<!-- Splash Launcher UI theme. -->
<style name="Locky.Theme.Launcher" parent="Locky.Theme">
<item name="android:windowBackground">@drawable/custom_background_launcher</item>
<item name="colorPrimary">@color/background_gradient_accent_start</item>
<item name="colorPrimaryDark">@color/background_gradient_accent_start</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
I used this to prevent the white screen on android cold boot.
But instead of the icon ic_locky
I want to use a Lottie animation. Is it possible to do so? Because there are many apps that uses an animated logo in the splash screen.