Resources & Configuration
ANDROID › System
Resource qualifiers, best-match selection, dp/sp units, drawable densities, and adaptive layouts.
Interviewers use this topic to check whether you understand how Android serves the right asset for a given device configuration and how to build UIs that scale across phones, tablets, and foldables. Expect questions on qualifier ordering, the resource-selection algorithm, density-independent units, and modern adaptive APIs like window size classes. It is a frequent screen for both legacy View knowledge and current Compose practice.
What this covers
- Naming and ordering alternative resource directories with configuration qualifiers
- How Android's best-match algorithm eliminates contradictions and applies qualifier precedence
- Why default (unqualified) resources are mandatory and when omitting them crashes
- dp vs sp vs px, the px = dp * (dpi/160) formula, and the mdpi baseline
- Drawable density buckets, the 3:4:6:8:12:16 ratio, nodpi/anydpi, and scaling behavior
- Adaptive layouts via smallestWidth (sw600dp), window size classes, and Compose WindowSizeClass
Study this topic
- Resources & Configuration explained: the guided lesson
- 14 practice quiz questions
- 9 revision flashcards
- Resources & Configuration interview questions and answers