2017-10-11 2 views
0

저는 현재 Android 용 AirBnB의 Lottie library을 가지고 놀고 있으며 LottieAnimationView Z 주문 관련 문제가 있습니다. 에 관계없이 나는 RelativeLayout의 상단에있는 LottieAnimationView을 배치 여부, 항상 레이아웃의 예에서 다른 모든 요소의 상단에 나타납니다Lottie Animation Library Z 주문 문제

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

나는 또한 0으로 LottieAnimationView의 고도를 설정하려고했습니다 그러나 문제를 해결하는 데는 성공하지 못했습니다. 누구든지이 문제를 해결하는 방법에 대한 아이디어가 있거나 라이브러리의 한계에 불과합니까? 또한, 그것이 한계라면, 그 원인은 무엇입니까?

답변

0

코드별로 lottie fileName을로드하십시오. 파일을 XML로로드 할 때 몇 가지 문제가 발생했습니다.

다른보기에는 하나의 선형을 사용할 수 있으며 linearlayout.bringToFront()를 호출 할 수 있습니다.