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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:55:10+00:00 2026-06-12T05:55:10+00:00

I have a listview and each listview item when clicked opens a gallery (conating

  • 0

I have a listview and each listview item when clicked opens a gallery (conating 30 + images ) to be downloaded (using the urls).I don’t want to re – download the images on next visit and also want the images to be present when i click on list in offline mode.

I went through several links in SO and am a bit confused on which approach to follow:

  • 1> Use bytearray and store the images in sqlite db.
  • 2> use context -> getExternalCacheDir() to store it on the
    external memory (this wont work on devices with no external
    memory.)
  • 3> Use SoftReferences as suggested in following link

http://android-developers.blogspot.in/2010/07/multithreading-for-performance.html

Please help to guide me on the best approach to handle around 1000 + images which works in offline mode as well.

  • 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-12T05:55:11+00:00Added an answer on June 12, 2026 at 5:55 am

    1000 images…..I sure hope they’re thumbnails or you’re going to end using a lot of storage space.

    You should really only cache what you need and what images are used repeatedly. Both options 1 and 2 are dependant on the phone even having storage space, if there’s no space then you won’t be caching much to disk. 3 won’t store images permanently, if the app is put in the background and gets killed and so will the cache.

    It’s hard to say what the correct decision here is without knowing the inner workings and requirements of the app.

    Just going by what you want then I would say go with several solutions

    If there’s external storage write to that, if not use internal storage, if there’s not enough space internally use the soft references.

    I have always found that out of the box caching solutions never fit quite right with my apps and wind up writing my own cache. Sorry I can’t give a better answer.

    PS. If you’re not careful with 3 you might download too much and run into an OutOfMemoryException.

    PPS. 3 can also throw a RejectedExecutionException which is caused by too many async tasks being started at once (eg scrolling quickly through a listview that gets an image via asynctask)

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

Sidebar

Related Questions

I have a ListView and each row has an ImageView. These Images are downloaded
I have a ListView where each item is a TextView . I want to
I have listview with combox=true containg images. Each item is assigned a tag. I
i have a listview,now i want to perform on each listview items.I am using
I have a ListView and each item have a TextView. I would like add
I have a ListView and each item have a TextView. I would like change
I have a listview and each item has a title, some info, and a
I have a ListView with multiple checkboxes (one for each list item). What would
I have a listview where each item correlates to an instance of an item
I have a listview where each list item can contain 1 or more clickable

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.