2017-10-11 2 views
0

ich zur Zeit das Spiel mit der Lotties AirBnB library für Android, und ich Probleme mit LottieAnimationView Z Ordnung hat. Unabhängig davon, ob ich stelle die LottieAnimationView an der Spitze der RelativeLayout, es erscheint immer an der Spitze aller anderen Elemente im Layout ab:Lottie Animation, Bibliothek Z Bestellung Ausgabe

<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> 

Ich habe auch versucht, die Höhe s‘LottieAnimationView Einstellung auf 0 , aber ohne Erfolg bei der Behebung des Problems. Hat jemand eine Idee, wie das zu beheben ist, oder wenn es nur eine Einschränkung der Bibliothek ist? Wenn es eine Einschränkung ist, was verursacht es dann?

Antwort

0

Versuchen Sie, den lottie Dateinamen von Code zu laden. Ich hatte ein paar Probleme, wenn ich die Datei von xml

geladen können Sie ein Linear verwenden für die anderen sehen und rufen linearlayout.bringToFront()