@Override
 public void onLoaderReset(Loader<Cursor> loader) {
   // This is called when the last Cursor provided to onLoadFinished()
   // above is about to be closed. We need to make sure we are no
   // longer using it.
   mSchedules.swapCursor(null);
 }
 public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
   if (getActivity() == null) {
     return;
   }
   mAdapter.swapCursor(cursor);
   setLoadingViewVisible(false);
 }
 public void onLoaderReset(Loader<Cursor> loader) {
   mAdapter.swapCursor(null);
 }
 @Override
 public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
   // Swap the new cursor in. (The framework will take care of closing the
   // old cursor once we return.)
   mSchedules.swapCursor(cursor);
 }