From ce67da79e75e8fc601fb8de95a89f88b9cb9b0f3 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 13 Jun 2011 22:01:13 -0700 Subject: [PATCH] Update resources documentation with new qualifiers. Change-Id: I4a3e0d3ece64d8a177157e469c39dbb282094373 --- .../topics/resources/providing-resources.jd | 120 ++++++++++++------ 1 file changed, 80 insertions(+), 40 deletions(-) diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd index 59f2e731dba5a..a996ccc08d761 100644 --- a/docs/html/guide/topics/resources/providing-resources.jd +++ b/docs/html/guide/topics/resources/providing-resources.jd @@ -333,6 +333,86 @@ your application for other languages.

indicates the current locale.

+ + Smallest screen width + Examples:
+ sw320dp
+ sw600dp
+ sw720dp
+ etc. + + +

Specifies a minimum "smallest screen width," in "dp" units, at which the resource + should be used. This configuration value represents the base screen size + of the device, regardless of the orientation of the display. It is based + on the smallest width the application will have in which to perform its + UI layout (in dp units) regardless of the orientation of the screen. The + value here takes into account screen decorations so if the device has some + persistent UI elements on the left or right edge of the display it must + present a value here that is smaller than the real screen size, accounting + for these UI elements reducing the application's available space.

+

Some values you may use here for common screen sizes:

+ +

Added in API Level 13.

+

Also see the {@link android.content.res.Configuration#smallestScreenWidthDp} + configuration field, which holds the current smallest screen width.

+ + + + Screen width + Examples:
+ w720dp
+ w1024dp
+ etc. + + +

Specifies a minimum screen width, in "dp" units, at which the resource + should be used. This configuration value will change when the orientation + changes between landscape and portrait to match the current actual width. + When multiple screen width configurations are available, the closest to + the current screen width will be used. The + value here takes into account screen decorations so if the device has some + persistent UI elements on the left or right edge of the display it must + present a value here that is smaller than the real screen size, accounting + for these UI elements reducing the application's available space.

+

Added in API Level 13.

+

Also see the {@link android.content.res.Configuration#screenWidthDp} + configuration field, which holds the current screen width.

+ + + + Screen height + Examples:
+ h720dp
+ h1024dp
+ etc. + + +

Specifies a minimum screen height, in "dp" units, at which the resource + should be used. This configuration value will change when the orientation + changes between landscape and portrait to match the current actual height. + When multiple screen height configurations are available, the closest to + the current screen height will be used. The + value here takes into account screen decorations so if the device has some + persistent UI elements on the left or right edge of the display it must + present a value here that is smaller than the real screen size, accounting + for these UI elements reducing the application's available space. Screen + decorations that are not fixed (such as a phone status bar that can be + hidden when full screen) are not accounted for here, nor are + window decorations like title bar, so applications must be prepared to + deal with a somewhat smaller space than they specify. +

Added in API Level 13.

+

Also see the {@link android.content.res.Configuration#screenHeightDp} + configuration field, which holds the current screen width.

+ + Screen size @@ -392,46 +472,6 @@ is not related to the screen orientation.

which indicates whether the screen is long.

- - Screen width - Examples:
- w720dp
- w1024dp
- etc. - - -

Specifies a minimum screen width, in "dp" units, at which the resource - should be used. This configuration value will change when the orientation - changes between landscape and portrait to match the current actual width. - When multiple screen width configurations are available, the closest to - the current screen width will be used. The value specified here is - approximate; screen decorations like a status bar or system bar may cause - the actual space available in your UI to be slightly smaller. -

Added in API Level 13.

-

Also see the {@link android.content.res.Configuration#screenWidthDp} - configuration field, which holds the current screen width.

- - - - Screen height - Examples:
- h720dp
- h1024dp
- etc. - - -

Specifies a minimum screen height, in "dp" units, at which the resource - should be used. This configuration value will change when the orientation - changes between landscape and portrait to match the current actual height. - When multiple screen height configurations are available, the closest to - the current screen height will be used. The value specified here is - approximate; screen decorations like a status bar or system bar may cause - the actual space available in your UI to be slightly smaller. -

Added in API Level 13.

-

Also see the {@link android.content.res.Configuration#screenHeightDp} - configuration field, which holds the current screen width.

- - Screen orientation