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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:17:53+00:00 2026-05-26T01:17:53+00:00

I might be way off here, but I have an ArrayAdapter managing static data

  • 0

I might be way off here, but I have an ArrayAdapter managing static data for a ListFragment. Very simple stuff. However, I’m interested in taking advantage of the new LoaderManager class. Can I still use my ArrayAdapter and write my own loader? The documents seem to suggest this is true:

“…the most common use of this is with a CursorLoader, however applications are free to write their own loaders for loading other types of data.”

If this is the case, how might I work with the overridden LoaderManager.LoaderCallbacks interface methods?

@Override
public Loader<Cursor> onCreateLoader(int arg0, Bundle arg1) {return null;}

@Override
public void onLoadFinished(Loader<Cursor> arg0, Cursor arg1) {}

@Override
public void onLoaderReset(Loader<Cursor> arg0) {}
  • 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-26T01:17:54+00:00Added an answer on May 26, 2026 at 1:17 am

    If you are creating a new type of Loader you might need to use a different type for the data rather than Cursor (unless your new loader also returns Cursors).

    Your callbacks should look something like

    @Override
    public Loader<MyDataType> onCreateLoader(int id, Bundle args) {
        return new MyCustomLoader(...);
    }
    
    @Override
    public void onLoadFinished(Loader<MyDataType> loader, MyDataType data) {
        myArrayAdapter.add(data.something()); // etc
    }
    
    @Override
    public void onLoaderReset(Loader<MyDataType> loader) {
         myArrayAdapter.clear();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I might be entirely off track now but here goes: Our webshop offers
This might be a stupid question but if there's a better or proper way
This might be simple or impossible ;-) Is there a way to restrict the
Might be subjective and/or discussion.. but here goes. I've been asked to estimate a
Well, the caption of the question might be a little off, but I didn't
A simple way to represent a graph is with a data structure of the
Kind sirs, I'm using Codeigniter to build a blog. I might need a way
What might be the best way to start programming using boost lambda libraries.
Is there any way to find out what exceptions might be thrown by any
I think I might be approaching this in the wrong way, so I would

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.