I’m not going to give an extensive explanation here, I’m just going to teach you how to calculate the image sizes for each density, which is the point of the question. For a general explanation of density, pixel resolution, etc. it is recommended to refer to documentation.
The densities are in order from lowest to highest: ldpi, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi.
There is a ratio ratio between them (1:2:3:4:6:8), which means: a mdpi figure is twice the size of an ldpi (2:1 ratio), hdpi is the triple of an ldpi (3:1 ratio), etc. Obviously, ldpi has the same size as ldpi, that is, a ratio of 1:1.
But this relation is only useful as it stands (1:2:3:4:6:8) if you base it on the lowest density ldpi. If you base this on another resolution, you will need to recalculate these values (the ratio between them will be maintained).
For example: taking the case of your Samsung SIII, which has xhdpi density. The ratio of proportion for himself is 4:4 = 1. Therefore take 4 as the divisor (second operand of a division). The dividend (first operand) will be the density for which you want to calculate the image size. For example, if you want to calculate for hdpi, the ratio will be 3:4 = 0.75. That is, the corresponding hdpi image will be 0.75 times (or three quarters) smaller than the xhdpi image. This means that the 150x100 pixels in xhdpi will become 112.5 x 75 pixels (or 112 x 75, since it has to be whole numbers) on an hdpi screen.
The same logic can be applied to obtain the images in the other densities. Thus:
xxxhdpi = 300x200 px
xxhdpi = 225x150 px
mdpi = 75x50 px
ldpi = 37x25 px
It is not the Android platform (based on Linux) that has several screen sizes, but the devices that there use. Usually they are mobile devices and therefore it is common for any platform with target for these devices to have this feature (Windows Phone, Palmos). Nor can it be considered a negative point as this allows for varied devices with different costs and end applications, meeting a wider range of applications.
– Diego C Nascimento
@Diegocnascimento I think he spoke from the developer’s point of view, referring to the greater complexity to build the application due to the variety of screen sizes he will need to meet.
– Piovezan
Exactly @Piovezan
– fymoribe
I have the same doubt. I don’t know if each folder needs to have an image with a specific resolution. If it is set in pixel or dpi.
– CleitonLima