Drawee is not tied to a particular image loading mechanism and can be used with other image loaders.

However, some of its features are only available on the Fresco image pipeline. Any feature in the preceding pages that required using an ImageRequest or configuration may not work with a different loader.

Using Drawee with Volley ImageLoader

We have an backend for Drawee that allows Volley’s ImageLoader to be used instead of Fresco’s image pipeline.

We only recommend this for apps that already have a significant investment in Volley ImageLoader.

In order to use it, the dependencies section of your build.gradle file needs to be changed. Do not use the Gradle dependencies given on the download page. Use this instead:

1
2
3
4
dependencies {
  // your project's other dependencies
  compile: "com.facebook.fresco:drawee-volley:1.3.0"
}

Initializing with Volley ImageLoader

Do not call Fresco.initialize. You must do yourself for Volley what it does with the image pipeline:

1
2
3
4
5
Context context;
ImageLoader imageLoader; // build yourself
VolleyDraweeControllerBuilderSupplier mControllerBuilderSupplier
    = new VolleyDraweeControllerBuilderSupplier(context, imageLoader);
SimpleDraweeView.initialize(mControllerBuilderSupplier);

Do not let the VolleyDraweeControllerBuilderSupplier out of scope; you need it to build controllers, unless you always use SimpleDraweeView.setImageURI.

Using DraweeControllers with Volley ImageLoader

Instead of calling Fresco.newControllerBuilder, call

1
2
3
4
5
VolleyController controller = mControllerBuilderSupplier
    .newControllerBuilder()
    . // setters
    .build();
mSimpleDraweeView.setController(controller);

Using Drawee with other image loaders

No other Drawee backends have been built yet, though it is possible to do so using the Volley example as a model.