How to implement a CursorLoader for Android API level <11

本小妞迷上赌 提交于 2019-12-12 15:03:58

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/7833860/how-to-implement-a-cursorloader-for-android-api-level-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!