本文整理汇总了Java中com.bumptech.glide.request.ResourceCallback.onLoadFailed方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceCallback.onLoadFailed方法的具体用法?Java ResourceCallback.onLoadFailed怎么用?Java ResourceCallback.onLoadFailed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bumptech.glide.request.ResourceCallback
的用法示例。
在下文中一共展示了ResourceCallback.onLoadFailed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleExceptionOnMainThread
import com.bumptech.glide.request.ResourceCallback; //导入方法依赖的package包/类
@Synthetic
void handleExceptionOnMainThread() {
stateVerifier.throwIfRecycled();
if (isCancelled) {
release(false /*isRemovedFromQueue*/);
return;
} else if (cbs.isEmpty()) {
throw new IllegalStateException("Received an exception without any callbacks to notify");
} else if (hasLoadFailed) {
throw new IllegalStateException("Already failed once");
}
hasLoadFailed = true;
listener.onEngineJobComplete(key, null);
for (ResourceCallback cb : cbs) {
if (!isInIgnoredCallbacks(cb)) {
cb.onLoadFailed(exception);
}
}
release(false /*isRemovedFromQueue*/);
}
示例2: addCallback
import com.bumptech.glide.request.ResourceCallback; //导入方法依赖的package包/类
public void addCallback(ResourceCallback cb) {
Util.assertMainThread();
stateVerifier.throwIfRecycled();
if (hasResource) {
cb.onResourceReady(engineResource, dataSource);
} else if (hasLoadFailed) {
cb.onLoadFailed(exception);
} else {
cbs.add(cb);
}
}
示例3: addCallback
import com.bumptech.glide.request.ResourceCallback; //导入方法依赖的package包/类
void addCallback(ResourceCallback cb) {
Util.assertMainThread();
stateVerifier.throwIfRecycled();
if (hasResource) {
cb.onResourceReady(engineResource, dataSource);
} else if (hasLoadFailed) {
cb.onLoadFailed(exception);
} else {
cbs.add(cb);
}
}