Skip to content

Commit c09a697

Browse files
author
Gilles Debunne
committed
Fixes regarding densities in "Providing Resources" documentation page.
The ratio between densities is not constant. The Exception for dpi qualifier in point 4 of the algorithm should be detailed. I understand that if my config is ldpi-trackball-v5 and I have the choice between mdpi and hdpi-trackball-v5, mdpi will be chosen. Cherry-picked from master CL 59188. Change-Id: Ibe412a82845527ebdb104605c99c205ca52ab97c
1 parent 3bf5c4c commit c09a697

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ application during runtime.</p>
450450
to match the device density.</li>
451451
</ul>
452452
<p><em>Added in API Level 4.</em></p>
453-
<p>There is thus a 4:3 scaling factor between each density, so a 9x9 bitmap
454-
in ldpi is 12x12 in mdpi and 16x16 in hdpi.</p>
453+
<p>There is thus a 3:4:6 scaling ratio between the three densities, so a 9x9 bitmap
454+
in ldpi is 12x12 in mdpi and 18x18 in hdpi.</p>
455455
<p>When Android selects which resource files to use,
456456
it handles screen density differently than the other qualifiers.
457457
In step 1 of <a href="#BestMatch">How Android finds the best
@@ -895,7 +895,7 @@ drawable-port-ldpi/
895895
drawable-port-notouch-12key/
896896
</pre>
897897
<p class="note"><strong>Exception:</strong> Screen pixel density is the one qualifier that is not
898-
eliminated due to a contradiction. Even though the screen density of the device is mdpi,
898+
eliminated due to a contradiction. Even though the screen density of the device is hdpi,
899899
<code>drawable-port-ldpi/</code> is not eliminated because every screen density is
900900
considered to be a match at this point. More information is available in the <a
901901
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
@@ -922,9 +922,8 @@ drawable-en-notouch-12key/
922922
<strike>drawable-port-notouch-12key/</strike>
923923
</pre>
924924
<p class="note"><strong>Exception:</strong> If the qualifier in question is screen pixel density,
925-
Android
926-
selects the option that most closely matches the device, and the selection process is complete.
927-
In general, Android prefers scaling down a larger original image to scaling up a smaller
925+
Android selects the option that most closely matches the device screen density.
926+
In general, Android prefers scaling down a larger original image to scaling up a smaller
928927
original image. See <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
929928
Screens</a>.</p>
930929
</li>

0 commit comments

Comments
 (0)