我怎样才能依次使用四个动画
嗨,我有四个动画,即 anim1、anim2、anim3、anim4。对于动画,我使用代码,因为
RotateAnimation anim1 = new RotateAnimation(240, 120, 8, 70);
anim1.setRepeatCount(0);
anim1.setDuration(18000);
anim1.setFillAfter(true);
img7.startAnimation(anim1);
我想依次播放四个动画,即在 anim1 结束时,anim2 必须播放,依此类推。 ..对于我正在使用的前两个动画
setAnimationListener()
,它的工作原理是给第二个(anim2)作为
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
RotateAnimation anim2 = new RotateAnimation(240, 120, 8, 70);
anim2.setRepeatCount(0);
anim2.setDuration(18000);
anim2.setFillAfter(true);
img7.startAnimation(anim2);
}
现在我将为动画的其余部分做什么。请有人帮助我。
hi i have four animation,viz anim1,anim2,anim3,anim4.For the animation i am using the code as
RotateAnimation anim1 = new RotateAnimation(240, 120, 8, 70);
anim1.setRepeatCount(0);
anim1.setDuration(18000);
anim1.setFillAfter(true);
img7.startAnimation(anim1);
i want to play four animtion one after another, ie at the end of anim1,anim2 has to play and so on....for the first two animation i am using
setAnimationListener()
and it is working by giving second(anim2) as
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
RotateAnimation anim2 = new RotateAnimation(240, 120, 8, 70);
anim2.setRepeatCount(0);
anim2.setDuration(18000);
anim2.setFillAfter(true);
img7.startAnimation(anim2);
}
Now what will i do for the rest of the animation.Please some body help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用动画监听器,
链接
Try using Animation Listener,
link