I'd like to customize one drawable e.g. /drawable/image.png
only for APis 19 to 21. For later APIs (after 22 incl. I'd like a drawable to be different). Do I need to create directories drawable-v19, drawable-v20, drawable-v21, drawable-v22 (for the others?) ? It's a bit unclear to me how it works...
You should only need to create directories for the versions that set a different resource. So your resources directory would look something like:
res/
drawable/ --> SDK version below 19
image.png
drawable-v19/ --> SDK version between 19 and 21 (including both)
image.png
drawable-v22/ --> SDK version 22 and greater
image.png
Edit: Seems to be working this way. I've set up a small project with strings.xml for sdk 19 and 22, launched two emulators, with sdk 21 and 25. The SDK 21 one showed the string in the v19 strings, and the SDK 25 the one in v22 strings. Here's a pic with the results:
Hope it helps. (Couldn't test it with sdk lower than 19, but that should take values from the default file, since no qualifier applies.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With