我有一个补间动画在Android的问题,我尝试从屏幕中心移动一个ImageView
项目到屏幕顶部,但在变换结束后ImageView
返回到第一个位置!我使用此代码:Android:补间动画:移动ImageView
<?xml version="1.0" encoding="utf-8"?>
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/bounce_interpolator"
android:fromYDelta="0%"
android:toYDelta="-1500%"
android:duration="3000"
android:startOffset="3000">
</translate>
private void RunAnimations() {
Animation animation = AnimationUtils.loadAnimation(this, R.anim.move_up_maxname);
animation.reset();
ImageView maxName = (ImageView) findViewById(R.id.imageView1);
maxName.clearAnimation();
maxName.startAnimation(animation);
}
任何人都可以帮助我吗?
谢谢