コード例 #1
0
  @Override
  public void onDetach() {
    super.onDetach();
    if (task != null) task.cancel(true);

    if (removeTask != null) removeTask.cancel(true);
  }
コード例 #2
0
 public void clear() {
   ArrayList<String> deletedList = new ArrayList<String>();
   deletedList.addAll(list);
   list.clear();
   adapter.notifyDataSetChanged();
   if (Utility.isTaskStopped(removeTask)) {
     removeTask = new RemoveFilterDBTask(deletedList);
     removeTask.executeOnExecutor(MyAsyncTask.THREAD_POOL_EXECUTOR);
   }
 }