Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1035009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:28:50+00:00 2026-05-16T14:28:50+00:00

I have 2 quiet big Animations each 50pics a 20kb Both defined as Animations

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:28:51+00:00Added an answer on May 16, 2026 at 2:28 pm

    Try to run

    rocketAnimation.setCallback(null);
    

    before you show anim2.

    btw: N1 has more heap per app allowed (24mb) than the G1 (16mb). Samsung Galaxy S has even more (48MB). But via parameter you can also set a higher heap limit for the emulator; (unfortunately not for an unrooted phone though).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a quite big XML output from an application. I need to process
I have quite big document in html format that generated from Microsoft Word. It
I have quite a big amount of fixed size records. Each record has lots
i have quite big ASP.NET MVC 2 application (multiple areas, each with own routing
We have a quiet big flex application compiled with flex 3.4 SDK. We also
I have this equation and it's quite big (basically a FDM one) but it
We have a git project which has quite a big history. Specifically, early in
I am refurbishing a big CMS that I have been working on for quite
I have a script. I would like to give this script a quiet mode
I have quite a big table (about 4M of entries) for emails that are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.