當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。