summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Scott Main <smain@google.com> 2010-09-02 18:30:16 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2010-09-02 18:30:16 -0700
commit3208557edca8c133fa32b7718acd22d77f1a9475 (patch)
treeba2b4aeb0f5f9e61767f978c8fc6448077cea9d2
parent7ed7668b30e70ca8e3f0f183364433326ed29f39 (diff)
parentc5083cdfff55a8fdcc82198273afd7dbe6379879 (diff)
am c5083cdf: Merge "clarify dp dimension description" into froyo
Merge commit 'c5083cdfff55a8fdcc82198273afd7dbe6379879' into gingerbread * commit 'c5083cdfff55a8fdcc82198273afd7dbe6379879': clarify dp dimension description
-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 a6475713eb92..6cae1eb4153c 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