summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2010-09-02 17:53:14 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-02 17:53:14 -0700
commitc5083cdfff55a8fdcc82198273afd7dbe6379879 (patch)
treebe1cbc957c31e132612117ec3f6649456deaf863 /docs
parentac3c1f550f30aa793ccf5dcd0da55b070fd55364 (diff)
parent87dfc3d0f9dc9dcef5fc0dbada996a633e82af29 (diff)
downloadframeworks_base-c5083cdfff55a8fdcc82198273afd7dbe6379879.zip
frameworks_base-c5083cdfff55a8fdcc82198273afd7dbe6379879.tar.gz
frameworks_base-c5083cdfff55a8fdcc82198273afd7dbe6379879.tar.bz2
Merge "clarify dp dimension description" into froyo
Diffstat (limited to 'docs')
-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