Hello all, 

I am continue to build my knowledge around Android design and could use 
some clarification.

I am trying to understand how you can get two different sized devices which 
have the same dpi use two different image assets.

I have built an application which has a significant number of res folders 
which use one or more resource qualifiers.

For example, I have the following.

drawable-sw320dp-mdpi
drawable-sw320dp-xxhdpi
drawable-sw800dp-mdpi

layout-sw720dp-mdpi
layout-sw720dp-xxxhdpi
layout-sw800dp-mdpi

I've had to do this in order to keep images in my application proportional 
from one screen size / density to the next.

Here is where things are getting a bit rough.

Take a phone that is listed at 768x1280, mdpi, 160dp.

If I am understanding things correctly, this means the following.

It is an mdpi device so 1px = 1dp
The size of the device in dp is 768x1280
This device will use my layout in the layout-sw800dp-mdpi folder
It should use the image asset that is in my drawable-sw800dp-mdpi folder

Am I correct up to this point?

Now, let's say I have a tablet, that is 2048 x 1536 (Galaxy Tab S2) and is 
mdpi.

Does this mean that it will use the same layout and drawable resources as 
the previously mentioned phone?

Does this also mean that the resource in my drawable folder should be as 
follows?

dpi = 48
size (what fits my needs)

Given this information is correct, I would expect that the single image of 
sizeX and dpi of 48 would look proportional on both devices, which 
unfortunately I am not always finding to be correct.

If someone could tell me if I'm in the ball park or WAY off base on my 
understanding up to this point, I would really appreciate it.

Thank you!
Bob





-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/fde4f66f-f9bd-4310-890e-93bb3c561100%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to