Android screen sizes/resolutions — why screen size doesn’t matter?
So what is about those Android screen sizes?
Android is a platform that gives mobile device manufacturers great freedom in terms of creating devices. Starting with subassemblies such as a battery, CPU, and memory, through all types of sensors up to screens, which plurality of resolution, size, and density can sometimes be — to put it mildly — pretty overwhelming. Fortunately, Android creators came up with a set of baskets that group devices with respect to their density, unburdening software developers from adjusting applications to each resolution. As a result, we are offered 6 such consecutive baskets: ldpi, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi (we can also distinguish tvpdi that can be placed between mdpi and hdpi, but due to its proximity to the two, we won’t discuss it here). Of course, we should not equate density baskets with the physical size of the device. You might wonder then: so what is this magical density about? It is the amount of pixels that can fit on a physical area of the screen, often described as dpi (dots per inch).
What are the densities?
These densities are primarily working tools for designers and graphic artists; they should deliver the graphics prepared for the particular density baskets. Developers can also use them in their applications to create, for example, different layouts depending on the density of devices. However, it is often more useful to use the smallest edge of the device expressed in dp units (swdp from the smallest width), the orientation of the device (land and port), and sporadically predefined sizes such as small, normal, large and xlarge. What is interesting, in the same way, you can use different resources, depending on the API version for example, and moreover — mix them with one another! A few years back, Android operated only one set of the first four density baskets.
From idpi to xxxhdpi
Since the rapid development of mobile devices and moving away from their miniaturization, it is very rare to encounter devices with screens with ldpi density. The vast majority of today’s flagship models (often due to the size classified already as phablets) works on xxxhdpi (Nexus 6, Nexus 6P, Galaxy S6, S7 Galaxy, LG G5). Thus, it is worth to forsake the preparation of graphics for the smallest density, at the expense of preparing the version for the two largest ones, so that the visual quality is at the highest level. At this point, it is worth to touch upon the system of units, which should be used by Android developers so that view components look the same on all devices. And so, for the font sizes it is recommended to use the sp unit (scale independent pixel), while for all other dimensions dp or dip unit (density independent pixel). Base density for Android is mdpi. All other densities are its appropriate ratios, which is as follows:
- 0.75x — low-density (ldpi)
- 1.0x — medium-density (mdpi)
- 1.5x — high-density (hdpi)
- 2.0x — extra-high-density (xdpi)
- 3.0x — extra-extra-high-density (xxhdpi)
- 4.0x — extra-extra-extra-high-density (xxxhdpi)
Each of the baskets represents in this way a certain resolution range, which falls inside it:
- ldpi — ~120dpi
- mdpi — ~160dpi
- hdpi — ~240dpi
- xhdpi — ~320dpi
- xxhdpi — ~480dpi
- xxxhdpi — ~640dpi
Few words about the devices
A list of the most popular devices and detailed information about their size, resolution, and density can be found at: https://design.google.com/devices/.
An invaluable source of information on working with different screen sizes is undoubtedly an official guide from Google, which can be found at: https://developer.android.com/guide/practices/screens_support.html
In terms of support for different screen densities, for which customers sometimes ask, we should pay attention to a much more significant issue which is the supported version of Android. The whole framework is developing rapidly, virtually in every way (code, appearance, behavior). This often arises problems with creating solutions that are available in new versions, but they are not, or are in a very limited way, available on older versions. Currently, the support for Android in version 2 is already not much reasonable, same with the version 3 and first editions of version 4. Below you can find data on the number of devices on the market with specific system versions: https://developer.android.com/about/dashboards/index.html, where you can easily draw conclusions about the merits of supporting specific system versions.