我想做的是通过以下方式将图像从当前位置动画到新位置
XML
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android">
<translate
xmlns:android ="http://schemas.android.com/apk/res/android"
android:fromXDelta ="0"
android:toXDelta ="0"
android:fromYDelta ="0"
android:toYDelta ="-100"
android:duration ="2000"
android:fillAfter ="true"
/>
</set>
Java 代码
ImageView logo01 = (ImageView) findViewById(R.id.logo01);
Animation animation01 = AnimationUtils.loadAnimation(this, R.anim.translate);
animation01.reset();
logo01.clearAnimation();
logo01.startAnimation(animation01);
但是,在动画结束时,图像会重新回到原来的位置。我们如何才能避免这种情况,以便最终图像处于新位置。