コード例 #1
0
 @Override
 public void onShow() {
   if (mDoctors == null
       || mDoctors.size() <= 0
       || SettingsUtils.getDoctorUpdateRequired(mActivity)) {
     if (mTask != null) mTask.cancel(true);
     mTask = new AllDoctorsAsyncTask(this.getActivity(), mHandler);
     mActivity.showLoader(null, null, true);
     mTask.execute();
   } else if (mRecyclerAdapter != null) {
     mRecyclerAdapter.addAll(mDoctors);
     mRecyclerAdapter.notifyDataSetChanged();
   }
 }
コード例 #2
0
 @Override
 public void onHide() {
   if (mTask != null) mTask.cancel(true);
 }