android.support.v4.content.AsyncTaskLoader.onCanceled()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中android.support.v4.content.AsyncTaskLoader.onCanceled()方法的一些代码示例,展示了AsyncTaskLoader.onCanceled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncTaskLoader.onCanceled()方法的具体详情如下:
包路径:android.support.v4.content.AsyncTaskLoader
类名称:AsyncTaskLoader
方法名:onCanceled

AsyncTaskLoader.onCanceled介绍

[英]Called if the task was canceled before it was completed. Gives the class a chance to properly dispose of the result.
[中]如果任务在完成前已取消,则调用。使类有机会正确处理结果。

代码示例

代码示例来源:origin: SimonMarquis/Android-SecretCodes

@Override
public void onCanceled(List<SecretCode> codes) {
  super.onCanceled(codes);
}

代码示例来源:origin: livroandroid/5ed

@Override
public void onCanceled(Bitmap data) {
  super.onCanceled(data);
  Log.d("livroandroid", "loader onCanceled()");
}

代码示例来源:origin: QuickBlox/q-municate-android

@Override
public void onCanceled(T objectsList) {
  Log.i(TAG, "+++ onCanceled() called! +++");
  this.objectsList = objectsList;
  // Attempt to cancel the current asynchronous load.
  super.onCanceled(objectsList);
}

代码示例来源:origin: com.google.android/support-v4

void dispatchOnCancelled(LoadTask task, D data) {
  onCanceled(data);
  if (mCancellingTask == task) {
    if (DEBUG) Log.v(TAG, "Cancelled task is now canceled!");
    mLastLoadCompleteTime = SystemClock.uptimeMillis();
    mCancellingTask = null;
    executePendingTask();
  }
}

代码示例来源:origin: Cleveroad/MusicBobber

/**
 * Handles a request to cancel a load.
 */
@Override
public void onCanceled(T data) {
  super.onCanceled(data);
  // At this point we can release the resources associated with 'apps'
  // if needed.
  onReleaseResources(data);
}

代码示例来源:origin: n76/wifi_backend

@Override
public void onCanceled(Cursor cursor) {
  super.onCanceled(cursor);
  if (cursor != null && !cursor.isClosed()) {
    cursor.close();
  }
}

代码示例来源:origin: arnabc/simplelauncher

@Override
public void onCanceled(ArrayList<AppModel> apps) {
  super.onCanceled(apps);
  // At this point we can release the resources associated with 'apps'
  // if needed.
  onReleaseResources(apps);
}

代码示例来源:origin: Cleveroad/PlayWidget

/**
 * Handles a request to cancel a load.
 */
@Override
public void onCanceled(T data) {
  super.onCanceled(data);
  // At this point we can release the resources associated with 'apps'
  // if needed.
  onReleaseResources(data);
}

代码示例来源:origin: Calsign/APDE

@Override
public void onCanceled(List<File> data) {
  super.onCanceled(data);
  onReleaseResources(data);
}

代码示例来源:origin: tupunco/tup.dota2recipe

@Override
public void onCanceled(List<D> cList) {
  super.onCanceled(cList);
  onReleaseResources(cList);
}

代码示例来源:origin: kingargyle/adt-leanback-support

void dispatchOnCancelled(LoadTask task, D data) {
  onCanceled(data);
  if (mCancellingTask == task) {
    if (DEBUG) Log.v(TAG, "Cancelled task is now canceled!");
    rollbackContentChanged();
    mLastLoadCompleteTime = SystemClock.uptimeMillis();
    mCancellingTask = null;
    executePendingTask();
  }
}

代码示例来源:origin: com.google.android/support-v4

void dispatchOnLoadComplete(LoadTask task, D data) {
  if (mTask != task) {
    if (DEBUG) Log.v(TAG, "Load complete of old task, trying to cancel");
    dispatchOnCancelled(task, data);
  } else {
    if (isAbandoned()) {
      // This cursor has been abandoned; just cancel the new data.
      onCanceled(data);
    } else {
      mLastLoadCompleteTime = SystemClock.uptimeMillis();
      mTask = null;
      if (DEBUG) Log.v(TAG, "Delivering result");
      deliverResult(data);
    }
  }
}

代码示例来源:origin: kingargyle/adt-leanback-support

void dispatchOnLoadComplete(LoadTask task, D data) {
  if (mTask != task) {
    if (DEBUG) Log.v(TAG, "Load complete of old task, trying to cancel");
    dispatchOnCancelled(task, data);
  } else {
    if (isAbandoned()) {
      // This cursor has been abandoned; just cancel the new data.
      onCanceled(data);
    } else {
      commitContentChanged();
      mLastLoadCompleteTime = SystemClock.uptimeMillis();
      mTask = null;
      if (DEBUG) Log.v(TAG, "Delivering result");
      deliverResult(data);
    }
  }
}

代码示例来源:origin: stackoverflow.com

onCanceled(data);
if (mCancellingTask == task) {
  if (DEBUG) Log.v(TAG, "Cancelled task is now canceled!");
  if (isAbandoned()) {
    onCanceled(data);
  } else {
    commitContentChanged();

相关文章