From 3e0a3d5b488dd8f392f555a322a7030cb1cd392a Mon Sep 17 00:00:00 2001 From: Gilles Debunne Date: Wed, 28 Jul 2010 09:01:34 -0700 Subject: 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. Change-Id: Icf7494c23f7e3af7d3c6aab770d0ba3c1fea2ebf --- docs/html/guide/topics/resources/providing-resources.jd | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd index 7e2f8a0..1d6ab25 100644 --- a/docs/html/guide/topics/resources/providing-resources.jd +++ b/docs/html/guide/topics/resources/providing-resources.jd @@ -450,8 +450,8 @@ application during runtime.

to match the device density.

Added in API Level 4.

-

There is thus a 4:3 scaling factor between each density, so a 9x9 bitmap - in ldpi is 12x12 in mdpi and 16x16 in hdpi.

+

There is thus a 3:4:6 scaling ratio between the three densities, so a 9x9 bitmap + in ldpi is 12x12 in mdpi and 18x18 in hdpi.

When Android selects which resource files to use, it handles screen density differently than the other qualifiers. In step 1 of How Android finds the best @@ -895,7 +895,7 @@ drawable-port-ldpi/ drawable-port-notouch-12key/

Exception: Screen pixel density is the one qualifier that is not -eliminated due to a contradiction. Even though the screen density of the device is mdpi, +eliminated due to a contradiction. Even though the screen density of the device is hdpi, drawable-port-ldpi/ is not eliminated because every screen density is considered to be a match at this point. More information is available in the Supporting Multiple @@ -922,9 +922,8 @@ drawable-en-notouch-12key/ drawable-port-notouch-12key/

Exception: If the qualifier in question is screen pixel density, -Android -selects the option that most closely matches the device, and the selection process is complete. -In general, Android prefers scaling down a larger original image to scaling up a smaller +Android selects the option that most closely matches the device screen density. +In general, Android prefers scaling down a larger original image to scaling up a smaller original image. See Supporting Multiple Screens.

-- cgit v1.1