Android Fresco suggest change

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
        .newBuilderWithSource(Uri.parse("http://example.com/image.png"))
        .setProgressiveRenderingEnabled(true) // This is where the magic happens.
        .build();

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

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents