Skip to content

Commit 465c375

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "docs: misc changes for new manifest attributes, including fix for bug 7443821 bug 7442263" into jb-mr1-dev
2 parents b9372de + 22d17c9 commit 465c375

File tree

4 files changed

+40
-10
lines changed

4 files changed

+40
-10
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ separated by '{@code |}' — for example, "{@code locale|navigation|orientat
218218
<td>"{@code uiMode}"</td>
219219
<td>The user interface mode has changed &mdash; this can be caused when the user places the
220220
device into a desk/car dock or when the the night mode changes. See {@link
221-
android.app.UiModeManager}. <em>Introduced in API Level 8</em>.</td>
221+
android.app.UiModeManager}.
222+
<em>Added in API level 8</em>.</td>
222223
</tr><tr>
223224
<td>"{@code orientation}"</td>
224225
<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
246247
your activity always handles this configuration change itself (this configuration change does not
247248
restart your activity, even when running on an Android 3.2 or higher device).
248249
<p><em>Added in API level 13.</em></p></td>
249-
</tr>
250+
</tr><tr>
251+
<td>"{@code layoutDirection}"</td>
252+
<td>The layout direction has changed. For example, changing from left-to-right (LTR)
253+
to right-to-left (RTL).
254+
<em>Added in API level 17.</em></td>
255+
</tr>
250256
</table>
251257

252258
<p>

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ parent.link=manifest-intro.html
2323
android:<a href="#persistent">persistent</a>=["true" | "false"]
2424
android:<a href="#proc">process</a>="<i>string</i>"
2525
android:<a href="#restoreany">restoreAnyVersion</a>=["true" | "false"]
26+
android:<a href="#supportsrtl">supportsRtl</a>=["true" | "false"]
2627
android:<a href="#aff">taskAffinity</a>="<i>string</i>"
2728
android:<a href="#theme">theme</a>="<i>resource or theme</i>"
2829
android:<a href="#uioptions">uiOptions</a>=["none" | "splitActionBarWhenNarrow"] &gt;
@@ -271,7 +272,7 @@ applications, reducing resource usage.
271272
</p></dd>
272273

273274
<dt><a name="restoreany"></a>{@code android:restoreAnyVersion}</dt>
274-
<dd>Indicate that the application is prepared to attempt a restore of any
275+
<dd>Indicates that the application is prepared to attempt a restore of any
275276
backed-up data set, even if the backup was stored by a newer version
276277
of the application than is currently installed on the device. Setting
277278
this attribute to {@code true} will permit the Backup Manager to
@@ -281,6 +282,21 @@ incompatible. <em>Use with caution!</em>
281282
<p>The default value of this attribute is {@code false}.
282283
</p></dd>
283284

285+
<dt><a name="supportsrtl"></a>{@code android:supportsRtl}</dt>
286+
<dd>Declares whether your application is willing to support right-to-left (RTL) layouts.
287+
<p>If set to {@code true} and <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
288+
>{@code targetSdkVersion}</a> is set to 17 or higher, various RTL APIs will be
289+
activated and used by the system so your app can display RTL layouts.
290+
If set to {@code false} or if <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
291+
>{@code targetSdkVersion}</a> is set to 16 or lower, the RTL APIs will be ignored
292+
or will have no effect and your app will behave the same regardless of the layout
293+
direction associated to the user's Locale choice (your layouts will always be left-to-right).
294+
295+
<p>The default value of this attribute is {@code false}.</p>
296+
297+
<p>This attribute was added in API level 17.</p>
298+
</dd>
299+
284300
<dt><a name="aff"></a>{@code android:taskAffinity}</dt>
285301
<dd>An affinity name that applies to all activities within the application,
286302
except for those that set a different affinity with their own

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ The value can be set to one of the following strings:
111111
<td>"{@code signatureOrSystem}"</td>
112112
<td>A permission that the system grants only to applications that are
113113
in the Android system image <em>or</em> that are signed with the same
114-
certificates as those in the system image. Please avoid using this
114+
certificate as the application that declared the permission. Please avoid using this
115115
option, as the {@code signature} protection level should be sufficient
116116
for most needs and works regardless of exactly where applications are
117117
installed. The "{@code signatureOrSystem}"

docs/html/guide/topics/resources/providing-resources.jd

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,27 +331,35 @@ indicates the current locale.</p>
331331
</tr>
332332
<tr id="LayoutDirectionQualifier">
333333
<td>Layout Direction</td>
334-
<td>Examples:<br/>
335-
<code>ldrtl</code><br/>
334+
<td><code>ldrtl</code><br/>
336335
<code>ldltr</code><br/>
337336
</td>
338337
<td><p>The layout direction of your application. {@code ldrtl} means "layout-direction-right-to-left".
339338
{@code ldltr} means "layout-direction-left-to-right" and is the default implicit value.
340339
</p>
341-
<p>This can apply to any resource like layouts or values or drawables.
340+
<p>This can apply to any resource such as layouts, drawables, or values.
342341
</p>
343342
<p>For example, if you want to provide some specific layout for the Arabic language and some
344343
generic layout for any other "right-to-left" language (like Persian or Hebrew) then you would have:
345344
</p>
346345
<pre class="classic no-pretty-print">
347346
res/
348347
layout/ <span style="color:black">
349-
main.xml </span>(This is the default layout)
348+
main.xml </span>(Default layout)
350349
layout-ar/ <span style="color:black">
351-
main.xml </span>(This is the specific layout for Arabic)
350+
main.xml </span>(Specific layout for Arabic)
352351
layout-ldrtl/ <span style="color:black">
353-
main.xml </span>(This applies to any "right-to-left" language, except for Arabic, because the ar language qualifier has a higher precedence.)
352+
main.xml </span>(Any "right-to-left" language, except
353+
for Arabic, because the "ar" language qualifier
354+
has a higher precedence.)
354355
</pre>
356+
<p class="note"><strong>Note:</strong> To enable right-to-left layout features
357+
for your app, you must set <a
358+
href="{@docRoot}guide/topics/manifest/application-element.html#supportsrtl">{@code
359+
supportsRtl}</a> to {@code "true"} and set <a
360+
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target"
361+
>{@code targetSdkVersion}</a> to 17 or higher.</p>
362+
<p><em>Added in API level 17.</em></p>
355363
</td>
356364
</tr>
357365
<tr id="SmallestScreenWidthQualifier">

0 commit comments

Comments
 (0)