3

Google suggests to create for each image 4 different versions - one for each density (ldpi, mdpi, hdpi, xhdpi). Sometimes you might even want to create others, based on the screen size (small, normal, large, xlarge).

This causes a weird situation where most of the app's images will never be used by the app, right?

How come Google doesn't create multiple APKs on their website, to target the best APK to the end user's device, so that 100% of the resources will be targeted on the device's specs? Or there is already such a thing?

halfer
  • 19,824
  • 17
  • 99
  • 186
android developer
  • 114,585
  • 152
  • 739
  • 1,270

1 Answers1

1

Yes there is a support for multiple APK. Please refer here.

To address your need precisly you can certain filters in your manifest file i.e. <supports-screens> or <compatible-screens>

Rajnikant
  • 1,097
  • 1
  • 7
  • 22
  • not sure i understand the manual . do they say that for multiple apks , i need to create a new project for each of them ? what if i have images for each language? it would take ages to create all of the projects and maintain them. plus i don't think they have this filter . this is a terrible solution for google. i would have thought that they use the exact same project for all of the apks . the reason (for example) : a device with density mdpi should not look at hdpi/ldpi/xhdpi images (unless they don't exist for it) . – android developer Jun 25 '12 at 07:33
  • It is up to you, you may not need to create new project. Custom build script (ANT/Maven) can generate right APK for you. By the way, having a language specific images is not at all right way. – Rajnikant Jun 25 '12 at 10:00
  • sometimes the customer/designer gives the images with customized style of text (fonts &effects) created using photoshop for each language , so there is little that i can do with that. in any case , isn't having multiple apks make it harder to maintain all of them? – android developer Jun 25 '12 at 10:48
  • If these are the little then it should not harm. I have been doing this for many of my project; i didn't found it difficult; it is just same as having different builds for same source code. – Rajnikant Jun 26 '12 at 05:36