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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:43:17+00:00 2026-05-31T20:43:17+00:00

I have a list view contains 100+ rows. every time the user opens the

  • 0

I have a list view contains 100+ rows. every time the user opens the app it load all the data from http. And i want to cache that data so that if to open that activity it should get it from the cache not from the http every time.

also i am thinking add some flag to clear out the cache (if for some reason if my url changes it should not read fro cache version rather get the latest urls

I am not sure what to use cache inside the sd card vs sqllite.

my listview contains the url, artist, name, …. these are all reference something like this:

<song>
    <id>1</id>
    <title>Someone Like You</title>
    <artist>Adele</artist>
    <duration>4:47</duration>
    <plays>1662</plays>
    <songs_url>http://website/music/someonelikeyou.mp3</songs_url>
    <thumb_url>http://website/music/images/adele.png</thumb_url>
</song>

here is the code that reads from http:

// Getting XML from URL making HTTP request
// @param url string
public String getXmlFromUrl(String url) {
    String xml = null;

    try {
        // defaultHttpClient
        DefaultHttpClient httpClient = new DefaultHttpClient();
        HttpGet httpGet = new HttpGet(url);

        HttpResponse httpResponse = httpClient.execute(httpPost);
        HttpEntity httpEntity = httpResponse.getEntity();
        xml = EntityUtils.toString(httpEntity);

    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    } catch (ClientProtocolException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    // return XML
    return xml;
}
  • 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-31T20:43:18+00:00Added an answer on May 31, 2026 at 8:43 pm

    SQLite of course. It was done for holding such king of information. It is fast and easie to select filtered information.
    For images (like thumbs) use cache folder: context.getExternalCacheDir().getAbsolutePath()

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

Sidebar

Related Questions

I have a list view that contains some data, I want to share it
I have a list view filled with data. I set up a context menu
I have a list view with over 100 items. Each of these items show
We have created custom listview by using the Base adapter. List view contains Text
I have a ListView than contains a list of image created from web link
I have list view which contains 2 buttons and 2 textviews. I change the
I have list view with custom row layout (list_row.xml) that contains CheckBox element: <TableLayout
In my winforms app, I have a list view control that is populated with
Hi, I have a View class that contains a list, this list explains the
I have a pretty simple scenario using manual data operations with rad list view.

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.