images for multi-device support

29 views
Skip to first unread message

Dev John

unread,
Feb 20, 2015, 1:36:36 PM2/20/15
to andro...@googlegroups.com

I am developing an Android app. The app has six images that are the width of the screen. I want the images to fit correctly multiple device screens. For each image I have an image for every combination of orientation(portrait, landscape), screen size group(small, normal, large, x large) and density group(low, medium, high, x, xx, xxx). This comes out to be about 48 versions of each image.


This solution resulted in my images being sized correctly on the devices that I have checked so far. However, when i tried to submit my app I realized that I was way over the 50mb limit. I was at about 400mb.


I know that there is an easy way to do this. I have done a good bit of research but I can not quite seem to wrap my head around the best way to do this.


Is there a way that I could use fewer images? I tried using oversized images and let them be automatically resized. When I did this the images fit but it created top and bottom padding. The larger the image the more the padding. If it was the correct size there was no padding. I tried to manually set padding to 0 and I also tried some other things to try and stop this phenomenon. It was after this that I decided to make individual versions for each image.


Should I try to pull them from an external xml. I am already pulling some stuff from an xml. I should be able to pull these images also. However, the fact that images for different density groups must have the same name and be in the correct folder may cause some issues.


I also saw that I can have some external apk that I can place large files. After looking it over it seems like it may be complex to connect it to the main apk and may be unnecessary.


What is the best way to handle this. I feel like this shouldn’t be that difficult. Thank you very much for taking the time to read this. I hope you can help.


jeff shanab

unread,
Feb 23, 2015, 6:30:57 AM2/23/15
to andro...@googlegroups.com
Store 6 compressed images of the highest needed resolution and with enough pixels to cover all aspect ratios.  Then decompress, crop and subsample to size. If this was video I'd say apply them to a texture, but you did not say if these are backgrounds or ??

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages