【问题标题】:Lottie animation is not working as expectedLottie 动画未按预期工作
【发布时间】:2017-04-03 06:12:21
【问题描述】:

我将 Lottie 文件用于动画目的。它没有按预期加载。应该是这样的http://www.lottiefiles.com/48-progress-bar

当前状态:https://www.dropbox.com/s/xgvj9pss2cauv37/device-2017-04-03-113913.mp4?dl=0

<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"
    tools:context="com.icici.iciciappathon.checkout.PaymentSucessActivity"
    android:background="@color/sky_blue">

    <com.airbnb.lottie.LottieAnimationView
        android:id="@+id/animation_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:lottie_fileName="progress_bar.json"
        app:lottie_loop="true"
        app:lottie_autoPlay="true"
        android:layout_centerInParent="true"/>

</RelativeLayout>

知道我做错了什么吗?

【问题讨论】:

    标签: android animation android-animation lottie


    【解决方案1】:

    你所做的没有错。 Lottie 使用起来非常简单。不幸的是,progress_bar.json 有问题。

    尝试与设计师联系,也许他可以解决问题。

    【讨论】:

      【解决方案2】:

      只是改变依赖确实对我有用

      implementation 'com.airbnb.android:lottie:2.8.0'
      

      implementation 'com.airbnb.android:lottie:3.0.7'
      

      【讨论】:

        猜你喜欢
        • 2021-10-19
        • 2018-10-31
        • 1970-01-01
        • 2015-12-20
        • 2023-03-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-12-11
        相关资源
        最近更新 更多