#StackBounty: #android #android-animation #z-order #lottie-android Lottie Animation Library Z Ordering Issue

Bounty: 150

I’m currently playing around with the AirBnB’s Lottie library for Android, and I’m having issues with LottieAnimationView Z ordering. Regardless of whether I place the LottieAnimationView at the top of the RelativeLayout, it always appears on top of all of the other elements in the layout ex:

<RelativeLayout
    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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="@dimen/spacing_lrg"
    tools:context="com.myapp.SplashActivity">

    <com.airbnb.lottie.LottieAnimationView
        android:id="@+id/animation_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:lottie_fileName="test.json"/>

   <! -- Other Elements that should appear on top of the background animation -->

</RelativeLayout>

I’ve also tried setting the LottieAnimationView‘s elevation to 0, but with no success at fixing the issue. Does anyone have an idea of how to fix this, or if it’s just a limitation of the library? Also, if it’s a limitation, what causes it?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.