Java 类com.bumptech.glide.request.target.ImageViewTargetFactory 实例源码

项目:GitHub    文件:GlideContext.java   
public GlideContext(
    Context context,
    ArrayPool arrayPool,
    Registry registry,
    ImageViewTargetFactory imageViewTargetFactory,
    RequestOptions defaultRequestOptions,
    Map<Class<?>, TransitionOptions<?, ?>> defaultTransitionOptions,
    Engine engine,
    int logLevel) {
  super(context.getApplicationContext());
  this.arrayPool = arrayPool;
  this.registry = registry;
  this.imageViewTargetFactory = imageViewTargetFactory;
  this.defaultRequestOptions = defaultRequestOptions;
  this.defaultTransitionOptions = defaultTransitionOptions;
  this.engine = engine;
  this.logLevel = logLevel;

  mainHandler = new Handler(Looper.getMainLooper());
}
项目:GitHub    文件:GlideContext.java   
public GlideContext(Context context, Registry registry,
    ImageViewTargetFactory imageViewTargetFactory, RequestOptions defaultRequestOptions,
    Engine engine, ComponentCallbacks2 componentCallbacks, int logLevel) {
  super(context.getApplicationContext());
  this.registry = registry;
  this.imageViewTargetFactory = imageViewTargetFactory;
  this.defaultRequestOptions = defaultRequestOptions;
  this.engine = engine;
  this.componentCallbacks = componentCallbacks;
  this.logLevel = logLevel;

  mainHandler = new Handler(Looper.getMainLooper());
}
项目:GitHub    文件:GlideContextTest.java   
@Before
public void setUp() {
  Application app = RuntimeEnvironment.application;

  transitionOptions = new HashMap<>();
  context = new GlideContext(
      app,
      new LruArrayPool(),
      new Registry(),
      new ImageViewTargetFactory(),
      new RequestOptions(),
      transitionOptions,
      mock(Engine.class),
      Log.DEBUG);
}