Skip to content

Commit 3938e4f

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "docs: emphasize qualifier order and mention implicit version qualifer" into ics-mr1
2 parents 40d6e7d + be0cf70 commit 3938e4f

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

docs/html/guide/topics/resources/providing-resources.jd

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ for which these resources are to be used (defined in table 2).</li>
231231
</ul>
232232
<p>You can append more than one <em>{@code &lt;qualifier&gt;}</em>. Separate each
233233
one with a dash.</p>
234+
<p class="caution"><strong>Caution:</strong> When appending multiple qualifiers, you must
235+
place them in the same order in which they are listed in table 2. If the qualifiers are ordered
236+
wrong, the resources are ignored.</p>
234237
</li>
235238
<li>Save the respective alternative resources in this new directory. The resource files must be
236239
named exactly the same as the default resource files.</li>
@@ -254,20 +257,14 @@ screen density, but the filenames are exactly
254257
the same. This way, the resource ID that you use to reference the {@code icon.png} or {@code
255258
background.png} image is always the same, but Android selects the
256259
version of each resource that best matches the current device, by comparing the device
257-
configuration information with the qualifiers in the alternative resource directory name.</p>
260+
configuration information with the qualifiers in the resource directory name.</p>
258261

259262
<p>Android supports several configuration qualifiers and you can
260263
add multiple qualifiers to one directory name, by separating each qualifier with a dash. Table 2
261264
lists the valid configuration qualifiers, in order of precedence&mdash;if you use multiple
262-
qualifiers for one resource directory, they must be added to the directory name in the order they
265+
qualifiers for a resource directory, you must add them to the directory name in the order they
263266
are listed in the table.</p>
264267

265-
<p class="note"><strong>Note:</strong> Some configuration qualifiers were added after Android 1.0,
266-
so not
267-
all versions of Android support all the qualifiers listed in table 2. New qualifiers
268-
indicate the version in which they were added. To avoid any issues, always include a set of default
269-
resources for resources that your application uses. For more information, see the section about <a
270-
href="#Compatibility">Providing the Best Device Compatibility with Resources</a>.</p>
271268

272269
<p class="table-caption" id="table2"><strong>Table 2.</strong> Configuration qualifier
273270
names.</p>
@@ -752,6 +749,17 @@ href="#KnownIssues">Known Issues</a> for more information.</p>
752749
</table>
753750

754751

752+
<p class="note"><strong>Note:</strong> Some configuration qualifiers have been added since Android
753+
1.0, so not all versions of Android support all the qualifiers. Using a new qualifier implicitly
754+
adds the platform version qualifier so that older devices are sure to ignore it. For example, using
755+
a <code>w600dp</code> qualifier will automatically include the <code>v13</code> qualifier, because
756+
the available-width qualifier was new in API level 13. To avoid any issues, always include a set of
757+
default resources (a set of resources with <em>no qualifiers</em>). For more information, see the
758+
section about <a href="#Compatibility">Providing the Best Device Compatibility with
759+
Resources</a>.</p>
760+
761+
762+
755763
<h3 id="QualifierRules">Qualifier name rules</h3>
756764

757765
<p>Here are some rules about using configuration qualifier names:</p>

0 commit comments

Comments
 (0)