@Override public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) { mArtistCursorAdapter.swapCursor(cursor); if (mPosition != ListView.INVALID_POSITION) { // If we don't need to restart the loader, and there's a desired position to restore // to, do so now. mListView.smoothScrollToPosition(mPosition); } }
@Override public void onLoaderReset(Loader<Cursor> loader) { mArtistCursorAdapter.swapCursor(null); }