In my GridView adapter I'm trying to efficiently load images so I've been using Picasso 2.5.2 (which allows for loading by resource id).
Picasso.with(mContext)
.load(resId)
.noFade()
.resize(newSize, newSize)
.into(imageView);
However, it always gives a blank image when I pass in a resourceId with this message.
SkImageDecoder::Factory returned null
Before I checked the Picasso Github page I thought I would try it with using the Framework call:
imageView.setImageBitmap(BitmapFactory.decodeResource(App.get().getResources(), resId));
App.get() is return my app singleton so the Context is legit. I have also tried passing in the context from the parent in getView params and passing in an Activity Context. Logging the resId shows me the correct id for the drawable and it still doesn't work, however this works:
imageView.setImageResource(resId);
...but it's no good because I it doesn't give me the chance to reserve memory by loading the image in a smaller size.
I've tried on both Genymotion and a real device with the same results.
So both the context and resource id are fine in Logcat, what else could be the issue here?