diff options
Diffstat (limited to 'tests/BiDiTests')
-rw-r--r-- | tests/BiDiTests/AndroidManifest.xml | 14 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/linear_layout_ltr.xml | 62 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/linear_layout_rtl.xml | 62 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/table_layout_ltr.xml | 215 | ||||
-rw-r--r-- | tests/BiDiTests/res/layout/table_layout_rtl.xml | 215 | ||||
-rw-r--r-- | tests/BiDiTests/res/values/strings.xml | 4 | ||||
-rw-r--r-- | tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java | 10 | ||||
-rw-r--r-- | tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLtrActivity.java | 31 | ||||
-rw-r--r-- | tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutRtlActivity.java | 31 |
9 files changed, 608 insertions, 36 deletions
diff --git a/tests/BiDiTests/AndroidManifest.xml b/tests/BiDiTests/AndroidManifest.xml index 148c6c9..ad27a62 100644 --- a/tests/BiDiTests/AndroidManifest.xml +++ b/tests/BiDiTests/AndroidManifest.xml @@ -99,6 +99,20 @@ </intent-filter> </activity> + <activity android:name=".BiDiTestTableLayoutLtrActivity" + android:windowSoftInputMode="stateAlwaysHidden"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + + <activity android:name=".BiDiTestTableLayoutRtlActivity" + android:windowSoftInputMode="stateAlwaysHidden"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + </intent-filter> + </activity> + </application> </manifest> diff --git a/tests/BiDiTests/res/layout/linear_layout_ltr.xml b/tests/BiDiTests/res/layout/linear_layout_ltr.xml index 1370ae1..c5a8d47 100644 --- a/tests/BiDiTests/res/layout/linear_layout_ltr.xml +++ b/tests/BiDiTests/res/layout/linear_layout_ltr.xml @@ -24,26 +24,52 @@ <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:horizontalDirection="inherit"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -57,20 +83,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -84,20 +110,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -111,20 +137,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -138,20 +164,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -165,20 +191,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> diff --git a/tests/BiDiTests/res/layout/linear_layout_rtl.xml b/tests/BiDiTests/res/layout/linear_layout_rtl.xml index 6044f16..1494fec 100644 --- a/tests/BiDiTests/res/layout/linear_layout_rtl.xml +++ b/tests/BiDiTests/res/layout/linear_layout_rtl.xml @@ -24,26 +24,52 @@ <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:horizontalDirection="inherit"> <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -57,20 +83,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -84,20 +110,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -111,20 +137,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -138,20 +164,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> @@ -165,20 +191,20 @@ <Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/button1_text" - android:textSize="32dip" + android:textSize="24dip" /> <TextView android:id="@+id/textview" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:textSize="32dip" + 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="32dip" + android:textSize="24dip" /> </LinearLayout> diff --git a/tests/BiDiTests/res/layout/table_layout_ltr.xml b/tests/BiDiTests/res/layout/table_layout_ltr.xml new file mode 100644 index 0000000..62b1819 --- /dev/null +++ b/tests/BiDiTests/res/layout/table_layout_ltr.xml @@ -0,0 +1,215 @@ +<?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:horizontalDirection="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"> + + <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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_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:horizontalDirection="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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_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:horizontalDirection="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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_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:horizontalDirection="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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_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 new file mode 100644 index 0000000..74e6286 --- /dev/null +++ b/tests/BiDiTests/res/layout/table_layout_rtl.xml @@ -0,0 +1,215 @@ +<?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:horizontalDirection="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"> + + <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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_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:horizontalDirection="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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_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:horizontalDirection="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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_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:horizontalDirection="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/button2_text" + android:textSize="24dip" + android:gravity="right" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button3_text" + android:textSize="24dip" + android:gravity="after" + /> + </TableRow> + + <TableRow> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button4_text" + android:textSize="24dip" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button5_text" + android:textSize="24dip" + android:gravity="left" + /> + <Button android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:text="@string/button6_text" + android:textSize="24dip" + android:gravity="before" + /> + </TableRow> + + </TableLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/tests/BiDiTests/res/values/strings.xml b/tests/BiDiTests/res/values/strings.xml index 3795d4b..5af7a27 100644 --- a/tests/BiDiTests/res/values/strings.xml +++ b/tests/BiDiTests/res/values/strings.xml @@ -16,6 +16,10 @@ <string name="button_text">Button</string> <string name="button1_text">Button1</string> <string name="button2_text">Button2</string> + <string name="button3_text">Button3</string> + <string name="button4_text">Button4</string> + <string name="button5_text">Button5</string> + <string name="button6_text">Button6</string> <string name="button_requestlayout_text">Request Layout</string> <string name="textview_text">This is a text for a TextView</string> <string name="edittext_text">mmmmmmmmmmmmmmmmmmmmmmmm</string> diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java index 1bfb9ff..2662683 100644 --- a/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java +++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java @@ -87,6 +87,16 @@ public class BiDiTestActivity extends TabActivity { setContent(intent); tabHost.addTab(spec); + intent = new Intent().setClass(this, BiDiTestTableLayoutLtrActivity.class); + spec = tabHost.newTabSpec("table-layout-ltr").setIndicator("Table LTR"). + setContent(intent); + tabHost.addTab(spec); + + intent = new Intent().setClass(this, BiDiTestTableLayoutRtlActivity.class); + spec = tabHost.newTabSpec("table-layout-rtl").setIndicator("Table RTL"). + setContent(intent); + tabHost.addTab(spec); + tabHost.setCurrentTab(0); } }
\ No newline at end of file diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLtrActivity.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLtrActivity.java new file mode 100644 index 0000000..0719dae --- /dev/null +++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutLtrActivity.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 BiDiTestTableLayoutLtrActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.table_layout_ltr); + } +} + diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutRtlActivity.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutRtlActivity.java new file mode 100644 index 0000000..3553ed8 --- /dev/null +++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestTableLayoutRtlActivity.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 BiDiTestTableLayoutRtlActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.table_layout_rtl); + } +} + |