Screen density same resolution - android

I have two android devices with the same screen resolutions (800x480) and dimensions.
The difference is that one screen is low density (120 dpi) and the other normal density (160 dpi).
I don't understand the reason by the same image of 200x200pixels is smaller in the screen with less density and if i write a rectangle of 200x200 pixels is the same on both screens.
Can anybody explain me the reason?
Thanks in advance

A 90 pixel image at ldpi becomes a 120 px a mdpi, a 180 at hdpi and a 240 ad xhdpi.
You can find more informations about it here (search "Screen pixel density") : Dev Android Ressources
Another good link about Density : Screen Support - Density

Related

Android splash screen dimensions

I'm trying to create a splash screen on photoshop that will support every single device that runs Android. I've been reading around blogs and the android website and I see that you need to design your assets in dp, but I don't understand what that means. I understand the concept of dp, but I don't understand how to apply that on photoshop. I know the equivalent of a dp is pixels/(dpi/160), but I'm not sure what size (pixels) I should be using for each one of the different sizes (ldpi, mdpi, hdpi, xdpi, xxdpi...). So if someone can let me know what the dimensions of my splash screens needs to be, as well as the resolution, I'd really appreciate it.
ldpi = 320 x 426
mdpi = 320 X 470
hdpi = 480 x 640
xhdpi = 720 x 960
xxhdpi = 1080 X 1440
strongly recommend that images are no larger than 2,000 pixels wide with no more than 72 dots per inch (dpi). This keeps your Splash page loading quickly.

What are the screen resolution sizes for android sizes

ldpi
mdpi
hdpi
xhdpi
xxhdpi
xxxhdpi
Ok my question is about setting resolution size of background image
Lets what are the sizes for land mode ?
for example : xxhdpi : 1920x1080 is this correct ? and the rest goes how ?
thank you very much
There is not a linear relation between screen density and screen size. There are multiple screen dimension configurations for each screen density value.
For example, you can have two hdpi devices, one being 569x320px and another 800x400px.
Your density factor represents how many pixels are needed to make one dpi or dip (density independent pixel).
So, for example, hdpi has a 1.5 density factor, meaning that each dpi is made of 1.5 pixels.
As for xhdpi, it has a 2.0 factor, this is, 1 dpi = 2px.
See more at this link and also this one
You can find all the android devices screen resolution sizes with additional details in both landscape and portrait mode
as
dpi of the device
Title bar height
Status Bar height
Content View
Refer ScreenDeviceStatistics.

Need advice for Android multiple resolution design

For example, I'd like to show an image in screen. Here are the size and dpi:
LDPI - 0.75x 75x75 120 dpi
MDPI - Original size 100x100 160 dpi
HDPI - 1.5x 150x150 240 dpi
XHDPI - 2.0x 200x200 320 dpi
XXHDPI - 3x 300x300 480 dpi
XXXHDPI - 4.0x 400x400 640 dpi
But the display for two devices is not what I want.
The first device is 480x800, 240 dpi. The second device is 800x1280, 213 dpi.The bigger screen has lower dpi. I need some advices on how to handle this case? Thanks
What I see is that your first device is a mobile while the second is a tablet. So you can provide alternate layout files for mobile's and tablets. See supporting multiple screens for more information. For this case for mobile you can use layout-sw720dp folder and for the bigger tablet screen. As for the images your current settings above will work great.

Asset Creation - 9patch SplashScreen and ScreenDensity

So I get the whole Android pixel independency thing.
I'm creating a SplashScreen that is using a 9patch that will stretch its edges to account for all screensizes.
I also use a differenlty sized 9patch image in ldpi mpdi hdpi xhdpi for each splash screen as well.
That way the logo (the non stretched area of the 9patch) will be the correct size.
I know mdpi is 1.0 and hdpi x1.5 in relative size and xhdpi is x2, but when I'm creating that first mdpi image how do I know how many pixels wide/high it should be?
Hope that makes sense.
Really there's no one answer. Firstly though, I wouldn't start at mdpi and scale up -- It's best to start at the highest quality that you can. Vector, if it fits the design, or a high resolution image (even larger than the largest screen size you currently plan to support). Then, from there, just downsize for the device that you plan to test. For example, a typical HDPI resolution would be 480 x 800, so fit it appropriately there. An XHDPI resolution might be something like 1280 x 720. It's best to just leave a good amount of margin on the edges in case it's used on a device with a different aspect ratio, or something. But yeah, basically, design as large as you can, and then just export based on some average screen resolutions for the density bucket you're working on.
(...) when I'm creating that first mdpi image how do I know how many pixels
wide/high it should be?
Since mdpi is the baseline for all other density buckets, 1dp on an mdpi device will translate to exactly 1px. In other words, use an mdpi device to figure out the relative size on the screen and from there on apply the given scaling ratios to produce resources for the ldpi, hdpi and xhdpi buckets. Obviously you do not actually have to scale up that mdpi resource - all you need determine is the size for that screen density and then you can use whatever source file to produce images for all buckets.
The link xBroak has given, is actually the best source of information regarding your question. A quote from there to support above statements:
The density-independent pixel is equivalent to one physical pixel on a
160 dpi screen, which is the baseline density assumed by the system
for a "medium" density screen.
It may also come in handy to be aware of the simple d(i)p to px formula (also from that same link):
The conversion of dp units to screen pixels is simple: px = dp * (dpi
/ 160)
With this information, you can easily verify that 1dp on an mdpi device (with 160dpi screen) is equal to 1px. Just fill in 160dpi and you get px = dp * (160 / 160), which simplifies to px = dp * 1, and hence px = dp for 160dpi. QED. :)
These are your basic guidelines:
xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).
More info: http://developer.android.com/guide/practices/screens_support.html

How to resize images for medium screen size having images for large screen size in android

I've develop an app for android and now I support large screen devices. So I create an image for this device. Now I want to resize large images for medium screen sizes.
What is the proportion? For example if an image for large screen is 85x111(px), what is the dimension for medium?
There are different screen densities. ldpi, mdpi, hdpi, xhdpi , you have to create different images for all these densities, if you would like to support all screen.
see the links below.
http://developer.android.com/guide/practices/screens_support.html
http://developer.android.com/resources/dashboard/screens.html
hdpi ~ 240dpi - 240 pixels per inch.
mdpi ~ 160dpi - 160 pixels per inch.
so the scaling factor is 160/240 = 2/3. so if you have 85 x 111 in hdpi, for mdpi it should be 85*2/3 x 111*2/3.

Categories

Resources