From 1047509e49a7ec1a0fec03352d65567161a99585 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Thu, 6 Sep 2012 14:06:42 -0700 Subject: [PATCH] Update documentation for layout direction qualifiers for Resouces Change-Id: Ief4fa55a361f1b2d0186a701ceb3d3b70afb71df --- .../topics/resources/providing-resources.jd | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd index b0d5d6fc21ee0..b2c95b9ebe34f 100644 --- a/docs/html/guide/topics/resources/providing-resources.jd +++ b/docs/html/guide/topics/resources/providing-resources.jd @@ -329,6 +329,31 @@ your application for other languages.

indicates the current locale.

+ + Layout Direction + Examples:
+ 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. +

+

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: +

+
+res/
+    layout/   
+        main.xml  (This is the default layout)
+    layout-ar/  
+        main.xml  (This is the 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.)
+
+ + smallestWidth sw<N>dp