延迟动画
我想做的是点击按钮,激活 3 TranslateAnimation
case R.id.button18Holes:
//*********************************//
//***LAUNCHES ACTUAL APPLICATION***//
//*********************************//
TranslateAnimation slide = new TranslateAnimation(0, -500, 0,0 );
slide.setDuration(1000);
slide.setFillAfter(true);
buttonHelp.startAnimation(slide); <-- first
button9Holes.startAnimation(slide); <-- should start slightly after first
button18Holes.startAnimation(slide); <-- should start slightly after second
//This should wait until all animations are complete
Intent myIntent = new Intent(src.getContext(), EasyPar.class);
startActivityForResult(myIntent, 0);
break;
不确定如何获得将按钮一个接一个地滑出屏幕的效果。
What I am looking to do is on button click, activate 3 TranslateAnimation
case R.id.button18Holes:
//*********************************//
//***LAUNCHES ACTUAL APPLICATION***//
//*********************************//
TranslateAnimation slide = new TranslateAnimation(0, -500, 0,0 );
slide.setDuration(1000);
slide.setFillAfter(true);
buttonHelp.startAnimation(slide); <-- first
button9Holes.startAnimation(slide); <-- should start slightly after first
button18Holes.startAnimation(slide); <-- should start slightly after second
//This should wait until all animations are complete
Intent myIntent = new Intent(src.getContext(), EasyPar.class);
startActivityForResult(myIntent, 0);
break;
Unsure of how to get that effect to slide the buttons off the screen one after the other.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试使用 getTransformation(..) 或尝试通过轮询 hasEnded() 前面动画的方法。
You could try running the animations after a set amount of time using getTransformation(..) or try waiting for each to end by polling the hasEnded() method of the preceding animation.