아래 코드는 이미지 3장을 가지고서 애니메이션 흉내를 내는것인데요..

43번째 라인에있는 img.post(mAnimation) ;

post의 기능이 무엇인가요?? 일단 책에있는대로 하긴 했는데..


post메서드를 호출하였는데 왜 자동으로 run()메서드까지 실행이 되나요???



package pmj.Game01;

import android.app.Activity;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class Game01 extends Activity {

    AnimationDrawable mAnimation ;
    TextView tv ;
    ImageView img;
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);


  tv = (TextView)findViewById(R.id.tv);
  
        int reasonalbeDuration = 70;
        mAnimation  = new AnimationDrawable();
        
        BitmapDrawable fram1 = (BitmapDrawable)getResources().getDrawable(R.drawable.r1);
        BitmapDrawable fram2 = (BitmapDrawable)getResources().getDrawable(R.drawable.r2);
        BitmapDrawable fram3 = (BitmapDrawable)getResources().getDrawable(R.drawable.r3);
        
        mAnimation.addFrame(fram1, reasonalbeDuration);
        mAnimation.addFrame(fram2, reasonalbeDuration);
        mAnimation.addFrame(fram3, reasonalbeDuration);
        
        mAnimation.setOneShot(false);


        img = (ImageView)findViewById(R.id.imgV);
        img.setBackgroundDrawable(mAnimation);
        
        img.post(mAnimation);
    }
class Starter implements Runnable 
    {
        public void run() 
        {
         tv.setText("실행");
         mAnimation.start();        
        }    
    }
}