Delaying animation
What I am looking to开发者_如何学Python 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.
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.
精彩评论