summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2012-11-01 15:14:24 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-11-01 15:14:25 -0700
commit465c37533ac1fb76d76b062452ae19afb84aab0a (patch)
treec503955516060dfebdcef38cf1b795a9be2907b8
parentb9372de07d3329928f28104bb997aab57237504c (diff)
parent22d17c984ae91e85a67d3fc03c092538c5080b0f (diff)
downloadframeworks_base-465c37533ac1fb76d76b062452ae19afb84aab0a.zip
frameworks_base-465c37533ac1fb76d76b062452ae19afb84aab0a.tar.gz
frameworks_base-465c37533ac1fb76d76b062452ae19afb84aab0a.tar.bz2
Merge "docs: misc changes for new manifest attributes, including fix for bug 7443821 bug 7442263" into jb-mr1-dev
-rw-r--r--docs/html/guide/topics/manifest/activity-element.jd10
-rw-r--r--docs/html/guide/topics/manifest/application-element.jd18
-rw-r--r--docs/html/guide/topics/manifest/permission-element.jd2
-rw-r--r--docs/html/guide/topics/resources/providing-resources.jd20
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 844be11..2aedaec 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 |}' &mdash; for example, "{@code locale|navigation|orientat
<td>"{@code uiMode}"</td>
<td>The user interface mode has changed &mdash; 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}. <em>Introduced in API Level 8</em>.</td>
+android.app.UiModeManager}.
+ <em>Added in API level 8</em>.</td>
</tr><tr>
<td>"{@code orientation}"</td>
<td>The screen orientation has changed &mdash; the user has rotated the device.
@@ -246,7 +247,12 @@ smallestWidth configuration</a>. 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).
<p><em>Added in API level 13.</em></p></td>
- </tr>
+ </tr><tr>
+ <td>"{@code layoutDirection}"</td>
+ <td>The layout direction has changed. For example, changing from left-to-right (LTR)
+ to right-to-left (RTL).
+ <em>Added in API level 17.</em></td>
+ </tr>
</table>
<p>
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index 2105a50..42cfdd5 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:<a href="#persistent">persistent</a>=["true" | "false"]
android:<a href="#proc">process</a>="<i>string</i>"
android:<a href="#restoreany">restoreAnyVersion</a>=["true" | "false"]
+ android:<a href="#supportsrtl">supportsRtl</a>=["true" | "false"]
android:<a href="#aff">taskAffinity</a>="<i>string</i>"
android:<a href="#theme">theme</a>="<i>resource or theme</i>"
android:<a href="#uioptions">uiOptions</a>=["none" | "splitActionBarWhenNarrow"] &gt;
@@ -271,7 +272,7 @@ applications, reducing resource usage.
</p></dd>
<dt><a name="restoreany"></a>{@code android:restoreAnyVersion}</dt>
-<dd>Indicate that the application is prepared to attempt a restore of any
+<dd>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. <em>Use with caution!</em>
<p>The default value of this attribute is {@code false}.
</p></dd>
+<dt><a name="supportsrtl"></a>{@code android:supportsRtl}</dt>
+<dd>Declares whether your application is willing to support right-to-left (RTL) layouts.
+<p>If set to {@code true} and <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+>{@code targetSdkVersion}</a> 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 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+>{@code targetSdkVersion}</a> 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).
+
+<p>The default value of this attribute is {@code false}.</p>
+
+<p>This attribute was added in API level 17.</p>
+</dd>
+
<dt><a name="aff"></a>{@code android:taskAffinity}</dt>
<dd>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 c256fb1..a23fb4b 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:
<td>"{@code signatureOrSystem}"</td>
<td>A permission that the system grants only to applications that are
in the Android system image <em>or</em> 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 749e458..b311b7f 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.</p>
</tr>
<tr id="LayoutDirectionQualifier">
<td>Layout Direction</td>
- <td>Examples:<br/>
- <code>ldrtl</code><br/>
+ <td><code>ldrtl</code><br/>
<code>ldltr</code><br/>
</td>
<td><p>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.
</p>
- <p>This can apply to any resource like layouts or values or drawables.
+ <p>This can apply to any resource such as layouts, drawables, or values.
</p>
<p>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.</p>
<pre class="classic no-pretty-print">
res/
layout/ <span style="color:black">
- main.xml </span>(This is the default layout)
+ main.xml </span>(Default layout)
layout-ar/ <span style="color:black">
- main.xml </span>(This is the specific layout for Arabic)
+ main.xml </span>(Specific layout for Arabic)
layout-ldrtl/ <span style="color:black">
- main.xml </span>(This applies to any "right-to-left" language, except for Arabic, because the ar language qualifier has a higher precedence.)
+ main.xml </span>(Any "right-to-left" language, except
+ for Arabic, because the "ar" language qualifier
+ has a higher precedence.)
</pre>
+ <p class="note"><strong>Note:</strong> To enable right-to-left layout features
+ for your app, you must set <a
+ href="{@docRoot}guide/topics/manifest/application-element.html#supportsrtl">{@code
+ supportsRtl}</a> to {@code "true"} and set <a
+ href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
+ >{@code targetSdkVersion}</a> to 17 or higher.</p>
+ <p><em>Added in API level 17.</em></p>
</td>
</tr>
<tr id="SmallestScreenWidthQualifier">