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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:23:26+00:00 2026-06-06T15:23:26+00:00

I’m trying to create an Android ListView that will look like Instagram pictures feed

  • 0

I’m trying to create an Android ListView that will look like Instagram pictures feed or Facebook’s. I’m getting Out Of Memory Exception on my Galaxy Nexus after loading some images (only a few). I scaled them, but still, the number of images isn’t fixed and theoretically can be unlimited. On Facebook and Instagram they load lots of images and other data and it works well.

What do you think? Can i achieve those performances with native Android coding?
If i’ll create a HTML5 feed (like Facebook and Instagram) will i avoid the memory problem?

It feels weird for me that I need to do so much work handling the memory of images coming from server. If it’s the only solution, what is the way to go for managing hundreds of pictures in native ListView?

I will appreciate any opinion!
Thanks.

  • 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-06T15:23:27+00:00Added an answer on June 6, 2026 at 3:23 pm

    Don’t load them all into memory at once, only load the images you need to display into Bitmap objects; and make sure the images you load are only the size you need to display (don’t fully load a 1900×1200 image to show a 300×200 thumbnail). Your application’s heap size is ~30MB (device dependent, but that’s a good rule of thumb), and a Bitmap will take up Width*Height*4 bytes in memory once loaded.

    One method is to cache the images onto disk as they are downloaded so they don’t have to be in memory, and always check the cache for an image before downloading it. You can also use the cache to load up a handful of images into memory that need to be displayed in the list at that time.

    You can also make use of the BitmapFactory.Options.inSampleSize options to reduce the size of an image while it is loaded, rather than loading in the entire image and then creating a small copy, which wastes time and memory.

    HTH

    Take a look at : http://developer.android.com/training/displaying-bitmaps/index.html for help

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.