Android JPEG Streaming with Fresco using DraweeController


This example assumes that you have already added Fresco to your app (see this example):

SimpleDraweeView img = new SimpleDraweeView(context);
ImageRequest request = ImageRequestBuilder
        .setProgressiveRenderingEnabled(true) // This is where the magic happens.

DraweeController controller = Fresco.newDraweeControllerBuilder()
        .setOldController(img.getController()) // Get the current controller from our SimpleDraweeView.

img.setController(controller); // Set the new controller to the SimpleDraweeView to enable progressive JPEGs.