Using Configuration Qualifiers
By adding a range of suffixes to the resource
directory, you can have Android select which resources it uses on a given device. Any of the existing directories in the res
directory can use these qualifiers. If you look at your existing application, you will see that drawable
directories have DPI
qualifiers added and that values
directories have API
level qualifiers added. If you examine the values
directories, you will see that each directory has the same file: styles.xml
. In API level 11 and later, the styles.xml
file in the values-v11
directory will be used instead of the styles.xml
file in the values
directory. In API level 14 and later, the styles.xml
file in the values-v14
directory will be used instead of ...
Get Learning Android™ Application Programming: A Hands-On Guide to Building Android Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.