0

I had different nine-patch images for different screens. However, I encountered an issue

android drawable image takes lot of memory compared to its disk size

So, I decided to use, for now, nodpi with hdpi image size.

Since, I have limited understanding, I was wondering what should be the image size I should put in drawable-nodpi folder.

Should I put hdpi images or xxxhdpi images? Or something else?

Please help me understand.

Community
  • 1
  • 1
GJain
  • 5,025
  • 6
  • 48
  • 82
  • `Should I put hdpi images or xxxhdpi images? Or something else?` I'd try putting an xxxhdpi image into the `drawable-xxxhdpi` folder. That way it would be scaled **down**, preserving the quality (by using averaging instead of pixellation). – Phantômaxx May 10 '16 at 17:22
  • But nodpi is **never scaled**. It's just the same big (or small - depending on the size of the image/s you put there in relation to the resolution and density of the device) blob, at any resolution and at any density. Is this you want? – Phantômaxx May 10 '16 at 17:53
  • my concern is I dont know how much image size/memory bloating will happen at runtime...and I will hit OOM errors. I discovered OOM while testing on emulator with 64MB memory?? – GJain May 10 '16 at 18:06
  • You could try enlarging the heap size for your app. http://developer.android.com/training/articles/memory.html – Phantômaxx May 10 '16 at 19:07
  • Did you try any strategy from [here](https://developer.android.com/training/displaying-bitmaps/index.html)? – Maxim G May 28 '16 at 21:19
  • yes...I did all of those...my issue is different here of image size bloating irrespective of how much memory app has. – GJain May 29 '16 at 00:57

0 Answers0