Java 类com.bumptech.glide.request.transition.TransitionFactory 实例源码

项目:GitHub    文件:SingleRequest.java   
public static <R> SingleRequest<R> obtain(
    GlideContext glideContext,
    Object model,
    Class<R> transcodeClass,
    RequestOptions requestOptions,
    int overrideWidth,
    int overrideHeight,
    Priority priority,
    Target<R> target,
    RequestListener<R> requestListener,
    RequestCoordinator requestCoordinator,
    Engine engine,
    TransitionFactory<? super R> animationFactory) {
  @SuppressWarnings("unchecked") SingleRequest<R> request =
      (SingleRequest<R>) POOL.acquire();
  if (request == null) {
    request = new SingleRequest<>();
  }
  request.init(
      glideContext,
      model,
      transcodeClass,
      requestOptions,
      overrideWidth,
      overrideHeight,
      priority,
      target,
      requestListener,
      requestCoordinator,
      engine,
      animationFactory);
  return request;
}
项目:GitHub    文件:SingleRequest.java   
private void init(
    GlideContext glideContext,
    Object model,
    Class<R> transcodeClass,
    RequestOptions requestOptions,
    int overrideWidth,
    int overrideHeight,
    Priority priority,
    Target<R> target,
    RequestListener<R> requestListener,
    RequestCoordinator requestCoordinator,
    Engine engine,
    TransitionFactory<? super R> animationFactory) {
  this.glideContext = glideContext;
  this.model = model;
  this.transcodeClass = transcodeClass;
  this.requestOptions = requestOptions;
  this.overrideWidth = overrideWidth;
  this.overrideHeight = overrideHeight;
  this.priority = priority;
  this.target = target;
  this.requestListener = requestListener;
  this.requestCoordinator = requestCoordinator;
  this.engine = engine;
  this.animationFactory = animationFactory;
  status = Status.PENDING;
}
项目:GitHub    文件:SingleRequest.java   
public static <R> SingleRequest<R> obtain(
    Context context,
    GlideContext glideContext,
    Object model,
    Class<R> transcodeClass,
    RequestOptions requestOptions,
    int overrideWidth,
    int overrideHeight,
    Priority priority,
    Target<R> target,
    RequestListener<R> targetListener,
    RequestListener<R> requestListener,
    RequestCoordinator requestCoordinator,
    Engine engine,
    TransitionFactory<? super R> animationFactory) {
  @SuppressWarnings("unchecked") SingleRequest<R> request =
      (SingleRequest<R>) POOL.acquire();
  if (request == null) {
    request = new SingleRequest<>();
  }
  request.init(
      context,
      glideContext,
      model,
      transcodeClass,
      requestOptions,
      overrideWidth,
      overrideHeight,
      priority,
      target,
      targetListener,
      requestListener,
      requestCoordinator,
      engine,
      animationFactory);
  return request;
}
项目:GitHub    文件:SingleRequest.java   
private void init(
    Context context,
    GlideContext glideContext,
    Object model,
    Class<R> transcodeClass,
    RequestOptions requestOptions,
    int overrideWidth,
    int overrideHeight,
    Priority priority,
    Target<R> target,
    RequestListener<R> targetListener,
    RequestListener<R> requestListener,
    RequestCoordinator requestCoordinator,
    Engine engine,
    TransitionFactory<? super R> animationFactory) {
  this.context = context;
  this.glideContext = glideContext;
  this.model = model;
  this.transcodeClass = transcodeClass;
  this.requestOptions = requestOptions;
  this.overrideWidth = overrideWidth;
  this.overrideHeight = overrideHeight;
  this.priority = priority;
  this.target = target;
  this.targetListener = targetListener;
  this.requestListener = requestListener;
  this.requestCoordinator = requestCoordinator;
  this.engine = engine;
  this.animationFactory = animationFactory;
  status = Status.PENDING;
}
项目:GitHub    文件:BitmapTransitionOptions.java   
/**
 * Enables a any Drawable based animation to run on Bitmaps as well.
 */
public BitmapTransitionOptions transitionUsing(
    TransitionFactory<Drawable> drawableCrossFadeFactory) {
  return transition(new BitmapTransitionFactory(drawableCrossFadeFactory));
}
项目:GitHub    文件:TransitionOptions.java   
public final CHILD transition(TransitionFactory<? super TranscodeType> transitionFactory) {
  this.transitionFactory = Preconditions.checkNotNull(transitionFactory);
  return self();
}
项目:GitHub    文件:TransitionOptions.java   
final TransitionFactory<? super TranscodeType> getTransitionFactory() {
  return transitionFactory;
}
项目:GitHub    文件:BitmapTransitionOptions.java   
/**
 * Enables a any Drawable based animation to run on Bitmaps as well.
 */
public BitmapTransitionOptions transitionUsing(
    TransitionFactory<Drawable> drawableCrossFadeFactory) {
  return transition(new BitmapTransitionFactory(drawableCrossFadeFactory));
}
项目:GitHub    文件:TransitionOptions.java   
final TransitionFactory<? super TranscodeType> getTransitionFactory() {
  return transitionFactory;
}
项目:GitHub    文件:BitmapTransitionOptions.java   
/**
 * Returns a {@link BitmapTransitionOptions} object that enables a any animation
 * that is possible on drawables.
 *
 * @see #transitionUsing(TransitionFactory)
 */
public static BitmapTransitionOptions withWrapped(
    TransitionFactory<Drawable> drawableCrossFadeFactory) {
  return new BitmapTransitionOptions().transitionUsing(drawableCrossFadeFactory);
}
项目:GitHub    文件:BitmapTransitionOptions.java   
/**
 * Returns a {@link BitmapTransitionOptions} object that uses the given transition factory.
 *
 * @see com.bumptech.glide.GenericTransitionOptions#with(TransitionFactory)
 */
public static BitmapTransitionOptions with(
    TransitionFactory<Bitmap> transitionFactory) {
  return new BitmapTransitionOptions().transition(transitionFactory);
}
项目:GitHub    文件:DrawableTransitionOptions.java   
/**
 * Returns a {@link DrawableTransitionOptions} object that uses the given transition factory.
 *
 * @see com.bumptech.glide.GenericTransitionOptions#with(TransitionFactory)
 */
public static DrawableTransitionOptions with(
    TransitionFactory<Drawable> transitionFactory) {
  return new DrawableTransitionOptions().transition(transitionFactory);
}
项目:GitHub    文件:GenericTransitionOptions.java   
/**
 * Returns a typed {@link GenericTransitionOptions} object that uses the given transition factory.
 *
 * @see GenericTransitionOptions#transition(TransitionFactory)
 */
public static <TranscodeType> GenericTransitionOptions<TranscodeType> with(
    TransitionFactory<? super TranscodeType> transitionFactory) {
  return new GenericTransitionOptions<TranscodeType>().transition(transitionFactory);
}
项目:GitHub    文件:BitmapTransitionOptions.java   
/**
 * Returns a {@link BitmapTransitionOptions} object that enables a any animation
 * that is possible on drawables.
 *
 * @see #transitionUsing(TransitionFactory)
 */
public static BitmapTransitionOptions withWrapped(
    TransitionFactory<Drawable> drawableCrossFadeFactory) {
  return new BitmapTransitionOptions().transitionUsing(drawableCrossFadeFactory);
}
项目:GitHub    文件:BitmapTransitionOptions.java   
/**
 * Returns a {@link BitmapTransitionOptions} object that uses the given transition factory.
 *
 * @see com.bumptech.glide.GenericTransitionOptions#with(TransitionFactory)
 */
public static BitmapTransitionOptions with(
    TransitionFactory<Bitmap> transitionFactory) {
  return new BitmapTransitionOptions().transition(transitionFactory);
}
项目:GitHub    文件:DrawableTransitionOptions.java   
/**
 * Returns a {@link DrawableTransitionOptions} object that uses the given transition factory.
 *
 * @see com.bumptech.glide.GenericTransitionOptions#with(TransitionFactory)
 */
public static DrawableTransitionOptions with(
    TransitionFactory<Drawable> transitionFactory) {
  return new DrawableTransitionOptions().transition(transitionFactory);
}
项目:GitHub    文件:TransitionOptions.java   
/**
 * Uses the given {@link TransitionFactory} to build a
 * {@link com.bumptech.glide.request.transition.Transition} for each request started with these
 * {@code TransitionOptions}.
 *
 * @return This request builder.
 */
public final CHILD transition(TransitionFactory<? super TranscodeType> transitionFactory) {
  this.transitionFactory = Preconditions.checkNotNull(transitionFactory);
  return self();
}
项目:GitHub    文件:GenericTransitionOptions.java   
/**
 * Returns a typed {@link GenericTransitionOptions} object that uses the given transition factory.
 *
 * @see GenericTransitionOptions#transition(TransitionFactory)
 */
public static <TranscodeType> GenericTransitionOptions<TranscodeType> with(
    TransitionFactory<? super TranscodeType> transitionFactory) {
  return new GenericTransitionOptions<TranscodeType>().transition(transitionFactory);
}