From 53a73bcddff79617f42ad351332949be3ba92d45 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Mon, 20 Jun 2011 17:38:41 -0700 Subject: [PATCH] Update BiDiTest app for adding more unit tests - add some menu that will show up in compatibility mode - add more unit tests for padding and background drawable Change-Id: I90db23c68d2371c35913b039a10f9d9f34c3931e --- tests/BiDiTests/AndroidManifest.xml | 3 +- .../res/layout/view_padding_mixed.xml | 47 ++++++++++++++++++- tests/BiDiTests/res/menu/main_menu.xml | 28 +++++++++++ tests/BiDiTests/res/values/strings.xml | 2 + .../com/android/bidi/BiDiTestActivity.java | 9 ++++ 5 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 tests/BiDiTests/res/menu/main_menu.xml diff --git a/tests/BiDiTests/AndroidManifest.xml b/tests/BiDiTests/AndroidManifest.xml index 4a687f247fa89..c60edd836c44c 100644 --- a/tests/BiDiTests/AndroidManifest.xml +++ b/tests/BiDiTests/AndroidManifest.xml @@ -30,5 +30,6 @@ - + diff --git a/tests/BiDiTests/res/layout/view_padding_mixed.xml b/tests/BiDiTests/res/layout/view_padding_mixed.xml index 092f55bc25575..c916ffb08960b 100644 --- a/tests/BiDiTests/res/layout/view_padding_mixed.xml +++ b/tests/BiDiTests/res/layout/view_padding_mixed.xml @@ -20,7 +20,8 @@ android:layout_height="fill_parent"> + android:layout_height="match_parent" + android:background="#FFFFFFFF"> + + + + + + + + + + + + + + + + + + diff --git a/tests/BiDiTests/res/menu/main_menu.xml b/tests/BiDiTests/res/menu/main_menu.xml new file mode 100644 index 0000000000000..a7fe28a3be3ca --- /dev/null +++ b/tests/BiDiTests/res/menu/main_menu.xml @@ -0,0 +1,28 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/BiDiTests/res/values/strings.xml b/tests/BiDiTests/res/values/strings.xml index d067e7dbdbfc5..16dc263c8942c 100644 --- a/tests/BiDiTests/res/values/strings.xml +++ b/tests/BiDiTests/res/values/strings.xml @@ -36,4 +36,6 @@ Bold Italic String he said in Arabic: لا. Wow this is cool םמ + Add + Delete \ 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 c5e2273305586..bee1881907e7f 100644 --- a/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java +++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestActivity.java @@ -25,6 +25,8 @@ import android.app.Activity; import android.app.Fragment; import android.app.FragmentTransaction; import android.os.Bundle; +import android.view.Menu; +import android.view.MenuInflater; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; @@ -124,4 +126,11 @@ public class BiDiTestActivity extends Activity { return result; } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.main_menu, menu); + return true; + } } \ No newline at end of file