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 8894591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:32:19+00:00 2026-06-14T23:32:19+00:00

I have an app that animates gif’s by loading all of the frames as

  • 0

I have an app that animates gif’s by loading all of the frames as separate bitmaps into memory and having a thread loop through them assigning them to the imageViews.

The imageViews are on fragments and the fragments are loaded on a pageViewer. I’ve set the offscreen limit of the pageviewer to 1 so at most I’m dealing with three fragments/gifs at a time.

Now on the emulator with 2.1 I get this error if all three gifs are in memory at the same time:

11-25 17:28:34.269: E/dalvikvm-heap(524): 292000-byte external allocation too large for this process.
11-25 17:28:34.269: E/(524): VM won't let us allocate 292000 bytes

I get the same error on 2.3.3 but not on 4.0.3 emulator or my galaxy tab 10.1 running 4.0.4 – those two run fine and considerably faster.

I’ve tried loading a 1024×999 3.2MB gif and even the 4.0.3 emulator failed but my tablet still managed to show a number of gifs until it too stopped loading them; the app used about 250-300MB of RAM.

So is there a way to predict how real devices will work? Should I target higher API versions?

  • 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-06-14T23:32:20+00:00Added an answer on June 14, 2026 at 11:32 pm

    You have to be very careful when loading so many Bitmaps. You can EASILY exceed how much memory you need. Remember, you are on a limited device, DON’T expect unlimited resources try to be as memory efficient as you possibly can.

    You can very likely solve your problem if you learn about best practices from the android dev site:

    http://developer.android.com/training/displaying-bitmaps/load-bitmap.html

    Give it a read, should help you solve your problem.

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

Sidebar

Related Questions

I have a WinForms app that displays an animated gif in the simplest possible
I have an app that is loading a overlay controller (shows camera so I
I have an app that when loads, loads a tab based app whereby all
I have an app that animates the alpha of some images from 0 to
have an app that finds your GPS location successfully, but I need to be
Have an app that has listings - think classified ads - and each listing
I have an app that switches between full screen and normal screen for a
I have an app that uses the ActionBar with tabs in combination with Fragments.
I have an app that lets the user interact with several forms. I can
I have an App that downloads and displays images from URL's. This works fine

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.