October 2018
Intermediate to advanced
464 pages
15h 17m
English
When Android encounters a @drawable reference, it expects to find the target in one of the res/drawable folders. These are designed for different screen densities - ldpi (low dots per inch), mdpi (medium), hdpi (high), and xhdpi (extra-high) - and they allow us to create resources for specific target devices. When an application is running on a specific device, Android will load resources from the designated folder that most closely matches the actual screen density.
If it finds this folder empty, it will try the next nearest match and so on until it finds the named resource. For tutorial purposes, a separate set of files for each possible density is not required, and so placing our images ...