Android devices come in many different shapes and sizes. Your task, as a developer, is to create a UI that looks just as good on the small space available to a budget-friendly smartphone, as it does on the large space available to a top-of-the-line Android tablet and everything in between.
So let's break it down. Android categorizes screens in two ways:
Screen sizes: Traditionally, Android supported four generalized screen sizes:
small
,normal
,large
, andxlarge
. However, Android 3.2 (API level 13) introduced some new configuration qualifiers that allow you to be more specific about screen sizes.Screen densities: A device's screen density is a combination of its resolution and display size, and is measured in dots per inch (dpi). The higher a device's dpi, the smaller each individual pixel, which means greater clarity and more detail per inch. Android supports six generalized densities: low (
ldpi
), medium (mdpi
), high (hdpi
), extra high (xhdpi
), extra-extra-high...