AnimationDrawable 객체를 Imageview 배경 자원으로 설정한다.

 

ImageView img = (ImageView)findViewById(R.id.ImageView1);

BitmapDrawable f1 = (BitmapDrawable)getResources().getDrawable(R.drawable.f1);
BitmapDrawable f2 = (BitmapDrawable)getResources().getDrawable(R.drawable.f2);
BitmapDrawable f3 = (BitmapDrawable)getResources().getDrawable(R.drawable.f3);

int reasonableDuration = 250;
AnimationDrawable mAnimation = new AnimationDrawable();

mAnimation.addFrame(f1, reasonableDuration);
mAnimation.addFrame(f2, reasonableDuration);
mAnimation.addFrame(f3, reasonableDuration);

img.setBackgroundDrawable(mAnimation);
mAnimation.start();
mAnimation.stop();

이렇게 하고 싶은데 surfaceView를 이용해서 canvas로 찍고 있기 때문에 imageView를 만들수가 없어요 그럼 surfaceView에다 위와같은 방식으로 애니메이션을 보여주려면 어떻게 해야되나요 도움 부탁드립니다..