summaryrefslogtreecommitdiffstats
path: root/tests/BiDiTests
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2011-06-10 14:19:18 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2011-06-10 14:30:32 -0700
commit26e432d25f2ba199ae8b762fc68da8463389dd9b (patch)
tree3780992b8f91a23087f85fcb1eef069fe9b02927 /tests/BiDiTests
parent6b6091a14032c02ce2ba5600a651166ac0102290 (diff)
downloadframeworks_base-26e432d25f2ba199ae8b762fc68da8463389dd9b.zip
frameworks_base-26e432d25f2ba199ae8b762fc68da8463389dd9b.tar.gz
frameworks_base-26e432d25f2ba199ae8b762fc68da8463389dd9b.tar.bz2
Make View respect LAYOUT_DIRECTION_LOCALE
- update also unit tests for taking care of the locale direction - code formatting on the layout test files Change-Id: I4037eac3c572de9abb0178f36ca03803cc2c1522
Diffstat (limited to 'tests/BiDiTests')
-rw-r--r--tests/BiDiTests/Android0
-rw-r--r--tests/BiDiTests/AndroidManifest.xml28
-rw-r--r--tests/BiDiTests/res/layout/basic.xml42
-rw-r--r--tests/BiDiTests/res/layout/canvas.xml22
-rw-r--r--tests/BiDiTests/res/layout/frame_layout_locale.xml88
-rw-r--r--tests/BiDiTests/res/layout/frame_layout_ltr.xml46
-rw-r--r--tests/BiDiTests/res/layout/frame_layout_rtl.xml46
-rw-r--r--tests/BiDiTests/res/layout/linear_layout_locale.xml257
-rw-r--r--tests/BiDiTests/res/layout/linear_layout_ltr.xml217
-rw-r--r--tests/BiDiTests/res/layout/linear_layout_rtl.xml217
-rw-r--r--tests/BiDiTests/res/layout/main.xml28
-rw-r--r--tests/BiDiTests/res/layout/relative_layout_2_locale.xml183
-rw-r--r--tests/BiDiTests/res/layout/relative_layout_2_ltr.xml183
-rw-r--r--tests/BiDiTests/res/layout/relative_layout_2_rtl.xml183
-rw-r--r--tests/BiDiTests/res/layout/relative_layout_ltr.xml46
-rw-r--r--tests/BiDiTests/res/layout/relative_layout_ltr_2.xml155
-rw-r--r--tests/BiDiTests/res/layout/relative_layout_rtl.xml46
-rw-r--r--tests/BiDiTests/res/layout/relative_layout_rtl_2.xml155
-rw-r--r--tests/BiDiTests/res/layout/table_layout_locale.xml258
-rw-r--r--tests/BiDiTests/res/layout/table_layout_ltr.xml137
-rw-r--r--tests/BiDiTests/res/layout/table_layout_rtl.xml137
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java20
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestFrameLayoutLocaleActivity.java31
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestLinearLayoutLocaleActivity.java30
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLocaleActivity2.java31
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutLtrActivity2.java2
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestRelativeLayoutRtlActivity2.java2
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLocaleActivity.java31
28 files changed, 1905 insertions, 716 deletions
diff --git a/tests/BiDiTests/Android b/tests/BiDiTests/Android
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/BiDiTests/Android
diff --git a/tests/BiDiTests/AndroidManifest.xml b/tests/BiDiTests/AndroidManifest.xml
index ad27a62..135c5dd 100644
--- a/tests/BiDiTests/AndroidManifest.xml
+++ b/tests/BiDiTests/AndroidManifest.xml
@@ -57,6 +57,13 @@
</intent-filter>
</activity>
+ <activity android:name=".BiDiTestLinearLayoutLocaleActivity"
+ android:windowSoftInputMode="stateAlwaysHidden">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+
<activity android:name=".BiDiTestFrameLayoutLtrActivity"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
@@ -71,6 +78,13 @@
</intent-filter>
</activity>
+ <activity android:name=".BiDiTestFrameLayoutLocaleActivity"
+ android:windowSoftInputMode="stateAlwaysHidden">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+
<activity android:name=".BiDiTestRelativeLayoutLtrActivity"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
@@ -99,6 +113,13 @@
</intent-filter>
</activity>
+ <activity android:name=".BiDiTestRelativeLayoutLocaleActivity2"
+ android:windowSoftInputMode="stateAlwaysHidden">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+
<activity android:name=".BiDiTestTableLayoutLtrActivity"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
@@ -113,6 +134,13 @@
</intent-filter>
</activity>
+ <activity android:name=".BiDiTestTableLayoutLocaleActivity"
+ android:windowSoftInputMode="stateAlwaysHidden">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+
</application>
</manifest>
diff --git a/tests/BiDiTests/res/layout/basic.xml b/tests/BiDiTests/res/layout/basic.xml
index f254e3c..d5f5ba7 100644
--- a/tests/BiDiTests/res/layout/basic.xml
+++ b/tests/BiDiTests/res/layout/basic.xml
@@ -15,34 +15,34 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
- <Button android:id="@+id/button"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button_text"
- android:textSize="32dip"
- />
+ <Button android:id="@+id/button"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_text"
+ android:textSize="32dip"
+ />
<TextView android:id="@+id/textview"
- 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="wrap_content"
+ android:textSize="32dip"
+ android:text="@string/textview_text"
+ />
<EditText android:id="@+id/edittext"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:textSize="32dip"
- />
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:textSize="32dip"
+ />
</LinearLayout>
diff --git a/tests/BiDiTests/res/layout/canvas.xml b/tests/BiDiTests/res/layout/canvas.xml
index 77007af..03b1bb2 100644
--- a/tests/BiDiTests/res/layout/canvas.xml
+++ b/tests/BiDiTests/res/layout/canvas.xml
@@ -15,20 +15,20 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<SeekBar android:id="@+id/seekbar"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- />
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ />
<view class="com.android.bidi.BiDiTestView"
- android:id="@+id/testview"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="#FF0000"
- />
+ android:id="@+id/testview"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF0000"
+ />
</LinearLayout>
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 0000000..812e0dc
--- /dev/null
+++ b/tests/BiDiTests/res/layout/frame_layout_locale.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/frame_layout_ltr"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="locale"
+ android:background="#FF000000">
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="right|center_vertical"
+ android:background="#FFFF0000">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="left|center_vertical"
+ android:background="#FF00FF00">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="top|center_horizontal"
+ android:background="#FF0000FF">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="bottom|center_horizontal"
+ android:background="#FF00FFFF">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="top|start"
+ android:background="#FFFFFFFF">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="top|end"
+ android:background="#FFFFFF00">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="bottom|start"
+ android:background="#FFFFFFFF">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="bottom|end"
+ android:background="#FFFFFF00">
+ </FrameLayout>
+
+ <FrameLayout
+ android:layout_width="100dp"
+ android:layout_height="100dp"
+ android:layout_gravity="center_horizontal|center_vertical"
+ android:background="#FF888888">
+ </FrameLayout>
+
+</FrameLayout>
+
diff --git a/tests/BiDiTests/res/layout/frame_layout_ltr.xml b/tests/BiDiTests/res/layout/frame_layout_ltr.xml
index 61fd06e..79effe6 100644
--- a/tests/BiDiTests/res/layout/frame_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/frame_layout_ltr.xml
@@ -15,74 +15,74 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/frame_layout_ltr"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="ltr"
- android:background="#FF000000">
+ android:id="@+id/frame_layout_ltr"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr"
+ android:background="#FF000000">
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="right|center_vertical"
android:background="#FFFF0000">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="left|center_vertical"
android:background="#FF00FF00">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|center_horizontal"
android:background="#FF0000FF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|center_horizontal"
android:background="#FF00FFFF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|start"
android:background="#FFFFFFFF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|end"
android:background="#FFFFFF00">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|start"
android:background="#FFFFFFFF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|end"
android:background="#FFFFFF00">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal|center_vertical"
android:background="#FF888888">
- </FrameLayout>
+ </FrameLayout>
</FrameLayout>
diff --git a/tests/BiDiTests/res/layout/frame_layout_rtl.xml b/tests/BiDiTests/res/layout/frame_layout_rtl.xml
index 598b41a..a793862 100644
--- a/tests/BiDiTests/res/layout/frame_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/frame_layout_rtl.xml
@@ -15,74 +15,74 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/frame_layout_ltr"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="rtl"
- android:background="#FF000000">
+ android:id="@+id/frame_layout_ltr"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl"
+ android:background="#FF000000">
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="right|center_vertical"
android:background="#FFFF0000">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="left|center_vertical"
android:background="#FF00FF00">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|center_horizontal"
android:background="#FF0000FF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|center_horizontal"
android:background="#FF00FFFF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|start"
android:background="#FFFFFFFF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|end"
android:background="#FFFFFF00">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|start"
android:background="#FFFFFFFF">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|end"
android:background="#FFFFFF00">
- </FrameLayout>
+ </FrameLayout>
- <FrameLayout
+ <FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal|center_vertical"
android:background="#FF888888">
- </FrameLayout>
+ </FrameLayout>
</FrameLayout>
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 0000000..72046cb
--- /dev/null
+++ b/tests/BiDiTests/res/layout/linear_layout_locale.xml
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/linear_layout_rtl"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="locale">
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="rtl">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="locale">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="rtl">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="locale">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ </LinearLayout>
+
+</LinearLayout> \ 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 d4386f2..bea087e 100644
--- a/tests/BiDiTests/res/layout/linear_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/linear_layout_ltr.xml
@@ -15,198 +15,243 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/linear_layout_ltr"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="ltr">
+ android:id="@+id/linear_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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="inherit">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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="ltr">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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="rtl">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- 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="locale">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layoutDirection="ltr">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layoutDirection="rtl">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="rtl">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="locale">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
</LinearLayout>
</LinearLayout> \ 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 9d07263..12f14ef 100644
--- a/tests/BiDiTests/res/layout/linear_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/linear_layout_rtl.xml
@@ -15,198 +15,243 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/linear_layout_rtl"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="rtl">
+ android:id="@+id/linear_layout_rtl"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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="inherit">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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="ltr">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- 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="rtl">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- 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="locale">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
-
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layoutDirection="ltr">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="inherit">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="ltr">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layoutDirection="rtl">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="rtl">
- <Button android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/button1_text"
- android:textSize="24dip"
- />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
<TextView android:id="@+id/textview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="24dip"
android:text="@string/textview_text"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
+ </LinearLayout>
+
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layoutDirection="locale">
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <TextView android:id="@+id/textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="24dip"
+ android:text="@string/textview_text"
+ />
+
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
</LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/tests/BiDiTests/res/layout/main.xml b/tests/BiDiTests/res/layout/main.xml
index e39d1d6..eb73d44 100644
--- a/tests/BiDiTests/res/layout/main.xml
+++ b/tests/BiDiTests/res/layout/main.xml
@@ -15,26 +15,26 @@
-->
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/tabhost"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:id="@android:id/tabhost"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
<LinearLayout
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:padding="5dp">
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:padding="5dp">
<TabWidget
- android:id="@android:id/tabs"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
+ android:id="@android:id/tabs"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"/>
<FrameLayout
- android:id="@android:id/tabcontent"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:padding="5dp" />
+ android:id="@android:id/tabcontent"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:padding="5dp"/>
</LinearLayout>
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 0000000..c99a99b
--- /dev/null
+++ b/tests/BiDiTests/res/layout/relative_layout_2_locale.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/relative_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="locale">
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px">
+
+ <TextView android:id="@+id/label_1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_1"/>
+
+ <Button android:id="@+id/ok_1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_1"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_1"
+ android:layout_alignTop="@id/ok_1"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="ltr">
+
+ <TextView android:id="@+id/label_2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_2"/>
+
+ <Button android:id="@+id/ok_2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_2"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_2"
+ android:layout_alignTop="@id/ok_2"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="inherit">
+
+ <TextView android:id="@+id/label_3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_3"/>
+
+ <Button android:id="@+id/ok_3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_3"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_3"
+ android:layout_alignTop="@id/ok_3"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="rtl">
+
+ <TextView android:id="@+id/label_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_4"/>
+
+ <Button android:id="@+id/ok_4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_4"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_4"
+ android:layout_alignTop="@id/ok_4"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="locale">
+
+ <TextView android:id="@+id/label_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_4"/>
+
+ <Button android:id="@+id/ok_4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_4"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_4"
+ android:layout_alignTop="@id/ok_4"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+</LinearLayout> \ 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 0000000..c4cab11
--- /dev/null
+++ b/tests/BiDiTests/res/layout/relative_layout_2_ltr.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/relative_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr">
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px">
+
+ <TextView android:id="@+id/label_1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_1"/>
+
+ <Button android:id="@+id/ok_1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_1"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_1"
+ android:layout_alignTop="@id/ok_1"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="ltr">
+
+ <TextView android:id="@+id/label_2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_2"/>
+
+ <Button android:id="@+id/ok_2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_2"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_2"
+ android:layout_alignTop="@id/ok_2"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="inherit">
+
+ <TextView android:id="@+id/label_3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_3"/>
+
+ <Button android:id="@+id/ok_3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_3"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_3"
+ android:layout_alignTop="@id/ok_3"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="rtl">
+
+ <TextView android:id="@+id/label_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_4"/>
+
+ <Button android:id="@+id/ok_4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_4"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_4"
+ android:layout_alignTop="@id/ok_4"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="locale">
+
+ <TextView android:id="@+id/label_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_4"/>
+
+ <Button android:id="@+id/ok_4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_4"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_4"
+ android:layout_alignTop="@id/ok_4"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+</LinearLayout> \ 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 0000000..009d442
--- /dev/null
+++ b/tests/BiDiTests/res/layout/relative_layout_2_rtl.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/relative_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl">
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px">
+
+ <TextView android:id="@+id/label_1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_1"/>
+
+ <Button android:id="@+id/ok_1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_1"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_1"
+ android:layout_alignTop="@id/ok_1"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="ltr">
+
+ <TextView android:id="@+id/label_2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_2"/>
+
+ <Button android:id="@+id/ok_2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_2"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_2"
+ android:layout_alignTop="@id/ok_2"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="inherit">
+
+ <TextView android:id="@+id/label_3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_3"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_3"/>
+
+ <Button android:id="@+id/ok_3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_3"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_3"
+ android:layout_alignTop="@id/ok_3"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="rtl">
+
+ <TextView android:id="@+id/label_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_4"/>
+
+ <Button android:id="@+id/ok_4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_4"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_4"
+ android:layout_alignTop="@id/ok_4"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="#FF000000"
+ android:padding="10px"
+ android:layoutDirection="locale">
+
+ <TextView android:id="@+id/label_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Type here:"/>
+
+ <EditText android:id="@+id/entry_4"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/label_4"/>
+
+ <Button android:id="@+id/ok_4"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/entry_4"
+ android:layout_alignParentRight="true"
+ android:layout_marginLeft="10px"
+ android:text="OK"/>
+
+ <Button android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/ok_4"
+ android:layout_alignTop="@id/ok_4"
+ android:text="Cancel"/>
+ </RelativeLayout>
+
+</LinearLayout> \ 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 d789707..e9e8661 100644
--- a/tests/BiDiTests/res/layout/relative_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/relative_layout_ltr.xml
@@ -15,74 +15,74 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/frame_layout_ltr"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="ltr"
- android:background="#FF000000">
+ android:id="@+id/frame_layout_ltr"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr"
+ android:background="#FF000000">
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="right|center_vertical"
android:background="#FFFF0000">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="left|center_vertical"
android:background="#FF00FF00">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|center_horizontal"
android:background="#FF0000FF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|center_horizontal"
android:background="#FF00FFFF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|start"
android:background="#FFFFFFFF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|end"
android:background="#FFFFFF00">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|start"
android:background="#FFFFFFFF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|end"
android:background="#FFFFFF00">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal|center_vertical"
android:background="#FF888888">
- </RelativeLayout>
+ </RelativeLayout>
</FrameLayout>
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 a13ef8b..0000000
--- a/tests/BiDiTests/res/layout/relative_layout_ltr_2.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/relative_layout_ltr"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="ltr">
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px">
-
- <TextView android:id="@+id/label_1"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_1"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_1" />
-
- <Button android:id="@+id/ok_1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_1"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_1"
- android:layout_alignTop="@id/ok_1"
- android:text="Cancel" />
-
- </RelativeLayout>
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px"
- android:layoutDirection="ltr">
-
- <TextView android:id="@+id/label_2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_2" />
-
- <Button android:id="@+id/ok_2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_2"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_2"
- android:layout_alignTop="@id/ok_2"
- android:text="Cancel" />
-
- </RelativeLayout>
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px"
- android:layoutDirection="inherit">
-
- <TextView android:id="@+id/label_3"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_3"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_3" />
-
- <Button android:id="@+id/ok_3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_3"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_3"
- android:layout_alignTop="@id/ok_3"
- android:text="Cancel" />
-
- </RelativeLayout>
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px"
- android:layoutDirection="rtl">
-
- <TextView android:id="@+id/label_4"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_4"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_4" />
-
- <Button android:id="@+id/ok_4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_4"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_4"
- android:layout_alignTop="@id/ok_4"
- android:text="Cancel" />
-
- </RelativeLayout>
-
-</LinearLayout> \ 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 5808924..57b2ad0 100644
--- a/tests/BiDiTests/res/layout/relative_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/relative_layout_rtl.xml
@@ -15,74 +15,74 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/frame_layout_rtl"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="rtl"
- android:background="#FF000000">
+ android:id="@+id/frame_layout_rtl"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl"
+ android:background="#FF000000">
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="right|center_vertical"
android:background="#FFFF0000">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="left|center_vertical"
android:background="#FF00FF00">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|center_horizontal"
android:background="#FF0000FF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|center_horizontal"
android:background="#FF00FFFF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|start"
android:background="#FFFFFFFF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="top|end"
android:background="#FFFFFF00">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|start"
android:background="#FFFFFFFF">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|end"
android:background="#FFFFFF00">
- </RelativeLayout>
+ </RelativeLayout>
- <RelativeLayout
+ <RelativeLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal|center_vertical"
android:background="#FF888888">
- </RelativeLayout>
+ </RelativeLayout>
</FrameLayout>
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 1a6b3d5..0000000
--- a/tests/BiDiTests/res/layout/relative_layout_rtl_2.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/relative_layout_ltr"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="rtl">
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px">
-
- <TextView android:id="@+id/label_1"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_1"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_1" />
-
- <Button android:id="@+id/ok_1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_1"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_1"
- android:layout_alignTop="@id/ok_1"
- android:text="Cancel" />
-
- </RelativeLayout>
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px"
- android:layoutDirection="ltr">
-
- <TextView android:id="@+id/label_2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_2" />
-
- <Button android:id="@+id/ok_2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_2"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_2"
- android:layout_alignTop="@id/ok_2"
- android:text="Cancel" />
-
- </RelativeLayout>
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px"
- android:layoutDirection="inherit">
-
- <TextView android:id="@+id/label_3"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_3"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_3" />
-
- <Button android:id="@+id/ok_3"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_3"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_3"
- android:layout_alignTop="@id/ok_3"
- android:text="Cancel" />
-
- </RelativeLayout>
-
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="#FF000000"
- android:padding="10px"
- android:layoutDirection="rtl">
-
- <TextView android:id="@+id/label_4"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Type here:" />
-
- <EditText android:id="@+id/entry_4"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/label_4" />
-
- <Button android:id="@+id/ok_4"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/entry_4"
- android:layout_alignParentRight="true"
- android:layout_marginLeft="10px"
- android:text="OK" />
-
- <Button android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@id/ok_4"
- android:layout_alignTop="@id/ok_4"
- android:text="Cancel" />
-
- </RelativeLayout>
-
-</LinearLayout> \ 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 0000000..847eb07
--- /dev/null
+++ b/tests/BiDiTests/res/layout/table_layout_locale.xml
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/linear_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="locale">
+
+ <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2">
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_right_text"
+ android:textSize="24dip"
+ android:gravity="right"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_after_text"
+ android:textSize="24dip"
+ android:gravity="after"
+ />
+ </TableRow>
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_left_text"
+ android:textSize="24dip"
+ android:gravity="left"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_before_text"
+ android:textSize="24dip"
+ android:gravity="before"
+ />
+ </TableRow>
+ </TableLayout>
+
+ <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="inherit">
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_right_text"
+ android:textSize="24dip"
+ android:gravity="right"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_after_text"
+ android:textSize="24dip"
+ android:gravity="after"
+ />
+ </TableRow>
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_left_text"
+ android:textSize="24dip"
+ android:gravity="left"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_before_text"
+ android:textSize="24dip"
+ android:gravity="before"
+ />
+ </TableRow>
+ </TableLayout>
+
+ <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="ltr">
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_right_text"
+ android:textSize="24dip"
+ android:gravity="right"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_after_text"
+ android:textSize="24dip"
+ android:gravity="after"
+ />
+ </TableRow>
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_left_text"
+ android:textSize="24dip"
+ android:gravity="left"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_before_text"
+ android:textSize="24dip"
+ android:gravity="before"
+ />
+ </TableRow>
+ </TableLayout>
+
+ <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="rtl">
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_right_text"
+ android:textSize="24dip"
+ android:gravity="right"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_after_text"
+ android:textSize="24dip"
+ android:gravity="after"
+ />
+ </TableRow>
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_left_text"
+ android:textSize="24dip"
+ android:gravity="left"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_before_text"
+ android:textSize="24dip"
+ android:gravity="before"
+ />
+ </TableRow>
+ </TableLayout>
+
+ <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="locale">
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_right_text"
+ android:textSize="24dip"
+ android:gravity="right"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_after_text"
+ android:textSize="24dip"
+ android:gravity="after"
+ />
+ </TableRow>
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_left_text"
+ android:textSize="24dip"
+ android:gravity="left"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_before_text"
+ android:textSize="24dip"
+ android:gravity="before"
+ />
+ </TableRow>
+ </TableLayout>
+
+</LinearLayout> \ 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 8e1891e..49d1d0d 100644
--- a/tests/BiDiTests/res/layout/table_layout_ltr.xml
+++ b/tests/BiDiTests/res/layout/table_layout_ltr.xml
@@ -15,35 +15,35 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/linear_layout_ltr"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="ltr">
+ android:id="@+id/linear_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="ltr">
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -51,47 +51,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
-
</TableLayout>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2"
- android:layoutDirection="inherit">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="inherit">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -99,47 +98,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
-
</TableLayout>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2"
- android:layoutDirection="ltr">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="ltr">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -147,47 +145,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
-
</TableLayout>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2"
- android:layoutDirection="rtl">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="rtl">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -195,21 +192,67 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
+ </TableLayout>
+
+ <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="locale">
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_right_text"
+ android:textSize="24dip"
+ android:gravity="right"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_after_text"
+ android:textSize="24dip"
+ android:gravity="after"
+ />
+ </TableRow>
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_left_text"
+ android:textSize="24dip"
+ android:gravity="left"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_before_text"
+ android:textSize="24dip"
+ android:gravity="before"
+ />
+ </TableRow>
</TableLayout>
</LinearLayout> \ 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 bd664e4..a665e45 100644
--- a/tests/BiDiTests/res/layout/table_layout_rtl.xml
+++ b/tests/BiDiTests/res/layout/table_layout_rtl.xml
@@ -15,35 +15,35 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/linear_layout_ltr"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layoutDirection="rtl">
+ android:id="@+id/linear_layout_ltr"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layoutDirection="rtl">
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -51,47 +51,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
-
</TableLayout>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2"
- android:layoutDirection="inherit">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="inherit">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -99,47 +98,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
-
</TableLayout>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2"
- android:layoutDirection="ltr">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="ltr">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -147,47 +145,46 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
-
</TableLayout>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:stretchColumns="1,2"
- android:layoutDirection="rtl">
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="rtl">
<TableRow>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button1_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_right_text"
android:textSize="24dip"
android:gravity="right"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_after_text"
android:textSize="24dip"
android:gravity="after"
- />
+ />
</TableRow>
<TableRow>
@@ -195,21 +192,67 @@
android:layout_width="wrap_content"
android:text="@string/button2_text"
android:textSize="24dip"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_left_text"
android:textSize="24dip"
android:gravity="left"
- />
+ />
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_before_text"
android:textSize="24dip"
android:gravity="before"
- />
+ />
</TableRow>
+ </TableLayout>
+
+ <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1,2"
+ android:layoutDirection="locale">
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button1_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_right_text"
+ android:textSize="24dip"
+ android:gravity="right"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_after_text"
+ android:textSize="24dip"
+ android:gravity="after"
+ />
+ </TableRow>
+
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button2_text"
+ android:textSize="24dip"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_left_text"
+ android:textSize="24dip"
+ android:gravity="left"
+ />
+ <Button android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/button_before_text"
+ android:textSize="24dip"
+ android:gravity="before"
+ />
+ </TableRow>
</TableLayout>
</LinearLayout> \ 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 2662683..1ffe7ee 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 0000000..457c52a
--- /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 0000000..8694dd1
--- /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 0000000..8a52b38
--- /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 476375c..65a5ed0 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 db2af7f..dad5491 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 0000000..9222aa2
--- /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);
+ }
+}
+