Questions tagged [android-loadermanager]

An abstract class associated with an Activity or Fragment for managing one or more Loader instances. This helps an application manage longer-running operations in conjunction with the Activity or Fragment lifecycle; 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.

Interface associated with an Activity or Fragment for managing one or more Loader instances associated with it. This helps an application manage longer-running operations in conjunction with the Activity or Fragment lifecycle; 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.

While the LoaderManager API was introduced in HONEYCOMB, a version of the API at is also available for use on older platforms through FragmentActivity.

There is only one LoaderManager per activity or fragment. But a LoaderManager can have multiple loaders.

Useful links

394 questions
0
votes
1 answer

android not maintaining the correct loader state on orientation change when multiple loaders are used with loader manager

I am using 4 loaders in my application to load data into a listview. When I change the orientation the loader manager always tries to load the first loader. To solve this issue I am restarting the loader in "onResume" of the application. Now the…
Nick
  • 185
  • 1
  • 12
0
votes
1 answer

LoaderManager and java.lang.NullPointerException error

I am studying to fragmentation in android, I write this simple program: In this application I want to create a list view and I won't create a background thread, this thread write in a log file This is main Activity public class MainActivity extends…
Ant
  • 281
  • 1
  • 4
  • 19
0
votes
1 answer

Android Activity ListView LoaderManager Navigation with remembering previous state

I have my launcher activity which generates a ListView. Now on the ListView I have a setOnItemClickListener which will basically pass the position and the id to a new activity. mList.setOnItemClickListener(new AdapterView.OnItemClickListener() { …
Springy
  • 588
  • 5
  • 15
0
votes
1 answer

AsyncTaskLoader with Dialogs, Is it feasible?

I started an new app and I wanted to use the latest patterns and guidelines for android, one of those is to use Loaders (AsyncTaskLoader) instead of AsyncTasks, I'm trying to see if Loaders are suposed to really replace all your AsyncTasks "tasks"…
0
votes
1 answer

AsyncTaskLoader third task disappears

I'm trying to implement a list/detail workflow where a tap on a list item causes the detail section to load data related to the newly selected row. I'm trying to use an AsyncTaskLoader to accomplish this. I'm running into a problem where if I tap…
0
votes
2 answers

Android Combine ImageDownload with CursorLoader

I am using a very simple CursorLoader with an ImageDownloader. The ImageDownloader is running and everything but the CursorLoader finishes, and THEN the ImageDownloader begins its job of downloading the images, but the GridView is not updating with…
0
votes
1 answer

Android SherlockFragmentActivity with multiple ListFragments

I have an SherlockFragmentActivity that is showing a few tabs. Each tab is ListFragment. Each ListFragment is getting created like so: ActionBar bar =…
0
votes
1 answer

"No such column found" with multiple Loader in LoaderManager and MediaStore

From the title of a music, a try toget the corresponding Artist, ALbum's name and Album's Cover. I use LoaderManager and CursorLoader. When the Activity is created I lunch the loader with getLoaderManager().initLoader(1, null, this). Here is the…
Jecimi
  • 4,113
  • 7
  • 31
  • 40
0
votes
1 answer

Why is my LoaderManager/CursorLoader combo not working correctly in displaying a database query in a ListView?

I have been working all day on this, and have been trying to understand how it all fits together and reworking my code to fit together well. So I will show you what I have. There is no error, just blank. MyAgendaLoaderManager.java: public class…
Andy
  • 10,553
  • 21
  • 75
  • 125
0
votes
1 answer

LoaderManager get data offline, then online

I would like to follow this nice usability pattern, where app stores data offline for faster response and updates it when it gets new data online. And I use Loaders with LoaderManager. Now, what is the correct approach to implement the…
-1
votes
2 answers

Problem using LoaderManager.LoaderCallbacks with custom RecyclerView.Adapter

I have tried loading the list using the ListView along with LoaderManager.LoaderCallbacks and custom CursorAdapter and it works fine. But I am trying to accomplish the same using RecyclerView along with custom RecyclerView.Adapter but I am getting…
-1
votes
1 answer

Android Studio doesn't accept "this" as LoaderCallBack argument inside OnRefreshListener

I am trying to add Swipe Refresh Layout to my fragment. I am using AsyncTaskLoader to load data. While setting the Refresh Layout's OnRefreshListener, I want to restart the loader to load new data (or else should I do different thing) but I can't…
-1
votes
1 answer

Resources inside Loader's loadInBackground()?

As far as I know, I can't hold reference to the activity's context inside a Loader. Is there a safe way to get resources inside Loader's loadInBackground() method?
-1
votes
1 answer

Load data from db using content provider

I am using content providers to store and retrieve data from Database. This is what happening in the app when user install the app. App start a service which will download data from server and store it in db App is using CursorLoader to load data…
-2
votes
2 answers

Loader is still alive after onDestroy

So from the documentation for Loaders it says that LoaderManager destroys the loaders when the Activity or Fragment is destroyed, but the activity callback onDestoy() is called when the screen is rotated. But the loader still retains it's data…
umbasa07
  • 51
  • 1
  • 4
1 2 3
26
27