PART 1: Creating Content with XML with Android Studio (No programming required)
With Simple Recipes
Screen size is measured diagonally and falls into four categories:
Screen density (number of pixels in a given area) also falls into four categories. DPI is dots/inch.
At runtime, dp is converted into pixels using the following formula: px = dp * (dpi / 160)
[Replace with my own graphics]
Using the formula above:
[Update with my own example]
You have to create five versions of the app icon from the varies densities that are housed in individual mipmap folders.
The ratios between the dpi are:
ldpi : mdpi : hdpi : xdpi
3 : 4 : 6 : 8
You have to create five versions of the image background from the varies densities that are housed in individual drawable folders.
The ratios between the dpi are:
ldpi : mdpi : hdpi : xdpi
3 : 4 : 6 : 8
It’s best practice to place app icons in the mipmap folders (not the drawable folders) because they are used at resolutions different from the device’s current density.
All other images are stored in the following folders:
All xml layout files are stored in the following folders: