如何实现为Android API级别℃的CursorLoader 11 [英] How to implement a CursorLoader for Android API level <11

查看:241
本文介绍了如何实现为Android API级别℃的CursorLoader 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有许多活动列表(其中5-6)提出申请,并个个都定义光标适配器,从我自己的ContentProvider(2),坐SQLite数据库(2)上。

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).

现在的问题,我想实现CursorLoader(或类似)类加载在后台线程光标,低于API级别< 11,preferably 6-9 ..

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..

我也想显示ProgressSpinner,而列表加载。

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

做什么,最好的,AsynTask?线?或写我自己的CursorLoader LT&; 11,请大家帮忙

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

推荐答案

您可以使用兼容库(SDK的一部分)。它包含了装载机的框架为Android API级别> = 4。

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

这篇关于如何实现为Android API级别℃的CursorLoader 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆