summaryrefslogtreecommitdiffstats
path: root/docs/html
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2010-08-11 15:34:54 -0700
committerScott Main <smain@google.com>2010-08-16 14:46:23 -0700
commit87dfc3d0f9dc9dcef5fc0dbada996a633e82af29 (patch)
tree857d6d28ee2e97e36c32c92e54ab050e3360c17b /docs/html
parent2abde6e0ddaed3d2d60bad984a2adc3acbb8164c (diff)
downloadframeworks_base-87dfc3d0f9dc9dcef5fc0dbada996a633e82af29.zip
frameworks_base-87dfc3d0f9dc9dcef5fc0dbada996a633e82af29.tar.gz
frameworks_base-87dfc3d0f9dc9dcef5fc0dbada996a633e82af29.tar.bz2
clarify dp dimension description
Change-Id: I85152f8ab668984ca9db3a4f56c4f8a5ab6ebacd
Diffstat (limited to 'docs/html')
-rw-r--r--docs/html/guide/topics/resources/more-resources.jd11
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/html/guide/topics/resources/more-resources.jd b/docs/html/guide/topics/resources/more-resources.jd
index a647571..6cae1eb 100644
--- a/docs/html/guide/topics/resources/more-resources.jd
+++ b/docs/html/guide/topics/resources/more-resources.jd
@@ -216,10 +216,13 @@ is specified with a number followed by a unit of measure.
For example: 10px, 2in, 5sp. The following units of measure are supported by Android:</p>
<dl>
<dt>{@code dp}</dt>
- <dd>Density-independent Pixels - an abstract unit that is based on the physical density of the screen.
- These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of
- dp-to-pixel will change with the screen density, but not necessarily in direct proportion. The
- compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".</dd>
+ <dd>Density-independent Pixels - an abstract unit that is based on the physical density of the
+screen. These units are relative to a 160 dpi (dots per inch) screen, so <em>{@code 160dp} is
+always one inch</em> regardless of the screen density. The ratio of dp-to-pixel will change with the
+screen density, but not necessarily in direct proportion. You should use these units when specifying
+view dimensions in your layout, so the UI properly scales to render at the same actual size on
+different screens. (The compiler accepts both "dip" and "dp", though "dp" is more consistent with
+"sp".)</dd>
<dt>{@code sp}</dt>
<dd>Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font
size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted