otinanai
otinanai

Reputation: 4025

Android graphics for XXHDPI

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.

Upvotes: 5

Views: 9085

Answers (3)

radley
radley

Reputation: 3562

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.

Upvotes: 3

user936414
user936414

Reputation: 7634

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.

Upvotes: 1

dmon
dmon

Reputation: 30168

  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,"

Upvotes: 3

Related Questions