0
我想将动画应用于线性布局的图像视图。我想在后台随机移动图像。随机移动背景图像
我的代码是
ImageView image1;
private Animation animation,animation1,animation2,animation3,animation4;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.categories);
image1 = (ImageView) findViewById(R.id.image);
Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(this, R.anim.zoomin);
image1.startAnimation(hyperspaceJumpAnimation);
我得到这个错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{hunt.gilpix.wallpaper/hunt.gilpix.wallpaper.Categories}: java.lang.ClassCastException: hunt.gilpix.wallpaper.Categories cannot be cast to android.view.animation.Animation$AnimationListener
不是,我想要在背景中使用单个图像和缩放临时工,并在缩放后,向右,向左,向下或向上移动。 – Hunt