androidfresco

How to use Fresco in custom view?


I am building a canvas game, and I draw images on canvas directly.

canvas.drawBitmap(bitmap, matrix, paint);

How can I use Fresco in order to load those bitmaps?


Solution

  • Your use case may best be met by using the image pipeline directly rather than use Drawees.

    The hard part here is that you have to manage the memory yourself, rather than have Drawee do it for you. Follow the instructions on that page and the next two pages of docs ("DataSources" and "CloseableReferences").