Hi, I have 2 quiet big Animations each 50pics a 20kb
Both defined as Animations .xml

One I let start from the beginning and the second after a button
click.

    //Start immediatly
      imgView.setBackgroundResource(R.layout.anim1);
                        rocketAnimation = (AnimationDrawable)
imgView.getBackground();

    //Start after button click
      imgView.setBackgroundResource(R.layout.anim2);
                        rocketAnimation = (AnimationDrawable)
imgView.getBackground();

It works fine, till i hit the button and assign the second anim to my
view

    08-22 14:56:03.886: DEBUG/AndroidRuntime(1541): Shutting down VM
    08-22 14:56:03.886: WARN/dalvikvm(1541): threadid=3: thread
exiting with uncaught exception (group=0x4001da28)
    08-22 14:56:03.886: ERROR/AndroidRuntime(1541): Uncaught handler:
thread main exiting due to uncaught exception
    08-22 14:56:04.096: ERROR/AndroidRuntime(1541):
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
    08-22 14:56:04.096: ERROR/AndroidRuntime(1541):     at
android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)

It looks definitly that each animation for itself is fine (i could
even set anim2 at the autostart). but BOTH will exceed the memory.


Btw. on my Nexus One it works perfect. Where it fails is on G1 1.6
(even in Simulator).

So HOW would I release anim1 first before I assign anim2 ??


thx
chris

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to