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

  • Home
  • SEARCH
  • 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 8249795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:39:54+00:00 2026-06-07T23:39:54+00:00

Today I was thinking about how Android framework works, and I’m not sure about

  • 0

Today I was thinking about how Android framework works, and I’m not sure about one thing – how developer (me) should program lists to show custom data from few sources. I created few apps, but its important to me to keep my applications clean and fast as possible.

So – I have an app, for example news reader. Im using Fragments, ListFragments, custom layouts for list items and BaseAdapter for showing data in many lists and activities. Nothing new here, and nothing special. At first I download all data from webserver to sqlite in app, so Im sure about it speed and stability. And then what’s next?

Should i create List items from Java Lists (List items) and then pass it to baseadapter, or I should only use way SQLite Cursor->list item? What is better to refresh list, add new items and delete them? Remember that i have my ListFragment with baseadapter in separate class.

Im not sure about it, so I clearly dont know how should i refresh and load new items to my list. I just want to keep app clean, without many 3rd party libraries (so i dont care about EndlessList or something like that).

tl;dr

How should I create list for speed purposes, when i use few sources to show data?

  • 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-07T23:39:55+00:00Added an answer on June 7, 2026 at 11:39 pm

    I’m not sure whether I understand your full question but about the part which data source to use for an Adapter, here are my thoughts:

    I think that depends on the amount of data you are dealing with. If it is sufficiently small you can keep everything in a List in memory, but you also need to be sure that the data won’t grow over time.

    Using a Cursor as a data source is unfortunately also not a safe option for getting around a possible “Out Of Memory” exception problem. There is a limit per query because of the implementation of the cursor which apparently loads the whole result set into memory.

    So if you are dealing with a lot of data or data that potentially grows over time (like messages, user-created items), you need to have an Adapter that internally works with a data window which loads a fixed amount of items into memory at a time. That window always keeps a bunch of items in memory which can be currently viewed and quickly reached with the ListView (by scrolling up and down).

    Let’s say that window holds for example 200 items.
    When the upper / lower bound of that window is reached the Adapter needs to load the next adjacent window. You can observe that kind of behavior in the GMail app (“Loading conversations….”).

    I would let that data sit in the cursor and not transfer it to a list first, because you can use the cursor like a list.

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

Sidebar

Related Questions

Today I started thinking about a new project, and I found one. The goal
Came by a curious case today, that got me thinking about how the object
I was thinking today about the try/catch blocks existent in another languages. Googled for
With twitter being down today I was thinking about how to best handle calls
I was thinking today about what could be the most complex / impressive application
Today I was thinking about a Python project I wrote about a year back
Today I was thinking about declaring this: private delegate double ChangeListAction(string param1, int number);
I was thinking about CSS positioning modes today and realized that I never use
I'm thinking about trying out MVC later today for a new app we're starting
I just started thinking about creating/customizing a web crawler today, and know very little

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.