From e756b21636f2660bb15b26ebbefc8046426bdade Mon Sep 17 00:00:00 2001 From: Scott Main Date: Tue, 6 Apr 2010 16:29:51 -0700 Subject: docs: add a screenLayout and uiMode values for configChanges attribute add note that this should be avoided and point to dev guide Change-Id: I977660c14da71eaf8beb1d630cbb4f6a2f26bb50 --- .../html/guide/topics/manifest/activity-element.jd | 54 ++++++++++++++-------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd index 41c27c64f265..de8ca6d8950b 100644 --- a/docs/html/guide/topics/manifest/activity-element.jd +++ b/docs/html/guide/topics/manifest/activity-element.jd @@ -8,7 +8,8 @@ page.title=<activity> android:clearTaskOnLaunch=["true" | "false"] android:configChanges=["mcc", "mnc", "locale", "touchscreen", "keyboard", "keyboardHidden", - "navigation", "orientation", "fontScale"] + "navigation", "orientation", "screenLayout", + "fontScale", "uiMode"] android:enabled=["true" | "false"] android:excludeFromRecents=["true" | "false"] android:exported=["true" | "false"] @@ -152,13 +153,19 @@ as described above.

{@code android:configChanges}
-
Lists configuration changes that the activity will handle itself. When -changes that are not listed occur, the activity is shut down and restarted. -When a listed change occurs, the activity remains running and its {@link android.app.Activity#onConfigurationChanged onConfigurationChanged()} -method is called. +
Lists configuration changes that the activity will handle itself. When a configuration +change occurs at runtime, the activity is shut down and restarted by default, but declaring a +configuration with this attribute will prevent the activity from being restarted. Instead, the +activity remains running and its {@link android.app.Activity#onConfigurationChanged +onConfigurationChanged()} method is called. + +

Note: Using this attribute should be +avoided and used only as a last-resort. Please read Handling Runtime Changes for more +information about how to properly handle a restart due to a configuration change.

-Any or all of the following strings can be used to set this attribute. Values are +Any or all of the following strings are valid values for this attribute. Multiple values are separated by '{@code |}' — for example, "{@code locale|navigation|orientation}".

@@ -168,39 +175,48 @@ separated by '{@code |}' — for example, "{@code locale|navigation|orientat Description "{@code mcc}" - The IMSI mobile country code (MCC) has changed — - that is, a SIM has been detected and updated the MCC. + The IMSI mobile country code (MCC) has changed — + a SIM has been detected and updated the MCC. "{@code mnc}" - The IMSI mobile network code (MNC) has changed — - that is, a SIM has been detected and updated the MNC. + The IMSI mobile network code (MNC) has changed — + a SIM has been detected and updated the MNC. "{@code locale}" - The locale has changed — for example, the user has selected a new + The locale has changed — the user has selected a new language that text should be displayed in. "{@code touchscreen}" The touchscreen has changed. (This should never normally happen.) "{@code keyboard}" - The keyboard type has changed — for example, the user has + The keyboard type has changed — for example, the user has plugged in an external keyboard. "{@code keyboardHidden}" - The keyboard accessibility has changed — for example, the - user has slid the keyboard out to expose it. + The keyboard accessibility has changed — for example, the + user has revealed the hardware keyboard. "{@code navigation}" - The navigation type has changed. (This should never normally happen.) + The navigation type (trackball/dpad) has changed. (This should never normally happen.) - "{@code orientation}" - The screen orientation has changed — that is, the user has rotated + "{@code orientation}" + The screen orientation has changed — the user has rotated the device. + + "{@code screenLayout}" + The screen layout has changed — this might be caused by a + different display being activated. "{@code fontScale}" - The font scaling factor has changed — that is, the user has selected + The font scaling factor has changed — the user has selected a new global font size. - + + "{@code uiMode}" + The user interface mode has changed — this can be caused when the user places the +device into a desk/car dock or when the the night mode changes. See {@link +android.app.UiModeManager}. Introduced in API Level 8. +

-- cgit v1.2.3-59-g8ed1b