当前位置: 首页>>代码示例>>Java>>正文


Java Request.begin方法代码示例

本文整理汇总了Java中com.bumptech.glide.request.Request.begin方法的典型用法代码示例。如果您正苦于以下问题:Java Request.begin方法的具体用法?Java Request.begin怎么用?Java Request.begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.bumptech.glide.request.Request的用法示例。


在下文中一共展示了Request.begin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runRequest

import com.bumptech.glide.request.Request; //导入方法依赖的package包/类
/**
 * Starts tracking the given request.
 */
public void runRequest(Request request) {
  requests.add(request);
  if (!isPaused) {
    request.begin();
  } else {
    pendingRequests.add(request);
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:RequestTracker.java

示例2: 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();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:RequestTracker.java

示例3: 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);
      }
    }
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:RequestTracker.java

示例4: into

import com.bumptech.glide.request.Request; //导入方法依赖的package包/类
private <Y extends Target<TranscodeType>> Y into(
    @NonNull Y target,
    @Nullable RequestListener<TranscodeType> targetListener,
    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, targetListener, 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()) {
      // Use the previous request rather than the new one to allow for optimizations like skipping
      // setting placeholders, tracking and untracking Targets, and obtaining View dimensions that
      // are done in the individual Request.
      previous.begin();
    }
    return target;
  }

  requestManager.clear(target);
  target.setRequest(request);
  requestManager.track(target, request);

  return target;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:36,代码来源:RequestBuilder.java


注:本文中的com.bumptech.glide.request.Request.begin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。