Following Fresco's documentations: http://frescolib.org/docs/listening-to-events.html
I've set up a listener to notify me on the events, but what I need to know (and could not find this information anywhere) is if the low-res calls will notify the listeners as well. And if so, how to avoid it, or set a different listener entirely for the low-res calls. For those wondering, Fresco can load a low-res version of an image before loading the high-res version, and this is how the callbacks are called on this is what is confusing me.
This is my code, for reference:
/*
Here we create the controller, aggregating everything that has been done before and some other settings, and set the controller to our view.
*/
PipelineDraweeControllerBuilder builder = Fresco.newDraweeControllerBuilder();
builder.setLowResImageRequest(lowResRequest)
.setImageRequest(request)
.setTapToRetryEnabled(true)
.setControllerListener(controllerListener) // this is the callback listener
.setOldController(container.getController());
DraweeController controller = builder.build();
If you want to notify about the events of low res request, you need to add a RequestListener to low res request:
ImageRequestBuilder.fromRequest(request)
.setRequestListener(requestListener)
.build();
If the original image request loads faster than low res, Fresco will call the onRequestCancelation on low res image request listener.