Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a CursorLoader for Android API level <11

I have an application with many list activities (5-6 of them), and all of them have custom cursor adapters, from my own ContentProvider(2), sitting on an Sqlite database(2).

Now the problem, I want to implement CursorLoader (or like) class to load the cursors on background thread, below API level < 11, preferably 6 to 9..

I also want to show a ProgressSpinner, while the list is loading.

What to do, best, AsynTask? Thread? or write my own CursorLoader for <11, please help.

like image 626
himanshurb Avatar asked Feb 16 '26 13:02

himanshurb


1 Answers

You can use the Compatibility Library (Part of the SDK). It contains the Loader-Framework for Android API Level >= 4.

like image 130
thaussma Avatar answered Feb 19 '26 02:02

thaussma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!