尝试实现 LoaderManager + CursorLoader。
在 onFinish 方法中适配器应该交换它的光标
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
// Swap the new cursor in. (The framework will take care of closing the
// old cursor once we return.)
mAdapter.swapCursor(data);
}
但是 swapCursor 从 API 级别 11 开始可用。
那么我应该如何在 android API 10 中交换光标?
最佳答案
关于android - SimpleCursorAdapter,在 API 级别低于 11 时交换游标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11028437/