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


Java DrawableFactory类代码示例

本文整理汇总了Java中com.facebook.imagepipeline.drawable.DrawableFactory的典型用法代码示例。如果您正苦于以下问题:Java DrawableFactory类的具体用法?Java DrawableFactory怎么用?Java DrawableFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: init

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
public void init(
    Resources resources,
    DeferredReleaser deferredReleaser,
    DrawableFactory animatedDrawableFactory,
    Executor uiThreadExecutor,
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    @Nullable ImmutableList<DrawableFactory> drawableFactories,
    @Nullable Supplier<Boolean> debugOverlayEnabledSupplier) {
  mResources = resources;
  mDeferredReleaser = deferredReleaser;
  mAnimatedDrawableFactory = animatedDrawableFactory;
  mUiThreadExecutor = uiThreadExecutor;
  mMemoryCache = memoryCache;
  mDrawableFactories = drawableFactories;
  mDebugOverlayEnabledSupplier = debugOverlayEnabledSupplier;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:PipelineDraweeControllerFactory.java

示例2: newController

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
public PipelineDraweeController newController(
    Supplier<DataSource<CloseableReference<CloseableImage>>> dataSourceSupplier,
    String id,
    CacheKey cacheKey,
    Object callerContext,
    @Nullable ImmutableList<DrawableFactory> customDrawableFactories) {
  Preconditions.checkState(mResources != null, "init() not called");
  // Field values passed as arguments so that any subclass of PipelineDraweeControllerFactory
  // can simply override internalCreateController() and return a custom Drawee controller
  PipelineDraweeController controller = internalCreateController(
      mResources,
      mDeferredReleaser,
      mAnimatedDrawableFactory,
      mUiThreadExecutor,
      mMemoryCache,
      mDrawableFactories,
      customDrawableFactories,
      dataSourceSupplier,
      id,
      cacheKey,
      callerContext);
  if (mDebugOverlayEnabledSupplier != null) {
    controller.setDrawDebugOverlay(mDebugOverlayEnabledSupplier.get());
  }
  return controller;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:27,代码来源:PipelineDraweeControllerFactory.java

示例3: internalCreateController

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
protected PipelineDraweeController internalCreateController(
    Resources resources,
    DeferredReleaser deferredReleaser,
    DrawableFactory animatedDrawableFactory,
    Executor uiThreadExecutor,
    MemoryCache<CacheKey, CloseableImage> memoryCache,
    @Nullable ImmutableList<DrawableFactory> globalDrawableFactories,
    @Nullable ImmutableList<DrawableFactory> customDrawableFactories,
    Supplier<DataSource<CloseableReference<CloseableImage>>> dataSourceSupplier,
    String id,
    CacheKey cacheKey,
    Object callerContext) {
  PipelineDraweeController controller = new PipelineDraweeController(
      resources,
      deferredReleaser,
      animatedDrawableFactory,
      uiThreadExecutor,
      memoryCache,
      dataSourceSupplier,
      id,
      cacheKey,
      callerContext,
      globalDrawableFactories);
  controller.setCustomDrawableFactories(customDrawableFactories);
  return controller;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:27,代码来源:PipelineDraweeControllerFactory.java

示例4: PipelineDraweeController

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
public PipelineDraweeController(
        Resources resources,
        DeferredReleaser deferredReleaser,
        DrawableFactory animatedDrawableFactory,
        Executor uiThreadExecutor,
        MemoryCache<CacheKey, CloseableImage> memoryCache,
        Supplier<DataSource<CloseableReference<CloseableImage>>> dataSourceSupplier,
        String id,
        CacheKey cacheKey,
        Object callerContext) {
  this(
      resources,
      deferredReleaser,
      animatedDrawableFactory,
      uiThreadExecutor,
      memoryCache,
      dataSourceSupplier,
      id,
      cacheKey,
      callerContext,
      null);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:23,代码来源:PipelineDraweeController.java

示例5: maybeCreateDrawableFromFactories

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
private Drawable maybeCreateDrawableFromFactories(
    @Nullable ImmutableList<DrawableFactory> drawableFactories,
    CloseableImage closeableImage) {
  if (drawableFactories == null) {
    return null;
  }
  for (DrawableFactory factory : drawableFactories) {
    if (factory.supportsImageType(closeableImage)) {
      Drawable drawable = factory.createDrawable(closeableImage);
      if (drawable != null) {
        return drawable;
      }
    }
  }
  return null;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:PipelineDraweeController.java

示例6: addCustomDrawableFactory

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
/**
 * Add a custom drawable factory that will be used to create
 * Drawables for {@link com.facebook.imagepipeline.image.CloseableImage}s.
 *
 * @param factory the factory to use
 * @return the builder
 */
public Builder addCustomDrawableFactory(DrawableFactory factory) {
  if (mCustomDrawableFactories == null) {
    mCustomDrawableFactories = new ArrayList<>();
  }
  mCustomDrawableFactories.add(factory);
  return this;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:DraweeConfig.java

示例7: initialize

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
/**
 * Initializes this controller with the new data source supplier, id and caller context. This
 * allows for reusing of the existing controller instead of instantiating a new one. This method
 * should be called when the controller is in detached state.
 *
 * @param dataSourceSupplier data source supplier
 * @param id unique id for this controller
 * @param callerContext tag and context for this controller
 */
public void initialize(
    Supplier<DataSource<CloseableReference<CloseableImage>>> dataSourceSupplier,
    String id,
    CacheKey cacheKey,
    Object callerContext,
    @Nullable ImmutableList<DrawableFactory> customDrawableFactories) {
  super.initialize(id, callerContext);
  init(dataSourceSupplier);
  mCacheKey = cacheKey;
  setCustomDrawableFactories(customDrawableFactories);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:PipelineDraweeController.java

示例8: getAnimatedDrawableFactory

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
@Nullable
@Override
public DrawableFactory getAnimatedDrawableFactory(Context context) {
  if (mAnimatedDrawableFactory == null) {
    mAnimatedDrawableFactory = createDrawableFactory();
  }
  return mAnimatedDrawableFactory;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:AnimatedFactoryV2Impl.java

示例9: setCustomDrawableFactories

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
public PipelineDraweeControllerBuilder setCustomDrawableFactories(
    @Nullable ImmutableList<DrawableFactory> customDrawableFactories) {
  mCustomDrawableFactories = customDrawableFactories;
  return getThis();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:PipelineDraweeControllerBuilder.java

示例10: setCustomDrawableFactory

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
public PipelineDraweeControllerBuilder setCustomDrawableFactory(DrawableFactory drawableFactory) {
  Preconditions.checkNotNull(drawableFactory);
  return setCustomDrawableFactories(ImmutableList.of(drawableFactory));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:PipelineDraweeControllerBuilder.java

示例11: getCustomDrawableFactories

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
@Nullable
public ImmutableList<DrawableFactory> getCustomDrawableFactories() {
  return mCustomDrawableFactories;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:DraweeConfig.java

示例12: setCustomDrawableFactories

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
public void setCustomDrawableFactories(
    @Nullable ImmutableList<DrawableFactory> customDrawableFactories) {
  mCustomDrawableFactories = customDrawableFactories;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:PipelineDraweeController.java

示例13: getAnimatedDrawableFactory

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
@Nullable
public DrawableFactory getAnimatedDrawableFactory(Context context) {
  AnimatedFactory animatedFactory = getAnimatedFactory();
  return animatedFactory == null ? null : animatedFactory.getAnimatedDrawableFactory(context);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:ImagePipelineFactory.java

示例14: createDrawableFactory

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
public static DrawableFactory createDrawableFactory() {
  return new KeyframesDrawableFactory();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:KeyframesDecoderExample.java

示例15: getAnimatedDrawableFactory

import com.facebook.imagepipeline.drawable.DrawableFactory; //导入依赖的package包/类
@Nullable DrawableFactory getAnimatedDrawableFactory(Context context); 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:2,代码来源:AnimatedFactory.java


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