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; }
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; }
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; }
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; }
/** * Enables a any Drawable based animation to run on Bitmaps as well. */ public BitmapTransitionOptions transitionUsing( TransitionFactory<Drawable> drawableCrossFadeFactory) { return transition(new BitmapTransitionFactory(drawableCrossFadeFactory)); }
public final CHILD transition(TransitionFactory<? super TranscodeType> transitionFactory) { this.transitionFactory = Preconditions.checkNotNull(transitionFactory); return self(); }
final TransitionFactory<? super TranscodeType> getTransitionFactory() { return transitionFactory; }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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(); }