本文整理汇总了Java中com.bumptech.glide.request.Request.isCancelled方法的典型用法代码示例。如果您正苦于以下问题:Java Request.isCancelled方法的具体用法?Java Request.isCancelled怎么用?Java Request.isCancelled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bumptech.glide.request.Request
的用法示例。
在下文中一共展示了Request.isCancelled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resumeRequests
import com.bumptech.glide.request.Request; //导入方法依赖的package包/类
/**
* Starts any not yet completed or failed requests.
*/
public void resumeRequests() {
isPaused = false;
for (Request request : Util.getSnapshot(requests)) {
if (!request.isComplete() && !request.isCancelled() && !request.isRunning()) {
request.begin();
}
}
pendingRequests.clear();
}
示例2: restartRequests
import com.bumptech.glide.request.Request; //导入方法依赖的package包/类
/**
* Restarts failed requests and cancels and restarts in progress requests.
*/
public void restartRequests() {
for (Request request : Util.getSnapshot(requests)) {
if (!request.isComplete() && !request.isCancelled()) {
// Ensure the request will be restarted in onResume.
request.pause();
if (!isPaused) {
request.begin();
} else {
pendingRequests.add(request);
}
}
}
}