Java Code Examples for com.facebook.imagepipeline.core.ImagePipelineFactory#getInstance()

The following examples show how to use com.facebook.imagepipeline.core.ImagePipelineFactory#getInstance() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DraweeSpan.java    From drawee-text-view with Apache License 2.0 5 votes vote down vote up
@VisibleForTesting
protected DataSource<CloseableReference<CloseableImage>> fetchDecodedImage() {
    ImagePipelineFactory factory;
    try {
        factory = ImagePipelineFactory.getInstance();
    } catch (NullPointerException e) {
        // Image pipeline is not initialized
        ImagePipelineFactory.initialize(mAttachedView.getContext().getApplicationContext());
        factory = ImagePipelineFactory.getInstance();
    }
    ImageRequest request = ImageRequestBuilder.newBuilderWithSource(Uri.parse(getImageUri()))
            .setImageDecodeOptions(ImageDecodeOptions.newBuilder().setDecodePreviewFrame(true).build())
            .build();
    return factory.getImagePipeline().fetchDecodedImage(request, null);
}
 
Example 2
Source File: FrescoContextImpl.java    From fresco with MIT License 5 votes vote down vote up
@Override
public ImagePipelineFactory getImagePipelineFactory() {
  if (mImagePipelineFactory == null) {
    mImagePipelineFactory = ImagePipelineFactory.getInstance();
  }
  return mImagePipelineFactory;
}
 
Example 3
Source File: FrescoPlusCore.java    From FrescoPlus with Apache License 2.0 4 votes vote down vote up
public static ImagePipelineFactory getImagePipelineFactory() {
    return ImagePipelineFactory.getInstance();
}
 
Example 4
Source File: PipelineDraweeControllerBuilderSupplier.java    From FanXin-based-HuanXin with GNU General Public License v2.0 4 votes vote down vote up
public PipelineDraweeControllerBuilderSupplier(Context context) {
  this(context, ImagePipelineFactory.getInstance());
}
 
Example 5
Source File: Fresco.java    From FanXin-based-HuanXin with GNU General Public License v2.0 4 votes vote down vote up
public static ImagePipelineFactory getImagePipelineFactory() {
  return ImagePipelineFactory.getInstance();
}
 
Example 6
Source File: PipelineDraweeControllerBuilderSupplier.java    From fresco with MIT License 4 votes vote down vote up
public PipelineDraweeControllerBuilderSupplier(
    Context context, @Nullable DraweeConfig draweeConfig) {
  this(context, ImagePipelineFactory.getInstance(), draweeConfig);
}
 
Example 7
Source File: Fresco.java    From fresco with MIT License 4 votes vote down vote up
public static ImagePipelineFactory getImagePipelineFactory() {
  return ImagePipelineFactory.getInstance();
}