diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-03-30 16:20:26 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-04-06 11:00:37 -0700 |
commit | 3fc982f41fda1f254bfbc35490d81cd82a0ed90a (patch) | |
tree | 6f9ba92dc2c9001a156f298c37dcdef9c9552600 /docs | |
parent | fb84ce0df6b2db84981e4efa4530397a85240d4a (diff) | |
download | frameworks_base-3fc982f41fda1f254bfbc35490d81cd82a0ed90a.zip frameworks_base-3fc982f41fda1f254bfbc35490d81cd82a0ed90a.tar.gz frameworks_base-3fc982f41fda1f254bfbc35490d81cd82a0ed90a.tar.bz2 |
Add new resource configurations for screen width/height in "dp".
You can now specify resource configuration variants "wNNNdp"
and "hNNNdp". These are the minimum screen width/height in "dp"
units. This allows you to do things like have your app adjust
its layout based only on the about of horizontal space available.
This introduces a new configuration change flag for screen size.
Note that this configuration change happens each time the orientation
changes. Applications often say they handle the orientation change
to avoid being restarted at a screen rotation, and this will now
cause them to be restarted. To address this, we assume the app can
handle this new config change if its target SDK version is < ICS.
Change-Id: I22f8afa136b4f274423978c570fa7c9855040496
Diffstat (limited to 'docs')
-rw-r--r-- | docs/html/guide/topics/resources/providing-resources.jd | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd index 1da2622..10d25bb 100644 --- a/docs/html/guide/topics/resources/providing-resources.jd +++ b/docs/html/guide/topics/resources/providing-resources.jd @@ -383,6 +383,46 @@ is not related to the screen orientation.</p> which indicates whether the screen is long.</p> </td> </tr> + <tr id="ScreenWidthQualifier"> + <td>Screen width</td> + <td>Examples:<br/> + <code>w720dp</code><br/> + <code>w1024dp</code><br/> + etc. + </td> + <td> + <p>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. + <p><em>Added in API Level 13.</em></p> + <p>Also see the {@link android.content.res.Configuration#screenWidthDp} + configuration field, which holds the current screen width.</p> + </td> + </tr> + <tr id="ScreenHeightQualifier"> + <td>Screen height</td> + <td>Examples:<br/> + <code>h720dp</code><br/> + <code>h1024dp</code><br/> + etc. + </td> + <td> + <p>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. + <p><em>Added in API Level 13.</em></p> + <p>Also see the {@link android.content.res.Configuration#screenHeightDp} + configuration field, which holds the current screen width.</p> + </td> + </tr> <tr id="OrientationQualifier"> <td>Screen orientation</td> <td> |