2

I have some difficulties loading image from byte array on Android.

I want to use Fresco framework to load image and it's setImageUri method but i don't know how to create Uri from byte array. Is this even possible? Or maybe there is another way of using Fresco images from byte array.

For now i am using the placeholder like this:

Drawable d = new BitmapDrawable(context.getResources(),BitmapFactory.decodeByteArray(child.getLogo(), 0, child.getLogo().length));
holder.getLogo().getHierarchy().setPlaceholderImage(d);

Is there any better way?

stream28
  • 141
  • 6

0 Answers0