diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index ad7c51ad86b72..0aaa5b7a26b36 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -547,7 +547,10 @@ + of the screen. +

This attribute is supported by the {@code <activity>} + element. --> + orientation will changed based on how the user rotates the device. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED}. --> + is, with the display wider than it is tall, ignoring sensor data. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_LANDSCAPE}. --> + is, with the display taller than it is wide, ignoring sensor data. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_PORTRAIT}. --> - + + this activity. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_BEHIND}. --> + Ignores user's setting to turn off sensor-based rotation. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_SENSOR}. --> + the display will not rotate when the user moves the device. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_NOSENSOR}. --> + use the sensor to change which direction the screen is facing. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_SENSOR_LANDSCAPE}. --> + use the sensor to change which direction the screen is facing. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_SENSOR_PORTRAIT}. --> + the opposite direction from normal landscape. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_REVERSE_LANDSCAPE}. --> + the opposite direction from normal portrait. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_REVERSE_PORTRAIT}. --> + normally use 180 degree rotation). + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_FULL_SENSOR}. --> + sensor to change which direction the screen is facing. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_USER_LANDSCAPE}. --> + sensor to change which direction the screen is facing. + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_USER_PORTRAIT}. --> + normally use 180 degree rotation). + Corresponds to + {@link android.content.pm.ActivityInfo#SCREEN_ORIENTATION_FULL_USER}. --> - + diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd index c9f505f3b8a7e..adc795d6437fc 100644 --- a/docs/html/guide/topics/manifest/activity-element.jd +++ b/docs/html/guide/topics/manifest/activity-element.jd @@ -27,11 +27,13 @@ parent.link=manifest-intro.html android:parentActivityName="string" android:permission="string" android:process="string" - android:screenOrientation=["unspecified" | "user" | "behind" | + android:screenOrientation=["unspecified" | "behind" | "landscape" | "portrait" | "reverseLandscape" | "reversePortrait" | "sensorLandscape" | "sensorPortrait" | - "sensor" | "fullSensor" | "nosensor"] + "userLandscape" | "userPortrait" | + "sensor" | "fullSensor" | "nosensor" | + "user" | "fullUser" | "locked"] android:stateNotNeeded=["true" | "false"] android:taskAffinity="string" android:theme="resource or theme" @@ -643,9 +645,6 @@ resource usage. The default value. The system chooses the orientation. The policy it uses, and therefore the choices made in specific contexts, may differ from device to device. - - "{@code user}" - The user's current preferred orientation. "{@code behind}" The same orientation as the activity that's immediately beneath it in @@ -674,6 +673,18 @@ sensor. Portrait orientation, but can be either normal or reverse portrait based on the device sensor. Added in API level 9. + + "{@code userLandscape}" + Landscape orientation, but can be either normal or reverse landscape based on the device +sensor and the user's sensor preference. If the user has locked sensor-based rotation, this behaves +the same as {@code landscape}, otherwise it behaves the same as {@code sensorLandscape}. +Added in API level 18. + + "{@code userPortrait}" + Portrait orientation, but can be either normal or reverse portrait based on the device +sensor and the user's sensor preference. If the user has locked sensor-based rotation, this behaves +the same as {@code portrait}, otherwise it behaves the same as {@code sensorPortrait}. +Added in API level 18. "{@code sensor}" The orientation is determined by the device orientation sensor. The orientation of the @@ -692,6 +703,19 @@ portrait or reverse landscape, but this enables those). Added in API level 9 is ignored, so the display will not rotate based on how the user moves the device. Except for this distinction, the system chooses the orientation using the same policy as for the "{@code unspecified}" setting. + + "{@code user}" + The user's current preferred orientation. + + "{@code fullUser}" + If the user has locked sensor-based rotation, this behaves the same as {@code user}, + otherwise it behaves the same as {@code fullSensor} and allows any of the 4 possible + screen orientations. + Added in API level 18. + + "{@code locked}" + Locks the orientation to its current rotation, whatever that is. +Added in API level 18.