5

I'm about to adjust all drawables for an Android app for XXHDPI devices (like sony xperia Z and samsung s4). After thorough reading on Google's documentation, blogs, and SO, I'm confused as to the graphics I'm about to produce.

My concerns are the following:

  1. Google states that I shouldn't worry about this density as it scales up XHDPI graphics - In the same manner, (before XXHDPI devices) why the production of XHDPI graphics was a necessity and it didn't scale up HDPI graphics?

  2. Sony reminds developers not to exclude XXHDPI screens without clarifying if this concerns making adjustments to graphics - Do I have to redesign all graphic elements for XXHDPI?

  3. Based on (2), Sony Xperia Z Ultra has 342dpi density but it is categorized as an XXHDPI device. - If I produce the graphics for an XXHDPI, which is twice the size of an HDPI density, the graphics will scale down by almost 1/3 to match Sony's density and this is undesirable. Why doesn't Xperia Z use the XHDPI drawables? What if I have a pattern and I can't afford any scaling since I'll lose the detail of the pixel-perfect pattern?

  4. Are XXHDPI resources REALLY necessary?

I hope somebody can answer all the questions above.


EDIT

Below are the results of slightly scaling a graphic to adjust to various densities

XHDPI pattern - xhdpi image (1:1) no scaling

XHDPI scaled up by 10% - xhdpi scaled up by 10%

XHDPI scaled down by 10% - xhdpi scaled down by 10%

The detail loss is obvious at 2nd and 3rd image.

otinanai
  • 3,987
  • 3
  • 25
  • 43

3 Answers3

3
  1. Unless you actually need your graphics to be "pixel perfect", scaling up from XHDPI will probably be fine for almost all cases. Pixels are so small the user won't be able to tell the difference. Do you actually have an XXHDPI device you can see your graphics on? You might have to provide XXHDPI resources for some drawables, just like you sometimes have to provide MDPI drawables when the HDPI ones don't scale down well.
  2. "do not exclude" in this context means explicitly from the manifest. Some developers target densities in their manifest and that will affect the app not showing in the Play store, this is unrelated to actual graphics.
  3. From that same page, it actually says that the density of that device is 440 dpi? - "One of the awesome features you’ll find in the recently announced Sony Xperia Z is its 5” screen, which boasts a display density of 440 dpi,"
dmon
  • 30,048
  • 8
  • 87
  • 96
  • In regards to (3), I've been reading [this articles](http://ipsmart.blogspot.gr/2013/06/screenshot-sony-xperia-z-ultra.html#.Uc1gCJyz58E), which says that it's 342 dpi. I guess I'll have to trust the Sony source. However, even with 440dpi there will be some scaling to the graphics from 480dpi. Is there any way to avoid this? – otinanai Jun 28 '13 at 12:31
  • 1
    That's not the same device. The Z is 5 inches, the Z **Ultra** is 6.4. – dmon Jun 28 '13 at 12:35
  • So, this means that my concerns are true. Scaling is unavoidable even if I provide XXHDPI drawables. – otinanai Jun 28 '13 at 12:39
  • Well it's definitely not unavoidable. If you provide all of your resources in every available bucket they will always be used, but that's unwise and probably a waste of time (and space!). Remember that all devices will use the same APK (unless you target different versions of it) so phones with smaller resolutions will have to download the big images too. Even Google doesn't do that, if you look at the resources in the SDKs, they don't provide resources in all of the buckets. – dmon Jun 28 '13 at 12:44
  • 1
    If you're so concerned about scaling (which I don't think you should be) you should actually get your hands on one of these devices before you generate artwork in all densities. I think in practice the biggest pain in the butt is actually the different aspect ratios more than the densities :-/ – dmon Jun 28 '13 at 12:45
  • I edited my answer and you can see an example of the scaling effects of an xhdpi image. Pixel details are lost and this is visible in your computer screen. Just imagine how bad will look in such extra high density screens. – otinanai Jun 28 '13 at 13:00
  • Also, I totally agree about the aspect ratios. Let alone the new Blackberry, which must be adjusted to portrait, landscape AND square view! – otinanai Jun 28 '13 at 13:03
  • Yes, of course there are scaling artifacts, The point is that you probably won't notice them because of the higher density. – dmon Jun 29 '13 at 15:08
  • If you want to create all of the graphics in all sizes, be my guest, go nuts. – dmon Jun 29 '13 at 15:09
  • Scaled-up xhdpi graphics look fuzzy on xxhdpi devices, and since xxhdpi is the new standard, there's simply no reason to settle for substandard quality. – radley Aug 07 '13 at 20:32
3

XXHDPI resources are essential for stuff like icons on modern devices. Google will change their story and start to recommend them when they release their own XXHDPI Nexus device.

Think about it this way: xxhdpi devices are pretty much the STANDARD Android devices. Little chance Samsung & HTC are going to roll everything back to XHDPI just because Google can't keep up.

radley
  • 3,212
  • 1
  • 22
  • 18
1

1) Android scales the drawables selecting the drawable that will produce the best result https://stackoverflow.com/a/14004691/936414

2) The post only asks you to include xxhdpi screen support in manifest. All XXHDPI devices take resources from XHDPI and scale them to fit accordingly. So no need of separate resources in XXHDPI folder

3) No need to include resources for XXHDPI.

Community
  • 1
  • 1
user936414
  • 7,574
  • 3
  • 30
  • 29
  • In regards to (1) how is the judgement been made? How the device "knows" which drawable produces the best results? Are there any specific criteria? – otinanai Jun 28 '13 at 15:07
  • 1
    Refer http://developer.android.com/guide/practices/screens_support.html#support for how the resources are selected and scaled – user936414 Jul 01 '13 at 06:22
  • Not true - devices will use xxhdpi resources if they're available. – radley Aug 07 '13 at 20:39
  • @radley Yes. If resources are available in xxhdpi then those resources will be taken. The question is if seperate xxhdpi resources are really necessary. – user936414 Aug 08 '13 at 04:58