I've a curious situation: after moving my PNGs from /drawable-hdpi/ to /drawable/ and putting XML bitmaps to /drawable-hdpi/ instead, I can not decode these bitmaps with BitmapFactory.decodeResource() method - it returns null.
What is stranger is that:
- I can decode actual the png file with this method (giving the actual drawable id)
- I can get the drawable using
context.getResources().getDrawable(xml_id)- - All ImageViews components are decoded correctly (but thats due to p. 2 I suppose)
What I see in the logcat is :
12-03 16:18:13.557: D/skia(2566): --- SkImageDecoder::Factory returned null
12-03 16:18:13.557: D/skia(2566): --- SkImageDecoder::Factory returned null
12-03 16:18:13.567: D/skia(2566): --- SkImageDecoder::Factory returned null
so I would take a wild guess that the decoder is given the xml file to decode instead of the actual resource (which I checked is valid).
Any hints? Is it possible to BitmapFactory.decodeResource() with the xml bitmap?
Btw, I'm using API 7.
And I've also tried to put the origina lpngs into drawable-nodpi but that did not help either. thanks