OSDN Git Service

clarify dp dimension description
authorScott Main <smain@google.com>
Wed, 11 Aug 2010 22:34:54 +0000 (15:34 -0700)
committerScott Main <smain@google.com>
Mon, 16 Aug 2010 21:46:23 +0000 (14:46 -0700)
Change-Id: I85152f8ab668984ca9db3a4f56c4f8a5ab6ebacd

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

index a647571..6cae1eb 100644 (file)
@@ -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