开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜