【问题标题】:How create continuous Animation?如何创建连续动画?
【发布时间】:2017-07-13 04:49:41
【问题描述】:

我想为 ImageView 创建这样的动画

【问题讨论】:

标签: android animation


【解决方案1】:

您可以使用该 GIF 图像并将该图像加载到 Imageview 中。你可以使用这个库来加载koral--/android-gif-drawable

并将您的 ImageView 更改为

<pl.droidsonroids.gif.GifImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/src_anim"
    android:background="@drawable/bg_anim"
    />

【讨论】:

  • 我使用这个 GlideDrawableImageViewTarget imageViewTarget = new GlideDrawableImageViewTarget(imageView); 解决了问题Glide.with(this).load(R.drawable.up_arrow).into(imageViewTarget);
  • 没有.of 库可用于 GIF
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-08-09
相关资源
最近更新 更多