From 22d17c984ae91e85a67d3fc03c092538c5080b0f Mon Sep 17 00:00:00 2001 From: Scott Main Date: Tue, 30 Oct 2012 17:02:18 -0700 Subject: [PATCH] docs: misc changes for new manifest attributes, including fix for bug 7443821 bug 7442263 Change-Id: I20b712bf2b0379c70ff28682025d6f30817a6c36 --- .../guide/topics/manifest/activity-element.jd | 10 ++++++++-- .../topics/manifest/application-element.jd | 18 ++++++++++++++++- .../topics/manifest/permission-element.jd | 2 +- .../topics/resources/providing-resources.jd | 20 +++++++++++++------ 4 files changed, 40 insertions(+), 10 deletions(-) diff --git a/docs/html/guide/topics/manifest/activity-element.jd b/docs/html/guide/topics/manifest/activity-element.jd index 844be11468b96..2aedaec3822de 100644 --- a/docs/html/guide/topics/manifest/activity-element.jd +++ b/docs/html/guide/topics/manifest/activity-element.jd @@ -218,7 +218,8 @@ separated by '{@code |}' — for example, "{@code locale|navigation|orientat "{@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. +android.app.UiModeManager}. + Added in API level 8. "{@code orientation}" The screen orientation has changed — the user has rotated the device. @@ -246,7 +247,12 @@ smallestWidth configuration. However, if your application targets API level your activity always handles this configuration change itself (this configuration change does not restart your activity, even when running on an Android 3.2 or higher device).

Added in API level 13.

- + + "{@code layoutDirection}" + The layout direction has changed. For example, changing from left-to-right (LTR) + to right-to-left (RTL). + Added in API level 17. +

diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd index 2105a5048318e..42cfdd56ae104 100644 --- a/docs/html/guide/topics/manifest/application-element.jd +++ b/docs/html/guide/topics/manifest/application-element.jd @@ -23,6 +23,7 @@ parent.link=manifest-intro.html android:persistent=["true" | "false"] android:process="string" android:restoreAnyVersion=["true" | "false"] + android:supportsRtl=["true" | "false"] android:taskAffinity="string" android:theme="resource or theme" android:uiOptions=["none" | "splitActionBarWhenNarrow"] > @@ -271,7 +272,7 @@ applications, reducing resource usage.

{@code android:restoreAnyVersion}
-
Indicate that the application is prepared to attempt a restore of any +
Indicates that the application is prepared to attempt a restore of any backed-up data set, even if the backup was stored by a newer version of the application than is currently installed on the device. Setting this attribute to {@code true} will permit the Backup Manager to @@ -281,6 +282,21 @@ incompatible. Use with caution!

The default value of this attribute is {@code false}.

+
{@code android:supportsRtl}
+
Declares whether your application is willing to support right-to-left (RTL) layouts. +

If set to {@code true} and {@code targetSdkVersion} is set to 17 or higher, various RTL APIs will be +activated and used by the system so your app can display RTL layouts. +If set to {@code false} or if {@code targetSdkVersion} is set to 16 or lower, the RTL APIs will be ignored +or will have no effect and your app will behave the same regardless of the layout +direction associated to the user's Locale choice (your layouts will always be left-to-right). + +

The default value of this attribute is {@code false}.

+ +

This attribute was added in API level 17.

+
+
{@code android:taskAffinity}
An affinity name that applies to all activities within the application, except for those that set a different affinity with their own diff --git a/docs/html/guide/topics/manifest/permission-element.jd b/docs/html/guide/topics/manifest/permission-element.jd index c256fb1961c1b..a23fb4be7357e 100644 --- a/docs/html/guide/topics/manifest/permission-element.jd +++ b/docs/html/guide/topics/manifest/permission-element.jd @@ -111,7 +111,7 @@ The value can be set to one of the following strings: "{@code signatureOrSystem}" A permission that the system grants only to applications that are in the Android system image or that are signed with the same - certificates as those in the system image. Please avoid using this + certificate as the application that declared the permission. Please avoid using this option, as the {@code signature} protection level should be sufficient for most needs and works regardless of exactly where applications are installed. The "{@code signatureOrSystem}" diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd index 749e458300caf..b311b7f29b204 100644 --- a/docs/html/guide/topics/resources/providing-resources.jd +++ b/docs/html/guide/topics/resources/providing-resources.jd @@ -331,14 +331,13 @@ indicates the current locale.

Layout Direction - Examples:
- ldrtl
+ ldrtl
ldltr

The layout direction of your application. {@code ldrtl} means "layout-direction-right-to-left". {@code ldltr} means "layout-direction-left-to-right" and is the default implicit value.

-

This can apply to any resource like layouts or values or drawables. +

This can apply to any resource such as layouts, drawables, or values.

For example, if you want to provide some specific layout for the Arabic language and some generic layout for any other "right-to-left" language (like Persian or Hebrew) then you would have: @@ -346,12 +345,21 @@ indicates the current locale.

 res/
     layout/   
-        main.xml  (This is the default layout)
+        main.xml  (Default layout)
     layout-ar/  
-        main.xml  (This is the specific layout for Arabic)
+        main.xml  (Specific layout for Arabic)
     layout-ldrtl/  
-        main.xml  (This applies to any "right-to-left" language, except for Arabic, because the ar language qualifier has a higher precedence.)
+        main.xml  (Any "right-to-left" language, except
+                  for Arabic, because the "ar" language qualifier
+                  has a higher precedence.)
 
+

Note: To enable right-to-left layout features + for your app, you must set {@code + supportsRtl} to {@code "true"} and set {@code targetSdkVersion} to 17 or higher.

+

Added in API level 17.