com.bumptech.glide.RequestBuilder.buildRequest()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(86)

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

RequestBuilder.buildRequest介绍

暂无

代码示例

代码示例来源:origin: bumptech/glide

Request request = buildRequest(target, targetListener, options, callbackExecutor);

代码示例来源:origin: mozilla-tw/Rocket

private <Y extends Target<TranscodeType>> Y into(@NonNull Y target, RequestOptions options) {
 Util.assertMainThread();
 Preconditions.checkNotNull(target);
 if (!isModelSet) {
  throw new IllegalArgumentException("You must call #load() before calling #into()");
 }
 options = options.autoClone();
 Request request = buildRequest(target, options);
 Request previous = target.getRequest();
 if (request.isEquivalentTo(previous)) {
  request.recycle();
  // If the request is completed, beginning again will ensure the result is re-delivered,
  // triggering RequestListeners and Targets. If the request is failed, beginning again will
  // restart the request, giving it another chance to complete. If the request is already
  // running, we can let it continue running without interruption.
  if (!Preconditions.checkNotNull(previous).isRunning()) {
   previous.begin();
  }
  return target;
 }
 requestManager.clear(target);
 target.setRequest(request);
 requestManager.track(target, request);
 return target;
}

相关文章