diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 30ac3f77bf78d..441cdc14db8a2 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -76,6 +76,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Locale;
import java.util.WeakHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -8665,7 +8666,7 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
/**
* Resolving the layout direction. LTR is set initially.
- * We are supposing here that the parent directionality will be resolved before its children
+ * We are supposing here that the parent directionality will be resolved before its children.
*/
private void resolveLayoutDirection() {
mPrivateFlags2 &= ~RESOLVED_LAYOUT_RTL;
@@ -8680,6 +8681,34 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
case LAYOUT_DIRECTION_RTL:
mPrivateFlags2 |= RESOLVED_LAYOUT_RTL;
break;
+ case LAYOUT_DIRECTION_LOCALE:
+ if(isLayoutDirectionRtl(Locale.getDefault())) {
+ mPrivateFlags2 |= RESOLVED_LAYOUT_RTL;
+ }
+ break;
+ default:
+ // Nothing to do, LTR by default
+ }
+ }
+
+ /**
+ * Check if a Locale is corresponding to a RTL script.
+ *
+ * @param locale Locale to check
+ * @return true if a Locale is corresponding to a RTL script.
+ */
+ private static boolean isLayoutDirectionRtl(Locale locale) {
+ if (locale == null || locale.equals(Locale.ROOT)) return false;
+ // Be careful: this code will need to be changed when vertical scripts will be supported
+ // OR if ICU4C is updated to have the "likelySubtags" file
+ switch(Character.getDirectionality(locale.getDisplayName(locale).charAt(0))) {
+ case Character.DIRECTIONALITY_LEFT_TO_RIGHT:
+ return false;
+ case Character.DIRECTIONALITY_RIGHT_TO_LEFT:
+ case Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC:
+ return true;
+ default:
+ return false;
}
}
diff --git a/tests/BiDiTests/Android b/tests/BiDiTests/Android
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/tests/BiDiTests/AndroidManifest.xml b/tests/BiDiTests/AndroidManifest.xml
index ad27a62bc1f00..135c5dde0b589 100644
--- a/tests/BiDiTests/AndroidManifest.xml
+++ b/tests/BiDiTests/AndroidManifest.xml
@@ -57,6 +57,13 @@
+
+
+
+
+
+
@@ -71,6 +78,13 @@
+
+
+
+
+
+
@@ -99,6 +113,13 @@
+
+
+
+
+
+
@@ -113,6 +134,13 @@
+
+
+
+
+
+
diff --git a/tests/BiDiTests/res/layout/basic.xml b/tests/BiDiTests/res/layout/basic.xml
index f254e3c4d40fe..d5f5ba7ff72c5 100644
--- a/tests/BiDiTests/res/layout/basic.xml
+++ b/tests/BiDiTests/res/layout/basic.xml
@@ -15,34 +15,34 @@
-->
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
-
+
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="32dip"
+ android:text="@string/textview_text"
+ />
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:textSize="32dip"
+ />
diff --git a/tests/BiDiTests/res/layout/canvas.xml b/tests/BiDiTests/res/layout/canvas.xml
index 77007af3a6bdc..03b1bb23bffcf 100644
--- a/tests/BiDiTests/res/layout/canvas.xml
+++ b/tests/BiDiTests/res/layout/canvas.xml
@@ -15,20 +15,20 @@
-->
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ />
+ android:id="@+id/testview"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF0000"
+ />
diff --git a/tests/BiDiTests/res/layout/frame_layout_locale.xml b/tests/BiDiTests/res/layout/frame_layout_locale.xml
new file mode 100644
index 0000000000000..812e0dcba646b
--- /dev/null
+++ b/tests/BiDiTests/res/layout/frame_layout_locale.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/BiDiTests/res/layout/frame_layout_ltr.xml b/tests/BiDiTests/res/layout/frame_layout_ltr.xml
index 61fd06e08532c..79effe6996624 100644
--- a/tests/BiDiTests/res/layout/frame_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/frame_layout_ltr.xml
@@ -15,74 +15,74 @@
-->
+ android:id="@+id/frame_layout_ltr"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr"
+ android:background="#FF000000">
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/tests/BiDiTests/res/layout/frame_layout_rtl.xml b/tests/BiDiTests/res/layout/frame_layout_rtl.xml
index 598b41a233a21..a793862b83175 100644
--- a/tests/BiDiTests/res/layout/frame_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/frame_layout_rtl.xml
@@ -15,74 +15,74 @@
-->
+ android:id="@+id/frame_layout_ltr"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl"
+ android:background="#FF000000">
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/tests/BiDiTests/res/layout/linear_layout_locale.xml b/tests/BiDiTests/res/layout/linear_layout_locale.xml
new file mode 100644
index 0000000000000..72046cb23342d
--- /dev/null
+++ b/tests/BiDiTests/res/layout/linear_layout_locale.xml
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/linear_layout_ltr.xml b/tests/BiDiTests/res/layout/linear_layout_ltr.xml
index d4386f2d0102f..bea087e269680 100644
--- a/tests/BiDiTests/res/layout/linear_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/linear_layout_ltr.xml
@@ -15,198 +15,243 @@
-->
+ android:id="@+id/linear_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr">
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="rtl">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="locale">
-
+
+ />
-
+ />
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
-
+
+ />
-
+ />
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
-
+
+ />
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/linear_layout_rtl.xml b/tests/BiDiTests/res/layout/linear_layout_rtl.xml
index 9d0726386c3d6..12f14efede55d 100644
--- a/tests/BiDiTests/res/layout/linear_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/linear_layout_rtl.xml
@@ -15,198 +15,243 @@
-->
+ android:id="@+id/linear_layout_rtl"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl">
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="rtl">
-
+
+ />
-
+ />
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="locale">
-
+
+ />
-
+ />
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
-
+
+ />
-
+ />
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
-
+
+ />
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/main.xml b/tests/BiDiTests/res/layout/main.xml
index e39d1d6ee0020..eb73d44aa7622 100644
--- a/tests/BiDiTests/res/layout/main.xml
+++ b/tests/BiDiTests/res/layout/main.xml
@@ -15,26 +15,26 @@
-->
+ android:id="@android:id/tabhost"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
-
-
-
-
+ android:padding="5dp">
+
+
+
+
diff --git a/tests/BiDiTests/res/layout/relative_layout_2_locale.xml b/tests/BiDiTests/res/layout/relative_layout_2_locale.xml
new file mode 100644
index 0000000000000..c99a99bb97933
--- /dev/null
+++ b/tests/BiDiTests/res/layout/relative_layout_2_locale.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/relative_layout_2_ltr.xml b/tests/BiDiTests/res/layout/relative_layout_2_ltr.xml
new file mode 100644
index 0000000000000..c4cab1167a2ab
--- /dev/null
+++ b/tests/BiDiTests/res/layout/relative_layout_2_ltr.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/relative_layout_2_rtl.xml b/tests/BiDiTests/res/layout/relative_layout_2_rtl.xml
new file mode 100644
index 0000000000000..009d4426ea735
--- /dev/null
+++ b/tests/BiDiTests/res/layout/relative_layout_2_rtl.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/relative_layout_ltr.xml b/tests/BiDiTests/res/layout/relative_layout_ltr.xml
index d789707dfe62d..e9e8661d74602 100644
--- a/tests/BiDiTests/res/layout/relative_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/relative_layout_ltr.xml
@@ -15,74 +15,74 @@
-->
+ android:id="@+id/frame_layout_ltr"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr"
+ android:background="#FF000000">
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml b/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml
deleted file mode 100644
index a13ef8bfc0ad7..0000000000000
--- a/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/relative_layout_rtl.xml b/tests/BiDiTests/res/layout/relative_layout_rtl.xml
index 580892474206a..57b2ad085a1bd 100644
--- a/tests/BiDiTests/res/layout/relative_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/relative_layout_rtl.xml
@@ -15,74 +15,74 @@
-->
+ android:id="@+id/frame_layout_rtl"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl"
+ android:background="#FF000000">
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml b/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml
deleted file mode 100644
index 1a6b3d54a04de..0000000000000
--- a/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/table_layout_locale.xml b/tests/BiDiTests/res/layout/table_layout_locale.xml
new file mode 100644
index 0000000000000..847eb0702b574
--- /dev/null
+++ b/tests/BiDiTests/res/layout/table_layout_locale.xml
@@ -0,0 +1,258 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/table_layout_ltr.xml b/tests/BiDiTests/res/layout/table_layout_ltr.xml
index 8e1891e7014cd..49d1d0da9791e 100644
--- a/tests/BiDiTests/res/layout/table_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/table_layout_ltr.xml
@@ -15,35 +15,35 @@
-->
+ android:id="@+id/linear_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2">
+ />
+ />
+ />
@@ -51,47 +51,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="inherit">
+ />
+ />
+ />
@@ -99,47 +98,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="ltr">
+ />
+ />
+ />
@@ -147,47 +145,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="rtl">
+ />
+ />
+ />
@@ -195,21 +192,67 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/table_layout_rtl.xml b/tests/BiDiTests/res/layout/table_layout_rtl.xml
index bd664e4900db5..a665e45a00dd8 100644
--- a/tests/BiDiTests/res/layout/table_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/table_layout_rtl.xml
@@ -15,35 +15,35 @@
-->
+ android:id="@+id/linear_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2">
+ />
+ />
+ />
@@ -51,47 +51,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="inherit">
+ />
+ />
+ />
@@ -99,47 +98,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="ltr">
+ />
+ />
+ />
@@ -147,47 +145,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
-
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="rtl">
+ />
+ />
+ />
@@ -195,21 +192,67 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ />
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java
index 266268313ab89..1ffe7ee55cf5a 100644
--- a/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java
@@ -57,6 +57,11 @@ public class BiDiTestActivity extends TabActivity {
setContent(intent);
tabHost.addTab(spec);
+ intent = new Intent().setClass(this, BiDiTestLinearLayoutLocaleActivity.class);
+ spec = tabHost.newTabSpec("linear-layout-locale").setIndicator("Linear LOC").
+ setContent(intent);
+ tabHost.addTab(spec);
+
intent = new Intent().setClass(this, BiDiTestFrameLayoutLtrActivity.class);
spec = tabHost.newTabSpec("frame-layout-ltr").setIndicator("Frame LTR").
setContent(intent);
@@ -67,6 +72,11 @@ public class BiDiTestActivity extends TabActivity {
setContent(intent);
tabHost.addTab(spec);
+ intent = new Intent().setClass(this, BiDiTestFrameLayoutLocaleActivity.class);
+ spec = tabHost.newTabSpec("frame-layout-locale").setIndicator("Frame LOC").
+ setContent(intent);
+ tabHost.addTab(spec);
+
intent = new Intent().setClass(this, BiDiTestRelativeLayoutLtrActivity.class);
spec = tabHost.newTabSpec("relative-layout-ltr").setIndicator("Relative LTR").
setContent(intent);
@@ -87,6 +97,11 @@ public class BiDiTestActivity extends TabActivity {
setContent(intent);
tabHost.addTab(spec);
+ intent = new Intent().setClass(this, BiDiTestRelativeLayoutLocaleActivity2.class);
+ spec = tabHost.newTabSpec("relative-layout-locale-2").setIndicator("Relative2 LOC").
+ setContent(intent);
+ tabHost.addTab(spec);
+
intent = new Intent().setClass(this, BiDiTestTableLayoutLtrActivity.class);
spec = tabHost.newTabSpec("table-layout-ltr").setIndicator("Table LTR").
setContent(intent);
@@ -97,6 +112,11 @@ public class BiDiTestActivity extends TabActivity {
setContent(intent);
tabHost.addTab(spec);
+ intent = new Intent().setClass(this, BiDiTestTableLayoutLocaleActivity.class);
+ spec = tabHost.newTabSpec("table-layout-locale").setIndicator("Table LOC").
+ setContent(intent);
+ tabHost.addTab(spec);
+
tabHost.setCurrentTab(0);
}
}
\ No newline at end of file
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestFrameLayoutLocaleActivity.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestFrameLayoutLocaleActivity.java
new file mode 100644
index 0000000000000..457c52a8d8170
--- /dev/null
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestFrameLayoutLocaleActivity.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.bidi;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class BiDiTestFrameLayoutLocaleActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.frame_layout_locale);
+ }
+}
+
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestLinearLayoutLocaleActivity.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestLinearLayoutLocaleActivity.java
new file mode 100644
index 0000000000000..8694dd15fa8ac
--- /dev/null
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestLinearLayoutLocaleActivity.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.bidi;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class BiDiTestLinearLayoutLocaleActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.linear_layout_locale);
+ }
+}
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLocaleActivity2.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLocaleActivity2.java
new file mode 100644
index 0000000000000..8a52b3875cee4
--- /dev/null
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLocaleActivity2.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.bidi;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class BiDiTestRelativeLayoutLocaleActivity2 extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.relative_layout_2_locale);
+ }
+}
+
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLtrActivity2.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLtrActivity2.java
index 476375c66d173..65a5ed0ed3a57 100644
--- a/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLtrActivity2.java
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLtrActivity2.java
@@ -25,7 +25,7 @@ public class BiDiTestRelativeLayoutLtrActivity2 extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.relative_layout_ltr_2);
+ setContentView(R.layout.relative_layout_2_ltr);
}
}
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutRtlActivity2.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutRtlActivity2.java
index db2af7f20d31a..dad549161ad67 100644
--- a/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutRtlActivity2.java
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutRtlActivity2.java
@@ -25,7 +25,7 @@ public class BiDiTestRelativeLayoutRtlActivity2 extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.relative_layout_rtl_2);
+ setContentView(R.layout.relative_layout_2_rtl);
}
}
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLocaleActivity.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLocaleActivity.java
new file mode 100644
index 0000000000000..9222aa23f4d83
--- /dev/null
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLocaleActivity.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.bidi;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class BiDiTestTableLayoutLocaleActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.table_layout_locale);
+ }
+}
+