コード例 #1
0
 @Override
 public void onSourceStateChanged() {
   isLoadingError = mediaSource.getSource().getState() == ViewSourceState.LOAD_MORE_ERROR;
   isLoading = mediaSource.getSource().getState() == ViewSourceState.IN_PROGRESS || isLoadingError;
   if (records.size() == 0) {
     goneView(gridView);
     if (isLoading) {
       showView(loading);
       goneView(empty);
     } else {
       goneView(loading);
       showView(empty);
     }
   } else {
     showView(gridView);
     goneView(loading);
     goneView(empty);
   }
   adapter.notifyDataSetChanged();
 }
コード例 #2
0
 @Override
 public void onSourceDataChanged() {
   records = mediaSource.getSource().getCurrentWorkingSet();
   adapter.notifyDataSetChanged();
 }