Skip to content

Commit d672d29

Browse files
Fabrice Di MeglioAndroid (Google) Code Review
authored andcommitted
Merge "Update documentation for layout direction qualifiers for Resouces" into jb-mr1-dev
2 parents bae1d47 + 1047509 commit d672d29

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,31 @@ your application for other languages.</p>
329329
indicates the current locale.</p>
330330
</td>
331331
</tr>
332+
<tr id="LayoutDirectionQualifier">
333+
<td>Layout Direction</td>
334+
<td>Examples:<br/>
335+
<code>ldrtl</code><br/>
336+
<code>ldltr</code><br/>
337+
</td>
338+
<td><p>The layout direction of your application. {@code ldrtl} means "layout-direction-right-to-left".
339+
{@code ldltr} means "layout-direction-left-to-right" and is the default implicit value.
340+
</p>
341+
<p>This can apply to any resource like layouts or values or drawables.
342+
</p>
343+
<p>For example, if you want to provide some specific layout for the Arabic language and some
344+
generic layout for any other "right-to-left" language (like Persian or Hebrew) then you would have:
345+
</p>
346+
<pre class="classic no-pretty-print">
347+
res/
348+
layout/ <span style="color:black">
349+
main.xml </span>(This is the default layout)
350+
layout-ar/ <span style="color:black">
351+
main.xml </span>(This is the specific layout for Arabic)
352+
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.)
354+
</pre>
355+
</td>
356+
</tr>
332357
<tr id="SmallestScreenWidthQualifier">
333358
<td>smallestWidth</td>
334359
<td><code>sw&lt;N&gt;dp</code><br/><br/>

0 commit comments

Comments
 (0)