I've been reading the following: http://developer.android.com/guide/practices/screens_support.html
It's about the folders res-long-land-hdpi
, res-notlong-land-dpi
, res-notlong-port-ldpi
etc. And what they actually mean and when they should be used.
The article also says the following:
I'm developing for a device that is: 1280 x 720
and one that is 480 x 800
My app will only be available in portrait mode.
So that means i have to put images in the res-long-port-hdpi
folder for the first device, and in res-notlong-port-ldpi
for the second device right?
Then the next problem i have with this is. I have an image which is 332 x 226
pixels. This looks fine on the first (xlarge) device. But to what size do i have to rescale this image so that i can place it in the (lower resolution) res-xx-xx-ldpi
folder?
I'm not sure how to calculate the new sizes for the different folders.
The size ratios should match the nominal pixel densities as Android defines them:
ldpi - 120 pixels/inch; dpi scale = .75 (4 dpi = 3 pixels)
mdpi - 160 pixels/inch; dpi scale = 1 (1 dpi = 1 pixel)
hdpi - 240 pixels/inch; dpi scale = 1.5 (2 dpi = 3 pixels)
xhdpi - 320 pixels/inch; dpi scale = 2 (1 dpi = 2 pixels)
So if you make your xhdpi images twice the size (in pixels) of the mdpi resources, they will be the same dpi, meaning they will be the same physical size on their respective screens.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With