I have just migrated to the Fresco
library for loading images in my app.
I need to listen to Image Loading Events, of course I read this article in documentation Listening to download events
This is exactly what I need, but.... There few things that I don't like.
My goal is to hide View
if it fails to download it from the net.
I cannot reference
SimpleDraweeView
from controller, even on callback method. I need to hideView
, but it seems that I cannot get reference to it.Each time I need to load image, I need to create object of controller using
Builder
, and this can cause performance issues when using this approach with list of a lot of items with images.
holder.simpleDraweeViewImage.setController(Fresco.newDraweeControllerBuilder()
.setControllerListener(controllerListener)
.setUri(currentItem.getImage())
.build());
I need to able to have reference to the SimpleDraweeView
from controller, and in MVC
pattern approach it seems okay if controller is aware about view.
Please suggest the best way to rich my goal.
Thanks.