0
    AnimationDrawable animation = new AnimationDrawable();
    animation.addFrame(getResources().getDrawable(R.drawable.a1), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a2), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a3), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a4), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a5), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a6), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a7), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a8), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a9), 1000);
    animation.addFrame(getResources().getDrawable(R.drawable.a10), 1000);
    animation.setOneShot(true);

    sayac = (ImageView) findViewById(R.id.sayac);
    sayac.setImageDrawable(animation);

    animation.start();


     // play the animation when i push the play button
     play.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });

    // pause the animation when i push pause button...
    pause.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });

一時停止して再開したいAnimationDrawable。しかし、私はできません。これどうやってするの?

または、または他のユーザーと同じアニメーションを実行できObjectAnimatorますか?

同じアニメーションを行うことができる場合、ObjectAnimatorどうすればこれを行うことができますか? 教訓や例はありますか?

4

0 に答える 0