Introduction to Android Application Development: Android Essentials (Developer's Library) by Annuzzi Joseph Jr. & Darcey Lauren & Conder Shane
Author:Annuzzi, Joseph, Jr. & Darcey, Lauren & Conder, Shane [Annuzzi, Joseph, Jr.]
Language: eng
Format: azw3
Publisher: Pearson Education
Published: 2015-12-18T05:00:00+00:00
Table 13.1 Important Alternative Resource Qualifiers
Always try to include default resources—that is, those resources saved in directories without any qualifiers. These are the resources that the Android operating system will fall back on when no specific alternative resource matches the criteria. If you don’t, the system falls back on the closest matching resource based upon the directory qualifiers, which could be one that might not make sense.
Now that you understand how alternative resources work, let’s look at some of the directory qualifiers you can use to store alternative resources for different purposes. Qualifiers are tacked onto the existing resource directory name in a strict order, shown in descending order in Table 13.1.
Good examples of alternative resource directories with qualifiers are
res/values-en-rUS-port-finger/
res/drawables-en-rUS-land-mdpi/
res/values-en-qwerty/
Bad examples of alternative resource directories with qualifiers are
res/values-en-rUS-rGB/
res/values-en-rUS-port-FINGER-wheel/
res/values-en-rUS-port-finger-custom/
res/drawables-rUS-en/
The first bad example does not work because you can have only one qualifier of a given type, and this one violates that rule by including both rUS and rGB. The second bad example violates the rule that qualifiers (with the exception of the region) are always lowercase. The third bad example includes a custom attribute defined by the developer, but these are not currently supported. The last bad example violates the order in which the qualifiers must be placed: language first, then region, and so on.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6243)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(5952)
Kotlin in Action by Dmitry Jemerov(4633)
React Native - Building Mobile Apps with JavaScript by Novick Vladimir(2335)
Learning Angular - Second Edition by Christoffer Noring(2168)
Pride and Prejudice by Jane Austen(2094)
Mobile Forensics Cookbook by Igor Mikhaylov(1811)
Computers For Seniors For Dummies by Nancy C. Muir(1769)
Bulletproof Android: Practical Advice for Building Secure Apps (Developer's Library) by Godfrey Nolan(1667)
Building Android UIs with Custom Views by Raimon Ràfols Montané(1620)
Android Development with Kotlin by Marcin Moskala & Igor Wojda(1614)
Building Progressive Web Apps: Bringing the Power of Native to the Browser by Ater Tal(1533)
1936941139 (N) by Bob Rosenthal(1500)
Android App Development by Franceschi Hervé J.;(1495)
Ember.js in Action by Joachim Haagen Skeie(1467)
Hands-On Internet of Things with MQTT by Tim Pulver(1407)
Hands-On Design Patterns with React Native by Mateusz Grzesiukiewicz(1401)
Practical Industrial Internet of Things Security by Sravani Bhattacharjee(1316)
Voice User Interface Projects by Henry Lee(1269)