Skip to content

Commit 2507f78

Browse files
scottamainAndroid Git Automerger
authored andcommitted
am 8da1191: cherrypick from hc-mr2 Change-Id: I76de309e70026720d30772ff5b428f7aefc8de4c docs: add docs about "screenSize" configuration changes
* commit '8da119148fb8c20ec49917a6c106a0f731227238': cherrypick from hc-mr2 Change-Id: I76de309e70026720d30772ff5b428f7aefc8de4c docs: add docs about "screenSize" configuration changes
2 parents a324c9d + 8da1191 commit 2507f78

File tree

3 files changed

+124
-96
lines changed

3 files changed

+124
-96
lines changed

docs/html/guide/practices/screen-compat-mode.jd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Mode</a>.</p>
4848
to resize for larger screens such as tablets. Since Android 1.6, Android has supported a
4949
variety of screen sizes and does most of the work to resize application layouts so that they
5050
properly fit each screen. However, if your application does not successfully follow the guide to
51-
<a href="{@docRoot}guide/topics/practices/screens_support.html">Supporting Multiple Screens</a>,
51+
<a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>,
5252
then it might encounter some rendering issues on larger screens. For applications with this
5353
problem, screen compatibility mode can make the application a little more usable on larger
5454
screens.</p>
@@ -83,7 +83,7 @@ which will usually cause artifacts such as blurring and pixelation in your UI.
8383
<p>This was introduced with Android 3.2 to further
8484
assist applications on the latest tablet devices when the applications have not yet
8585
implemented techniques for <a
86-
href="{@docRoot}guide/topics/practices/screens_support.html">Supporting Multiple
86+
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
8787
Screens</a>.</p>
8888
<p>In general, large screen devices running Android 3.2 or higher allow users to enable
8989
screen compatibility mode when the application does not <strong>explicitly declare that it supports
@@ -211,7 +211,7 @@ href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
211211
which you should want your application to run&mdash;it causes pixelation and blurring in your UI,
212212
due to zooming. The proper way to make your application work well on large screens is to follow the
213213
guide to <a
214-
href="{@docRoot}guide/topics/practices/screens_support.html">Supporting Multiple Screens</a> and
214+
href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a> and
215215
provide alternative layouts for different screen sizes.</p>
216216

217217
<p>By default, when you've set either <a

docs/html/guide/topics/manifest/activity-element.jd

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ parent.link=manifest-intro.html
1010
android:<a href="#clear">clearTaskOnLaunch</a>=["true" | "false"]
1111
android:<a href="#config">configChanges</a>=["mcc", "mnc", "locale",
1212
"touchscreen", "keyboard", "keyboardHidden",
13-
"navigation", "orientation", "screenLayout",
14-
"fontScale", "uiMode"]
13+
"navigation", "screenLayout", "fontScale", "uiMode",
14+
"orientation", "screenSize", "smallestScreenSize"]
1515
android:<a href="#enabled">enabled</a>=["true" | "false"]
1616
android:<a href="#exclude">excludeFromRecents</a>=["true" | "false"]
1717
android:<a href="#exported">exported</a>=["true" | "false"]
@@ -205,10 +205,6 @@ separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientat
205205
<td>"{@code navigation}"</td>
206206
<td>The navigation type (trackball/dpad) has changed. (This should never normally happen.)</td>
207207
</tr><tr>
208-
<td>"{@code orientation}"</td>
209-
<td>The screen orientation has changed &mdash; the user has rotated
210-
the device.</td>
211-
</tr><tr>
212208
<td>"{@code screenLayout}"</td>
213209
<td>The screen layout has changed &mdash; this might be caused by a
214210
different display being activated.</td>
@@ -221,7 +217,34 @@ separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientat
221217
<td>The user interface mode has changed &mdash; this can be caused when the user places the
222218
device into a desk/car dock or when the the night mode changes. See {@link
223219
android.app.UiModeManager}. <em>Introduced in API Level 8</em>.</td>
224-
</tr>
220+
</tr><tr>
221+
<td>"{@code orientation}"</td>
222+
<td>The screen orientation has changed &mdash; the user has rotated the device.
223+
<p class="note"><strong>Note:</strong> If your application targets API level 13 or higher (as
224+
declared by the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
225+
minSdkVersion}</a> and <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
226+
targetSdkVersion}</a> attributes), then you should also declare the {@code "screenSize"}
227+
configuration, because it also changes when a device switches between portrait and landscape
228+
orientations.</p></td>
229+
</tr><tr>
230+
<td>"{@code screenSize}"</td>
231+
<td>The current available screen size has changed. This represents a change in the currently
232+
available size, relative to the current aspect ratio, so will change when the user switches between
233+
landscape and portrait. However, if your application targets API level 12 or lower, then your
234+
activity always handles this configuration change itself (this configuration change does not restart
235+
your activity, even when running on an Android 3.2 or higher device).
236+
<p><em>Added in API level 13.</em></p></td>
237+
</tr><tr>
238+
<td>"{@code smallestScreenSize}"</td>
239+
<td>The physical screen size has changed. This represents a change in size regardless of
240+
orientation, so will only change when the actual physical screen size has changed such as switching
241+
to an external display. A change to this configuration corresponds to a change in the <a
242+
href="{@docRoot}guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">
243+
smallestWidth configuration</a>. However, if your application targets API level 12 or lower, then
244+
your activity always handles this configuration change itself (this configuration change does not
245+
restart your activity, even when running on an Android 3.2 or higher device).
246+
<p><em>Added in API level 13.</em></p></td>
247+
</tr>
225248
</table>
226249

227250
<p>

0 commit comments

Comments
 (0)