@Override
 public void onLoadFinished(
     Loader<List<TrackedEntityInstanceRow>> loader, List<TrackedEntityInstanceRow> data) {
   if (LOADER_ID == loader.getId()) {
     mProgressBar.setVisibility(View.GONE);
     mAdapter.setData(data);
     mAdapter.swapData(data);
   }
 }
 private void handleViews(int level) {
   mAdapter.swapData(null);
   switch (level) {
     case 0:
       mRegisterEventButton.hide();
       mUpcomingEventsButton.hide();
       break;
     case 1:
       mRegisterEventButton.show();
       mUpcomingEventsButton.show();
   }
 }
 @Override
 public void onLoaderReset(Loader<List<TrackedEntityInstanceRow>> loader) {
   mAdapter.swapData(null);
 }