【发布时间】:2017-04-12 14:11:50
【问题描述】:
我正在向我的ImageView 添加无限动画。
下面是我的动画代码:
<?xml version="1.0" encoding="utf-8"?>
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="2000"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="70%"
android:pivotY="70%"
android:repeatCount="infinite"
android:startOffset="2000"
android:repeatMode="reverse"
android:toXScale="0.8"
android:toYScale="0.8" />
而java代码是:
Animation pulse = AnimationUtils.loadAnimation(this, R.anim.pulse);
reviewImage.startAnimation(pulse);
问题是它在每个动画之后都会延迟,比如展开+延迟+折叠+延迟,我只想在一个周期后延迟意味着在展开+折叠+延迟之后
【问题讨论】:
-
android:repeatMode="reverse" 这是反向动画
-
我明白了,现在注意到了。
标签: android android-layout animation android-animation android-view