Java 类com.facebook.drawee.controller.AbstractDraweeControllerBuilder 实例源码

项目:RNLearn_Project1    文件:DraweeRequestHelper.java   
DraweeRequestHelper(
    ImageRequest imageRequest,
    @Nullable ImageRequest cachedImageRequest,
    ControllerListener listener) {
  AbstractDraweeControllerBuilder controllerBuilder = sControllerBuilder
      .setImageRequest(imageRequest)
      .setCallerContext(RCTImageView.getCallerContext())
      .setControllerListener(listener);

  if (cachedImageRequest != null) {
    controllerBuilder.setLowResImageRequest(cachedImageRequest);
  }
  DraweeController controller = controllerBuilder.build();

  controller.setHierarchy(sHierarchyBuilder.build());

  mDraweeController = controller;
}
项目:RNLearn_Project1    文件:FrescoBasedReactTextInlineImageSpan.java   
public FrescoBasedReactTextInlineImageSpan(
    Resources resources,
    int height,
    int width,
    @Nullable Uri uri,
    ReadableMap headers,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  mDraweeHolder = new DraweeHolder(
      GenericDraweeHierarchyBuilder.newInstance(resources)
          .build()
  );
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;

  mHeight = height;
  mWidth = width;
  mUri = (uri != null) ? uri : Uri.EMPTY;
  mHeaders = headers;
}
项目:RNLearn_Project1    文件:DraweeRequestHelper.java   
DraweeRequestHelper(
    ImageRequest imageRequest,
    @Nullable ImageRequest cachedImageRequest,
    ControllerListener listener) {
  AbstractDraweeControllerBuilder controllerBuilder = sControllerBuilder
      .setImageRequest(imageRequest)
      .setCallerContext(RCTImageView.getCallerContext())
      .setControllerListener(listener);

  if (cachedImageRequest != null) {
    controllerBuilder.setLowResImageRequest(cachedImageRequest);
  }
  DraweeController controller = controllerBuilder.build();

  controller.setHierarchy(sHierarchyBuilder.build());

  mDraweeController = controller;
}
项目:RNLearn_Project1    文件:FrescoBasedReactTextInlineImageSpan.java   
public FrescoBasedReactTextInlineImageSpan(
    Resources resources,
    int height,
    int width,
    @Nullable Uri uri,
    ReadableMap headers,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  mDraweeHolder = new DraweeHolder(
      GenericDraweeHierarchyBuilder.newInstance(resources)
          .build()
  );
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;

  mHeight = height;
  mWidth = width;
  mUri = (uri != null) ? uri : Uri.EMPTY;
  mHeaders = headers;
}
项目:ReactNativeSignatureExample    文件:FrescoBasedReactTextInlineImageSpan.java   
public FrescoBasedReactTextInlineImageSpan(
    Resources resources,
    int height,
    int width,
    @Nullable Uri uri,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  mDraweeHolder = new DraweeHolder(
      GenericDraweeHierarchyBuilder.newInstance(resources)
          .build()
  );
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;

  mHeight = height;
  mWidth = width;
  mUri = (uri != null) ? uri : Uri.EMPTY;
}
项目:react-native-ibeacon-android    文件:FrescoBasedReactTextInlineImageSpan.java   
public FrescoBasedReactTextInlineImageSpan(
    Resources resources,
    int height,
    int width,
    @Nullable Uri uri,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  mDraweeHolder = new DraweeHolder(
      GenericDraweeHierarchyBuilder.newInstance(resources)
          .build()
  );
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;

  mHeight = height;
  mWidth = width;
  mUri = (uri != null) ? uri : Uri.EMPTY;
}
项目:react-native-box-loaders    文件:FrescoBasedReactTextInlineImageSpan.java   
public FrescoBasedReactTextInlineImageSpan(
    Resources resources,
    int height,
    int width,
    @Nullable Uri uri,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  mDraweeHolder = new DraweeHolder(
      GenericDraweeHierarchyBuilder.newInstance(resources)
          .build()
  );
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;

  mHeight = height;
  mWidth = width;
  mUri = (uri != null) ? uri : Uri.EMPTY;
}
项目:Ironman    文件:FrescoBasedReactTextInlineImageSpan.java   
public FrescoBasedReactTextInlineImageSpan(
    Resources resources,
    int height,
    int width,
    @Nullable Uri uri,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  mDraweeHolder = new DraweeHolder(
      GenericDraweeHierarchyBuilder.newInstance(resources)
          .build()
  );
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;

  mHeight = height;
  mWidth = width;
  mUri = (uri != null) ? uri : Uri.EMPTY;
}
项目:GitHub    文件:PipelineDraweeControllerBuilder.java   
public static ImageRequest.RequestLevel convertCacheLevelToRequestLevel(
    AbstractDraweeControllerBuilder.CacheLevel cacheLevel) {
  switch (cacheLevel) {
    case FULL_FETCH:
      return ImageRequest.RequestLevel.FULL_FETCH;
    case DISK_CACHE:
      return ImageRequest.RequestLevel.DISK_CACHE;
    case BITMAP_MEMORY_CACHE:
      return ImageRequest.RequestLevel.BITMAP_MEMORY_CACHE;
    default:
      throw new RuntimeException("Cache level" + cacheLevel + "is not supported. ");
  }
}
项目:GitHub    文件:VolleyDataSource.java   
public VolleyDataSource(
    final ImageLoader imageLoader,
    final Uri imageRequest,
    final AbstractDraweeControllerBuilder.CacheLevel cacheLevel) {

  String uriString = imageRequest.toString();
  int maxWidth = 0;
  int maxHeight = 0;

  if (cacheLevel != AbstractDraweeControllerBuilder.CacheLevel.FULL_FETCH) {
    if (!imageLoader.isCached(uriString, maxWidth, maxHeight)) {
      mImageContainer = null;
      setFailure(new NullPointerException("Image not found in bitmap-cache."));
      return;
    }
  }

  mImageContainer = imageLoader.get(
      uriString,
      new ImageLoader.ImageListener() {
        @Override
        public void onErrorResponse(VolleyError error) {
          setFailure(error.getCause());
        }
        @Override
        public void onResponse(final ImageLoader.ImageContainer response, boolean isImmediate) {
          if (response.getBitmap() != null) {
            setResult(response.getBitmap(), true);
          }
        }
      },
      maxWidth,
      maxHeight);
}
项目:GitHub    文件:InstrumentedDraweeView.java   
@Override
public void setImageURI(Uri uri, @Nullable Object callerContext) {
  SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder()
      .setUri(uri)
      .setCallerContext(callerContext)
      .setOldController(getController());
  if (controllerBuilder instanceof AbstractDraweeControllerBuilder) {
    ((AbstractDraweeControllerBuilder<?,?,?,?>) controllerBuilder)
        .setControllerListener(mListener);
  }
  setController(controllerBuilder.build());
}
项目:GitHub    文件:InstrumentedDraweeView.java   
@Override
public void setImageURI(Uri uri, @Nullable Object callerContext) {
  SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder()
      .setUri(uri)
      .setCallerContext(callerContext)
      .setOldController(getController());
  if (mConfig.instrumentationEnabled &&
      controllerBuilder instanceof AbstractDraweeControllerBuilder) {
    ((AbstractDraweeControllerBuilder<?,?,?,?>) controllerBuilder)
        .setControllerListener(mListener);
  }
  setController(controllerBuilder.build());
}
项目:RNLearn_Project1    文件:ReactImageView.java   
public ReactImageView(
    Context context,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  super(context, buildHierarchy(context));
  mScaleType = ImageResizeMode.defaultValue();
  mDraweeControllerBuilder = draweeControllerBuilder;
  mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
  mCallerContext = callerContext;
  mSources = new LinkedList<>();
}
项目:RNLearn_Project1    文件:ReactImageView.java   
public ReactImageView(
    Context context,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  super(context, buildHierarchy(context));
  mScaleType = ImageResizeMode.defaultValue();
  mDraweeControllerBuilder = draweeControllerBuilder;
  mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
  mCallerContext = callerContext;
  mSources = new LinkedList<>();
}
项目:ReactNativeSignatureExample    文件:ReactImageManager.java   
public ReactImageManager(
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
  mResourceDrawableIdHelper = new ResourceDrawableIdHelper();
}
项目:ReactNativeSignatureExample    文件:ReactImageView.java   
public ReactImageView(
    Context context,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  super(context, buildHierarchy(context));
  mScaleType = ImageResizeMode.defaultValue();
  mDraweeControllerBuilder = draweeControllerBuilder;
  mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
  mCallerContext = callerContext;
}
项目:react-native-ibeacon-android    文件:ReactImageManager.java   
public ReactImageManager(
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
  mResourceDrawableIdHelper = new ResourceDrawableIdHelper();
}
项目:react-native-ibeacon-android    文件:ReactImageView.java   
public ReactImageView(
    Context context,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  super(context, buildHierarchy(context));
  mScaleType = ImageResizeMode.defaultValue();
  mDraweeControllerBuilder = draweeControllerBuilder;
  mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
  mCallerContext = callerContext;
}
项目:react-native-box-loaders    文件:ReactImageManager.java   
public ReactImageManager(
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
  mResourceDrawableIdHelper = new ResourceDrawableIdHelper();
}
项目:react-native-box-loaders    文件:ReactImageView.java   
public ReactImageView(
    Context context,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  super(context, buildHierarchy(context));
  mScaleType = ImageResizeMode.defaultValue();
  mDraweeControllerBuilder = draweeControllerBuilder;
  mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
  mCallerContext = callerContext;
}
项目:Ironman    文件:ReactImageView.java   
public ReactImageView(
    Context context,
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    @Nullable Object callerContext) {
  super(context, buildHierarchy(context));
  mScaleType = ImageResizeMode.defaultValue();
  mDraweeControllerBuilder = draweeControllerBuilder;
  mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
  mCallerContext = callerContext;
  mSources = new LinkedList<>();
}
项目:ImageLoadPK    文件:WatchDraweeImage.java   
@Override
public void setImageURI(Uri uri) {
    super.setImageURI(uri);
    SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder().setUri(uri);
    if (controllerBuilder instanceof AbstractDraweeControllerBuilder) {
        ((AbstractDraweeControllerBuilder) controllerBuilder).setControllerListener(mControllerListener);
    }
    setController(controllerBuilder.build());

}
项目:react-native-imagewand    文件:RNImageWand.java   
public RNImageWand(
        Context context,
        AbstractDraweeControllerBuilder draweeControllerBuilder,
        @Nullable Object callerContext) {
    super(context, buildHierarchy(context));
    mScaleType = ImageResizeMode.defaultValue();
    mDraweeControllerBuilder = draweeControllerBuilder;
    mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
    mCallerContext = callerContext;
}
项目:react-native-image-android    文件:ImageAndroidView.java   
public ImageAndroidView(
        Context context,
        AbstractDraweeControllerBuilder draweeControllerBuilder,
        @Nullable Object callerContext) {
    super(context, buildHierarchy(context));
    mScaleType = ImageResizeMode.defaultValue();
    mDraweeControllerBuilder = draweeControllerBuilder;
    mRoundedCornerPostprocessor = new RoundedCornerPostprocessor();
    mCallerContext = callerContext;
}
项目:fresco    文件:PipelineDraweeControllerBuilder.java   
@Override
protected DataSource<CloseableReference<CloseableImage>> getDataSourceForRequest(
    ImageRequest imageRequest,
    Object callerContext,
    AbstractDraweeControllerBuilder.CacheLevel cacheLevel) {
  return mImagePipeline.fetchDecodedImage(
      imageRequest,
      callerContext,
      convertCacheLevelToRequestLevel(cacheLevel));
}
项目:fresco    文件:PipelineDraweeControllerBuilder.java   
public static ImageRequest.RequestLevel convertCacheLevelToRequestLevel(
    AbstractDraweeControllerBuilder.CacheLevel cacheLevel) {
  switch (cacheLevel) {
    case FULL_FETCH:
      return ImageRequest.RequestLevel.FULL_FETCH;
    case DISK_CACHE:
      return ImageRequest.RequestLevel.DISK_CACHE;
    case BITMAP_MEMORY_CACHE:
      return ImageRequest.RequestLevel.BITMAP_MEMORY_CACHE;
    default:
      throw new RuntimeException("Cache level" + cacheLevel + "is not supported. ");
  }
}
项目:fresco    文件:VolleyDataSource.java   
public VolleyDataSource(
    final ImageLoader imageLoader,
    final Uri imageRequest,
    final AbstractDraweeControllerBuilder.CacheLevel cacheLevel) {

  String uriString = imageRequest.toString();
  int maxWidth = 0;
  int maxHeight = 0;

  if (cacheLevel != AbstractDraweeControllerBuilder.CacheLevel.FULL_FETCH) {
    if (!imageLoader.isCached(uriString, maxWidth, maxHeight)) {
      mImageContainer = null;
      setFailure(new NullPointerException("Image not found in bitmap-cache."));
      return;
    }
  }

  mImageContainer = imageLoader.get(
      uriString,
      new ImageLoader.ImageListener() {
        @Override
        public void onErrorResponse(VolleyError error) {
          setFailure(error.getCause());
        }
        @Override
        public void onResponse(final ImageLoader.ImageContainer response, boolean isImmediate) {
          if (response.getBitmap() != null) {
            setResult(response.getBitmap(), true);
          }
        }
      },
      maxWidth,
      maxHeight);
}
项目:fresco    文件:InstrumentedDraweeView.java   
@Override
public void setImageURI(Uri uri, @Nullable Object callerContext) {
  SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder()
      .setUri(uri)
      .setCallerContext(callerContext)
      .setOldController(getController());
  if (controllerBuilder instanceof AbstractDraweeControllerBuilder) {
    ((AbstractDraweeControllerBuilder<?,?,?,?>) controllerBuilder)
        .setControllerListener(mListener);
  }
  setController(controllerBuilder.build());
}
项目:fresco    文件:InstrumentedDraweeView.java   
@Override
public void setImageURI(Uri uri, @Nullable Object callerContext) {
  SimpleDraweeControllerBuilder controllerBuilder = getControllerBuilder()
      .setUri(uri)
      .setCallerContext(callerContext)
      .setOldController(getController());
  if (mConfig.instrumentationEnabled &&
      controllerBuilder instanceof AbstractDraweeControllerBuilder) {
    ((AbstractDraweeControllerBuilder<?,?,?,?>) controllerBuilder)
        .setControllerListener(mListener);
  }
  setController(controllerBuilder.build());
}
项目:GitHub    文件:InstrumentedDraweeView.java   
public void setListener(AbstractDraweeControllerBuilder controllerBuilder) {
  if (mConfig.instrumentationEnabled) {
    controllerBuilder.setControllerListener(mListener);
  }
}
项目:RNLearn_Project1    文件:DraweeRequestHelper.java   
static void setDraweeControllerBuilder(AbstractDraweeControllerBuilder builder) {
  sControllerBuilder = builder;
}
项目:RNLearn_Project1    文件:RCTImageViewManager.java   
public RCTImageViewManager(
  AbstractDraweeControllerBuilder draweeControllerBuilder,
  Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
}
项目:RNLearn_Project1    文件:RCTImageViewManager.java   
public AbstractDraweeControllerBuilder getDraweeControllerBuilder() {
  if (mDraweeControllerBuilder == null) {
    mDraweeControllerBuilder = Fresco.newDraweeControllerBuilder();
  }
  return mDraweeControllerBuilder;
}
项目:RNLearn_Project1    文件:FrescoBasedReactTextInlineImageShadowNode.java   
public FrescoBasedReactTextInlineImageShadowNode(
  AbstractDraweeControllerBuilder draweeControllerBuilder,
  @Nullable Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
}
项目:RNLearn_Project1    文件:FrescoBasedReactTextInlineImageShadowNode.java   
public AbstractDraweeControllerBuilder getDraweeControllerBuilder() {
  return mDraweeControllerBuilder;
}
项目:RNLearn_Project1    文件:FrescoBasedReactTextInlineImageViewManager.java   
public FrescoBasedReactTextInlineImageViewManager(
  @Nullable AbstractDraweeControllerBuilder draweeControllerBuilder,
  @Nullable Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
}
项目:RNLearn_Project1    文件:ReactImageManager.java   
public ReactImageManager(
    AbstractDraweeControllerBuilder draweeControllerBuilder,
    Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
}
项目:RNLearn_Project1    文件:ReactImageManager.java   
public AbstractDraweeControllerBuilder getDraweeControllerBuilder() {
  if (mDraweeControllerBuilder == null) {
    mDraweeControllerBuilder = Fresco.newDraweeControllerBuilder();
  }
  return mDraweeControllerBuilder;
}
项目:RNLearn_Project1    文件:DraweeRequestHelper.java   
static void setDraweeControllerBuilder(AbstractDraweeControllerBuilder builder) {
  sControllerBuilder = builder;
}
项目:RNLearn_Project1    文件:RCTImageViewManager.java   
public RCTImageViewManager(
  AbstractDraweeControllerBuilder draweeControllerBuilder,
  Object callerContext) {
  mDraweeControllerBuilder = draweeControllerBuilder;
  mCallerContext = callerContext;
}