안녕하세요.

Activity내에서 AnimationDrawable을 이용해 아래와 같이 animation을 구현했습니다.

private AnimationDrawable mFrameDrawable;

@Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  텍스트 뷰, 이미지 뷰 등 여러가지 선언

  animationView = (ImageView) findViewById(R.id.animation);
  animationView.setBackgroundResource(R.anim.animation);

  OutcallAnimationTask tk = new OutcallAnimationTask();
  Timer t = new Timer(false);
  t.schedule(tk, 500);
}

class OutcallAnimationTask extends TimerTask {
  public void run() {
   ImageView img = (ImageView) findViewById(R.id.animation);
   mFrameDrawable = (AnimationDrawable) img.getBackground();
   mFrameDrawable.start();
  }
 }

위와 같이 구현한 상태에서 res/layout-land에서 동일한 이름의 xml파일을 만들어
좌표 지정해 주고 실제 테스트 해보니 portrait에서 landscape로 변경시킬 때,

01-23 23:06:14.979: WARN/dalvikvm(2947): threadid=3: thread exiting with uncaught exception (group=0x2aac5a08)
01-23 23:06:14.980: ERROR/AndroidRuntime(2947): Uncaught handler: thread main exiting due to uncaught exception
01-23 23:06:15.010: ERROR/AndroidRuntime(2947): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:439)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:322)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:688)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.content.res.Resources.loadDrawable(Resources.java:1710)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.content.res.Resources.getDrawable(Resources.java:585)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.graphics.drawable.AnimationDrawable.inflate(AnimationDrawable.java:265)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:779)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.graphics.drawable.Drawable.createFromXml(Drawable.java:720)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.content.res.Resources.loadDrawable(Resources.java:1695)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.content.res.Resources.getDrawable(Resources.java:585)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.view.View.setBackgroundResource(View.java:7013)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at com.xener.fmc.mobilevoip.MobileVoIPInOutCallScreen.onCreate(MobileVoIPInOutCallScreen.java:257)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3502)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.app.ActivityThread.access$2200(ActivityThread.java:116)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1798)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.os.Looper.loop(Looper.java:123)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at android.app.ActivityThread.main(ActivityThread.java:4203)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at java.lang.reflect.Method.invokeNative(Native Method)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at java.lang.reflect.Method.invoke(Method.java:521)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
01-23 23:06:15.010: ERROR/AndroidRuntime(2947):     at dalvik.system.NativeStart.main(Native Method)


이런 exception이 발생합니다. 브레이크 포인트로 확인해 보니 orientation 변경하면 다시 onCreate에서 하나하나 UI를 그려
나가는데 애니메이션 그려주면서 문제가 발생합니다. 잘은 모르겠지만 로그 메세지를 보면 리소스가 정리가 안되서 이런 문
제가 발생하는 것 같은데..이미지 사이즈도 아주 작은 jpeg파일입니다. -0-

orientation변환 시 애니메이션 이상없이 잘 동작하기 위해서 어떻게 구현을 해야 하나요???

고수님들 조언 부탁드립니다. 얘 때매 몇 일째...ㅠㅠ