android - Lottie 动画没有按预期工作

标签 android animation android-animation lottie

我正在使用 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>

知道我做错了什么吗?

最佳答案

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

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

关于android - Lottie 动画没有按预期工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43177613/

相关文章:

android - 我可以在 FirebaseMessagingService 中启动前台任务吗?

java - 如何使用 rxJava 发出多重请求

ios - UIView animateWithDuration 等到动画结束

ios - iPad 中的 Photo Booth Mac 应用程序等 Photo Flash 动画

android - 单击按钮时为购物车图标设置动画

android - 如何从不同角度旋转 View ?

java - 如何显示一组随机单词?

java - Spinner 不使用 API 23 中的 onItemSelected 方法

css - SVG 动画颜色过渡

android - beginDelayedTransition 不起作用,仅显示最终 View 位置