diff options
author | Scott Main <smain@google.com> | 2012-02-09 10:09:14 -0800 |
---|---|---|
committer | Scott Main <smain@google.com> | 2012-02-09 12:45:16 -0800 |
commit | 52bfc243684b2f340da326aaa38e9021e4e3b2e6 (patch) | |
tree | d4f54b539bf5125f8e4f5aac3a7577cc08703559 /docs/html/guide/topics/resources | |
parent | 09ff04d7893a9f49e478bb732ce1ea1b17662a3b (diff) | |
download | frameworks_base-52bfc243684b2f340da326aaa38e9021e4e3b2e6.zip frameworks_base-52bfc243684b2f340da326aaa38e9021e4e3b2e6.tar.gz frameworks_base-52bfc243684b2f340da326aaa38e9021e4e3b2e6.tar.bz2 |
docs: fix misc doc bugs from external issue tracker
Change-Id: If6ff3476670e42b321d56d4a1482ccff96d4d500
Diffstat (limited to 'docs/html/guide/topics/resources')
-rw-r--r-- | docs/html/guide/topics/resources/drawable-resource.jd | 1 | ||||
-rw-r--r-- | docs/html/guide/topics/resources/more-resources.jd | 24 |
2 files changed, 13 insertions, 12 deletions
diff --git a/docs/html/guide/topics/resources/drawable-resource.jd b/docs/html/guide/topics/resources/drawable-resource.jd index 80de9f9..a34ed6c 100644 --- a/docs/html/guide/topics/resources/drawable-resource.jd +++ b/docs/html/guide/topics/resources/drawable-resource.jd @@ -1248,7 +1248,6 @@ the right edge, a right gravity clips the left edge, and neither clips both edge android:drawable="@drawable/android" android:clipOrientation="horizontal" android:gravity="left" /> -</clip> </pre> <p>The following layout XML applies the clip drawable to a View:</p> <pre> diff --git a/docs/html/guide/topics/resources/more-resources.jd b/docs/html/guide/topics/resources/more-resources.jd index 972eab9..d37b9f8 100644 --- a/docs/html/guide/topics/resources/more-resources.jd +++ b/docs/html/guide/topics/resources/more-resources.jd @@ -216,27 +216,29 @@ 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 (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> + <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, on which 1dp is roughly equal +to 1px. When running on a higher density screen, the number of pixels used to draw 1dp is scaled up +by a factor appropriate for the screen's dpi. Likewise, when on a lower density screen, the number +of pixels used for 1dp is scaled down. The ratio of dp-to-pixel will change with the screen density, +but not necessarily in direct proportion. Using dp units (instead of px units) is a simple solution +to making the view dimensions in your layout resize properly for different screen densities. In +other words, it provides consistency for the real-world sizes of your UI elements across different +devices.</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 + <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 for both the screen density and the user's preference.</dd> <dt>{@code pt}</dt> <dd>Points - 1/72 of an inch based on the physical size of the screen.</dd> <dt>{@code px}</dt> - <dd>Pixels - corresponds to actual pixels on the screen. This unit of measure is not recommended because + <dd>Pixels - Corresponds to actual pixels on the screen. This unit of measure is not recommended because the actual representation can vary across devices; each devices may have a different number of pixels per inch and may have more or fewer total pixels available on the screen.</dd> <dt>{@code mm}</dt> - <dd>Millimeters - based on the physical size of the screen.</dd> + <dd>Millimeters - Based on the physical size of the screen.</dd> <dt>{@code in}</dt> - <dd>Inches - based on the physical size of the screen.</dd> + <dd>Inches - Based on the physical size of the screen.</dd> </dl> <p class="note"><strong>Note:</strong> A dimension is a simple resource that is referenced |