4

I saw many questions like these and read many docs, but I'm still not sure what is the proper way. I have application with 500 photos, and first how I was doing it was to scale every photo 5 times, to the pixel sizes for each ldpi, mdpi, hdpi, xhdpi and xxhdpi. But, after doing this, application got much bigger than it should have and since you can only upload .apk with 50MB to market, I found myself in trap.

I found several options which can be made here, but not sure which is the proper one:

  • Make a multiple layouts for each of this densities on devices and scale with different dp's in them
  • Make multiple .apk files, each for every device with different densities (still, Google is making accent on this option to make it only if you really can't make it anyhow else - why is that? this would be perfect for me, since I already have photos prepared for each density)
  • Make multiple pictures and put it just in one .apk - this can't work for me, since the .apk is too big
  • Make pictures which are good for MDPI device, put them in "drawable" and they will automatically resize bigger for other devices and smaller for smaller density devices - this makes problem since pictures, when they're being resized from MDPI to other bigger dpi devices, pictures are blurry.

So, anyways, proper way of handling this would be to follow first option, am I right? I should just take xxhdpi pictures (so they're always scaled from the best picture), put them into drawable-nodpi? However, I have some problems with scaling on ImageButtons. Please, tell me how to make it properly.

Tommz
  • 3,393
  • 7
  • 32
  • 44

3 Answers3

1

My practice is using only one apk to keep the app simple and easy to develop and publish.

Use only one drawable, the high the better. it depends the final apk size you(market) can bear.

May be this question will help:

Only use XHDPI drawables in Android app?

Community
  • 1
  • 1
Loki
  • 931
  • 8
  • 13
0

An addition to the Loki's answer. You could resolve the poor perfomance on small scale devices making a cache folder for images. Downsize the image the first time the device loads it, according to the density of the device, save it to the cache folder, and the next time use the cached image.

Bonus if you make this in an batch process in the background!

ElYeante
  • 1,745
  • 21
  • 22
0

I don't know but could this be done as an update to the app. You download a plain vanilla app that prompts the user to upgrade, or just does it automatically.sounds like something Google needs to improve on. When I download an app I only need one app for one language one device.sounds like Microsoft mentality