Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SimpleCursorAdapter, Swapping cursor in API level below 11

Trying to implement LoaderManager + CursorLoader.

In onFinish method adapter should swap its cursor

  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);
  }

But swapCursor is available since API Level 11.

So how should I swap cursor in android API 10 ?

like image 646
Jim Avatar asked Jun 14 '12 07:06

Jim


1 Answers

Compatibility Library has needed implementations.

It's http://developer.android.com/reference/android/support/v4/widget/SimpleCursorAdapter.html

like image 87
pawelzieba Avatar answered Sep 22 '22 10:09

pawelzieba