Adding tests for most of the layout widgets.

Additionally, built individual manual lookup tool
for OEMs when a certain test does not pass. Also,
the generator can now be run from the command line
to generate the master versions of our tests.
Script to automate this is coming soon.

Change-Id: Iadbd8d53ccf0f8a6d0beb74daf729f60c385aeae
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index c7e39dd..03fe5a9 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -973,12 +973,19 @@
             </intent-filter>
         </activity>
         <activity android:name="android.theme.cts.HomeActivity"
-                  android:theme="@android:style/Theme.Holo">
+                  android:theme="@android:style/Theme.Holo"
+                  android:label="Theme Check">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN"/>
                 <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
+        <activity android:name="android.theme.cts.TestListActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.DEFAULT"/>
+            </intent-filter>
+        </activity>
     </application>
 
     <!--Test for PackageManager, please put this at the very beginning-->
diff --git a/tests/res/drawable-hdpi/holo_blue_bright.png b/tests/res/drawable-hdpi/holo_blue_bright.png
new file mode 100644
index 0000000..995a694
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_blue_bright.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_blue_dark.png b/tests/res/drawable-hdpi/holo_blue_dark.png
new file mode 100644
index 0000000..a2a7437
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_blue_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_blue_light.png b/tests/res/drawable-hdpi/holo_blue_light.png
new file mode 100644
index 0000000..1bfaf21
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_blue_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_checkbox.png b/tests/res/drawable-hdpi/holo_checkbox.png
new file mode 100644
index 0000000..12b94f1
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_checkbox.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_checkbox_checked.png b/tests/res/drawable-hdpi/holo_checkbox_checked.png
new file mode 100644
index 0000000..ebb2b80
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_checkbox_checked.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_green_dark.png b/tests/res/drawable-hdpi/holo_green_dark.png
new file mode 100644
index 0000000..4e99bff
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_green_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_green_light.png b/tests/res/drawable-hdpi/holo_green_light.png
new file mode 100644
index 0000000..b8ebd30
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_green_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_blue_bright.png b/tests/res/drawable-hdpi/holo_light_blue_bright.png
new file mode 100644
index 0000000..995a694
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_blue_bright.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_blue_dark.png b/tests/res/drawable-hdpi/holo_light_blue_dark.png
new file mode 100644
index 0000000..a2a7437
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_blue_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_blue_light.png b/tests/res/drawable-hdpi/holo_light_blue_light.png
new file mode 100644
index 0000000..1bfaf21
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_blue_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_checkbox.png b/tests/res/drawable-hdpi/holo_light_checkbox.png
new file mode 100644
index 0000000..403f003
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_checkbox.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_checkbox_checked.png b/tests/res/drawable-hdpi/holo_light_checkbox_checked.png
new file mode 100644
index 0000000..b27567a
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_checkbox_checked.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_green_dark.png b/tests/res/drawable-hdpi/holo_light_green_dark.png
new file mode 100644
index 0000000..4e99bff
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_green_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_green_light.png b/tests/res/drawable-hdpi/holo_light_green_light.png
new file mode 100644
index 0000000..b8ebd30
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_green_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_orange_dark.png b/tests/res/drawable-hdpi/holo_light_orange_dark.png
new file mode 100644
index 0000000..1a41524
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_orange_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_orange_light.png b/tests/res/drawable-hdpi/holo_light_orange_light.png
new file mode 100644
index 0000000..07a6da2
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_orange_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_progressbar.png b/tests/res/drawable-hdpi/holo_light_progressbar.png
new file mode 100644
index 0000000..6c5440e
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_progressbar.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_progressbar_horizontal0.png b/tests/res/drawable-hdpi/holo_light_progressbar_horizontal0.png
new file mode 100644
index 0000000..10f47bb
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_progressbar_horizontal0.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_progressbar_horizontal100.png b/tests/res/drawable-hdpi/holo_light_progressbar_horizontal100.png
new file mode 100644
index 0000000..55f593a
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_progressbar_horizontal100.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_progressbar_horizontal50.png b/tests/res/drawable-hdpi/holo_light_progressbar_horizontal50.png
new file mode 100644
index 0000000..40e13ee
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_progressbar_horizontal50.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_progressbar_large.png b/tests/res/drawable-hdpi/holo_light_progressbar_large.png
new file mode 100644
index 0000000..683ee4d
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_progressbar_large.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_progressbar_small.png b/tests/res/drawable-hdpi/holo_light_progressbar_small.png
new file mode 100644
index 0000000..e88b678
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_progressbar_small.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_purple.png b/tests/res/drawable-hdpi/holo_light_purple.png
new file mode 100644
index 0000000..40a811d
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_purple.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_radiobutton.png b/tests/res/drawable-hdpi/holo_light_radiobutton.png
new file mode 100644
index 0000000..94b3ee7
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_radiobutton.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_radiobutton_checked.png b/tests/res/drawable-hdpi/holo_light_radiobutton_checked.png
new file mode 100644
index 0000000..d2d58a5
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_radiobutton_checked.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_radiogroup_horizontal.png b/tests/res/drawable-hdpi/holo_light_radiogroup_horizontal.png
new file mode 100644
index 0000000..d98797c
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_radiogroup_horizontal.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_radiogroup_vertical.png b/tests/res/drawable-hdpi/holo_light_radiogroup_vertical.png
new file mode 100644
index 0000000..3e84a9c
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_radiogroup_vertical.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_ratingbar_0.png b/tests/res/drawable-hdpi/holo_light_ratingbar_0.png
new file mode 100644
index 0000000..0009f61
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_ratingbar_0.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_ratingbar_0_pressed.png b/tests/res/drawable-hdpi/holo_light_ratingbar_0_pressed.png
new file mode 100644
index 0000000..5bed0e6
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_ratingbar_0_pressed.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_ratingbar_2point5.png b/tests/res/drawable-hdpi/holo_light_ratingbar_2point5.png
new file mode 100644
index 0000000..c21ae78
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_ratingbar_2point5.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_ratingbar_2point5_pressed.png b/tests/res/drawable-hdpi/holo_light_ratingbar_2point5_pressed.png
new file mode 100644
index 0000000..4ce9f31
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_ratingbar_2point5_pressed.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_ratingbar_5.png b/tests/res/drawable-hdpi/holo_light_ratingbar_5.png
new file mode 100644
index 0000000..e804e15
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_ratingbar_5.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_ratingbar_5_pressed.png b/tests/res/drawable-hdpi/holo_light_ratingbar_5_pressed.png
new file mode 100644
index 0000000..5480ef9
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_ratingbar_5_pressed.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_red_dark.png b/tests/res/drawable-hdpi/holo_light_red_dark.png
new file mode 100644
index 0000000..dd5e017
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_red_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_red_light.png b/tests/res/drawable-hdpi/holo_light_red_light.png
new file mode 100644
index 0000000..b5b220d
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_red_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_seekbar_0.png b/tests/res/drawable-hdpi/holo_light_seekbar_0.png
new file mode 100644
index 0000000..c22a833
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_seekbar_0.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_seekbar_100.png b/tests/res/drawable-hdpi/holo_light_seekbar_100.png
new file mode 100644
index 0000000..90458dd
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_seekbar_100.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_seekbar_50.png b/tests/res/drawable-hdpi/holo_light_seekbar_50.png
new file mode 100644
index 0000000..70b4863
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_seekbar_50.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_spinner.png b/tests/res/drawable-hdpi/holo_light_spinner.png
new file mode 100644
index 0000000..81629b8
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_spinner.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_textview.png b/tests/res/drawable-hdpi/holo_light_textview.png
new file mode 100644
index 0000000..1bdd080
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_textview.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_toggle_button.png b/tests/res/drawable-hdpi/holo_light_toggle_button.png
new file mode 100644
index 0000000..592cb7b
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_toggle_button.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_light_toggle_button_checked.png b/tests/res/drawable-hdpi/holo_light_toggle_button_checked.png
new file mode 100644
index 0000000..0a85f0f
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_light_toggle_button_checked.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_orange_dark.png b/tests/res/drawable-hdpi/holo_orange_dark.png
new file mode 100644
index 0000000..1a41524
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_orange_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_orange_light.png b/tests/res/drawable-hdpi/holo_orange_light.png
new file mode 100644
index 0000000..07a6da2
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_orange_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_progressbar.png b/tests/res/drawable-hdpi/holo_progressbar.png
new file mode 100644
index 0000000..6c5440e
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_progressbar.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_progressbar_horizontal0.png b/tests/res/drawable-hdpi/holo_progressbar_horizontal0.png
new file mode 100644
index 0000000..10f47bb
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_progressbar_horizontal0.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_progressbar_horizontal100.png b/tests/res/drawable-hdpi/holo_progressbar_horizontal100.png
new file mode 100644
index 0000000..55f593a
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_progressbar_horizontal100.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_progressbar_horizontal50.png b/tests/res/drawable-hdpi/holo_progressbar_horizontal50.png
new file mode 100644
index 0000000..40e13ee
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_progressbar_horizontal50.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_progressbar_large.png b/tests/res/drawable-hdpi/holo_progressbar_large.png
new file mode 100644
index 0000000..683ee4d
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_progressbar_large.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_progressbar_small.png b/tests/res/drawable-hdpi/holo_progressbar_small.png
new file mode 100644
index 0000000..e88b678
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_progressbar_small.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_purple.png b/tests/res/drawable-hdpi/holo_purple.png
new file mode 100644
index 0000000..40a811d
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_purple.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_radiobutton.png b/tests/res/drawable-hdpi/holo_radiobutton.png
new file mode 100644
index 0000000..277a74c
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_radiobutton.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_radiobutton_checked.png b/tests/res/drawable-hdpi/holo_radiobutton_checked.png
new file mode 100644
index 0000000..4b27a6b
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_radiobutton_checked.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_radiogroup_horizontal.png b/tests/res/drawable-hdpi/holo_radiogroup_horizontal.png
new file mode 100644
index 0000000..82b726e
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_radiogroup_horizontal.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_radiogroup_vertical.png b/tests/res/drawable-hdpi/holo_radiogroup_vertical.png
new file mode 100644
index 0000000..6bb138c
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_radiogroup_vertical.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_ratingbar_0.png b/tests/res/drawable-hdpi/holo_ratingbar_0.png
new file mode 100644
index 0000000..1b99274
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_ratingbar_0.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_ratingbar_0_pressed.png b/tests/res/drawable-hdpi/holo_ratingbar_0_pressed.png
new file mode 100644
index 0000000..f0cf0b0
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_ratingbar_0_pressed.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_ratingbar_2point5.png b/tests/res/drawable-hdpi/holo_ratingbar_2point5.png
new file mode 100644
index 0000000..86ccf8e
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_ratingbar_2point5.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_ratingbar_2point5_pressed.png b/tests/res/drawable-hdpi/holo_ratingbar_2point5_pressed.png
new file mode 100644
index 0000000..32db4f0
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_ratingbar_2point5_pressed.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_ratingbar_5.png b/tests/res/drawable-hdpi/holo_ratingbar_5.png
new file mode 100644
index 0000000..aef0cf4
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_ratingbar_5.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_ratingbar_5_pressed.png b/tests/res/drawable-hdpi/holo_ratingbar_5_pressed.png
new file mode 100644
index 0000000..6070a39
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_ratingbar_5_pressed.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_red_dark.png b/tests/res/drawable-hdpi/holo_red_dark.png
new file mode 100644
index 0000000..dd5e017
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_red_dark.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_red_light.png b/tests/res/drawable-hdpi/holo_red_light.png
new file mode 100644
index 0000000..b5b220d
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_red_light.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_seekbar_0.png b/tests/res/drawable-hdpi/holo_seekbar_0.png
new file mode 100644
index 0000000..dca7ef1
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_seekbar_0.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_seekbar_100.png b/tests/res/drawable-hdpi/holo_seekbar_100.png
new file mode 100644
index 0000000..90458dd
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_seekbar_100.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_seekbar_50.png b/tests/res/drawable-hdpi/holo_seekbar_50.png
new file mode 100644
index 0000000..f603b2c
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_seekbar_50.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_spinner.png b/tests/res/drawable-hdpi/holo_spinner.png
new file mode 100644
index 0000000..6c04244
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_spinner.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_textview.png b/tests/res/drawable-hdpi/holo_textview.png
new file mode 100644
index 0000000..94e403a
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_textview.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_toggle_button.png b/tests/res/drawable-hdpi/holo_toggle_button.png
new file mode 100644
index 0000000..cd077ce
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_toggle_button.png
Binary files differ
diff --git a/tests/res/drawable-hdpi/holo_toggle_button_checked.png b/tests/res/drawable-hdpi/holo_toggle_button_checked.png
new file mode 100644
index 0000000..74172ed
--- /dev/null
+++ b/tests/res/drawable-hdpi/holo_toggle_button_checked.png
Binary files differ
diff --git a/tests/res/layout/blue_bright.xml b/tests/res/layout/blue_bright.xml
new file mode 100644
index 0000000..b9efd3e
--- /dev/null
+++ b/tests/res/layout/blue_bright.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_blue_bright"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/blue_dark.xml b/tests/res/layout/blue_dark.xml
new file mode 100644
index 0000000..456c62f
--- /dev/null
+++ b/tests/res/layout/blue_dark.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_blue_dark"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/blue_light.xml b/tests/res/layout/blue_light.xml
new file mode 100644
index 0000000..81a138c
--- /dev/null
+++ b/tests/res/layout/blue_light.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_blue_light"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/checkbox.xml b/tests/res/layout/checkbox.xml
new file mode 100644
index 0000000..3fc6b17
--- /dev/null
+++ b/tests/res/layout/checkbox.xml
@@ -0,0 +1,22 @@
+<?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.
+ -->
+    <CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
+              android:id="@+id/checkBox1"
+              android:text="CheckBox"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content">
+    </CheckBox>
diff --git a/tests/res/layout/checkbox_checked.xml b/tests/res/layout/checkbox_checked.xml
new file mode 100644
index 0000000..e1d8c02
--- /dev/null
+++ b/tests/res/layout/checkbox_checked.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
+              android:checked="true"
+              android:id="@+id/checkBox1"
+              android:text="CheckBox"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content">
+    </CheckBox>
diff --git a/tests/res/layout/green_dark.xml b/tests/res/layout/green_dark.xml
new file mode 100644
index 0000000..7a02e9b5
--- /dev/null
+++ b/tests/res/layout/green_dark.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_green_dark"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/green_light.xml b/tests/res/layout/green_light.xml
new file mode 100644
index 0000000..838c83c
--- /dev/null
+++ b/tests/res/layout/green_light.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_green_light"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/orange_dark.xml b/tests/res/layout/orange_dark.xml
new file mode 100644
index 0000000..73fe332
--- /dev/null
+++ b/tests/res/layout/orange_dark.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_orange_dark"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/orange_light.xml b/tests/res/layout/orange_light.xml
new file mode 100644
index 0000000..d14cc1c
--- /dev/null
+++ b/tests/res/layout/orange_light.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_orange_light"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/progressbar.xml b/tests/res/layout/progressbar.xml
new file mode 100644
index 0000000..e54b4b0
--- /dev/null
+++ b/tests/res/layout/progressbar.xml
@@ -0,0 +1,21 @@
+<?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.
+ -->
+    <ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
+                 android:id="@+id/progressBar1"
+                 android:layout_width="wrap_content"
+                 android:layout_height="wrap_content">
+    </ProgressBar>
diff --git a/tests/res/layout/progressbar_horizontal0.xml b/tests/res/layout/progressbar_horizontal0.xml
new file mode 100644
index 0000000..a260b9a
--- /dev/null
+++ b/tests/res/layout/progressbar_horizontal0.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <ProgressBar android:id="@+id/progressBar1"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    style="@android:style/Widget.Holo.ProgressBar.Horizontal"
+    android:max="100"
+    android:progress="0"
+    xmlns:android="http://schemas.android.com/apk/res/android"></ProgressBar>
diff --git a/tests/res/layout/progressbar_horizontal100.xml b/tests/res/layout/progressbar_horizontal100.xml
new file mode 100644
index 0000000..c33ba68
--- /dev/null
+++ b/tests/res/layout/progressbar_horizontal100.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <ProgressBar android:id="@+id/progressBar1"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    style="@android:style/Widget.Holo.ProgressBar.Horizontal"
+    android:max="100"
+    android:progress="100"
+    xmlns:android="http://schemas.android.com/apk/res/android"></ProgressBar>
diff --git a/tests/res/layout/progressbar_horizontal50.xml b/tests/res/layout/progressbar_horizontal50.xml
new file mode 100644
index 0000000..48afb5c
--- /dev/null
+++ b/tests/res/layout/progressbar_horizontal50.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <ProgressBar android:id="@+id/progressBar1"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    style="@android:style/Widget.Holo.ProgressBar.Horizontal"
+    android:max="100"
+    android:progress="50"
+    xmlns:android="http://schemas.android.com/apk/res/android"></ProgressBar>
diff --git a/tests/res/layout/progressbar_large.xml b/tests/res/layout/progressbar_large.xml
new file mode 100644
index 0000000..6443a38
--- /dev/null
+++ b/tests/res/layout/progressbar_large.xml
@@ -0,0 +1,22 @@
+<?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.
+ -->
+    <ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
+                 android:id="@+id/progressBar1"
+                 style="@android:style/Widget.Holo.ProgressBar.Large"
+                 android:layout_width="wrap_content"
+                 android:layout_height="wrap_content">
+    </ProgressBar>
diff --git a/tests/res/layout/progressbar_small.xml b/tests/res/layout/progressbar_small.xml
new file mode 100644
index 0000000..4506700
--- /dev/null
+++ b/tests/res/layout/progressbar_small.xml
@@ -0,0 +1,22 @@
+<?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.
+ -->
+    <ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
+                 android:id="@+id/progressBar1"
+                 style="@android:style/Widget.Holo.ProgressBar.Small"
+                 android:layout_width="wrap_content"
+                 android:layout_height="wrap_content">
+    </ProgressBar>
diff --git a/tests/res/layout/purple.xml b/tests/res/layout/purple.xml
new file mode 100644
index 0000000..cba6af79
--- /dev/null
+++ b/tests/res/layout/purple.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_purple"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/radiobutton.xml b/tests/res/layout/radiobutton.xml
new file mode 100644
index 0000000..6b832bf
--- /dev/null
+++ b/tests/res/layout/radiobutton.xml
@@ -0,0 +1,22 @@
+<?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.
+ -->
+    <RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
+                 android:id="@+id/radioButton1"
+                 android:text="RadioButton"
+                 android:layout_width="wrap_content"
+                 android:layout_height="wrap_content">
+    </RadioButton>
diff --git a/tests/res/layout/radiobutton_checked.xml b/tests/res/layout/radiobutton_checked.xml
new file mode 100644
index 0000000..8f76f6a
--- /dev/null
+++ b/tests/res/layout/radiobutton_checked.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
+                 android:id="@+id/radioButton1"
+                 android:checked="true"
+                 android:text="RadioButton"
+                 android:layout_width="wrap_content"
+                 android:layout_height="wrap_content">
+    </RadioButton>
diff --git a/tests/res/layout/radiogroup_horizontal.xml b/tests/res/layout/radiogroup_horizontal.xml
new file mode 100644
index 0000000..32cfc8a
--- /dev/null
+++ b/tests/res/layout/radiogroup_horizontal.xml
@@ -0,0 +1,29 @@
+<?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.
+-->
+    <RadioGroup android:id="@+id/radioGroup1"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                xmlns:android="http://schemas.android.com/apk/res/android">
+      <RadioButton android:id="@+id/radio_red"
+                   android:layout_width="wrap_content"
+                   android:layout_height="wrap_content"
+                   android:text="Red" />
+      <RadioButton android:id="@+id/radio_blue"
+                   android:layout_width="wrap_content"
+                   android:layout_height="wrap_content"
+                   android:text="Blue" />
+    </RadioGroup>
diff --git a/tests/res/layout/radiogroup_vertical.xml b/tests/res/layout/radiogroup_vertical.xml
new file mode 100644
index 0000000..71987d7
--- /dev/null
+++ b/tests/res/layout/radiogroup_vertical.xml
@@ -0,0 +1,29 @@
+<?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.
+-->
+    <RadioGroup android:id="@+id/radioGroup1"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                xmlns:android="http://schemas.android.com/apk/res/android">
+      <RadioButton android:id="@+id/radio_red"
+                   android:layout_width="wrap_content"
+                   android:layout_height="wrap_content"
+                   android:text="Red" />
+      <RadioButton android:id="@+id/radio_blue"
+                   android:layout_width="wrap_content"
+                   android:layout_height="wrap_content"
+                   android:text="Blue" />
+    </RadioGroup>
diff --git a/tests/res/layout/ratingbar_0.xml b/tests/res/layout/ratingbar_0.xml
new file mode 100644
index 0000000..232a573
--- /dev/null
+++ b/tests/res/layout/ratingbar_0.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <RatingBar android:id="@+id/ratingBar1"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:numStars="5"
+               android:rating="0"
+               xmlns:android="http://schemas.android.com/apk/res/android">
+    </RatingBar>
diff --git a/tests/res/layout/ratingbar_2point5.xml b/tests/res/layout/ratingbar_2point5.xml
new file mode 100644
index 0000000..e5e9dbe
--- /dev/null
+++ b/tests/res/layout/ratingbar_2point5.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <RatingBar android:id="@+id/ratingBar1"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:numStars="5"
+               android:rating="2.5"
+               xmlns:android="http://schemas.android.com/apk/res/android">
+    </RatingBar>
diff --git a/tests/res/layout/ratingbar_5.xml b/tests/res/layout/ratingbar_5.xml
new file mode 100644
index 0000000..4169a53
--- /dev/null
+++ b/tests/res/layout/ratingbar_5.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <RatingBar android:id="@+id/ratingBar1"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:numStars="5"
+               android:rating="5"
+               xmlns:android="http://schemas.android.com/apk/res/android">
+    </RatingBar>
diff --git a/tests/res/layout/red_dark.xml b/tests/res/layout/red_dark.xml
new file mode 100644
index 0000000..4780b87
--- /dev/null
+++ b/tests/res/layout/red_dark.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_red_dark"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/red_light.xml b/tests/res/layout/red_light.xml
new file mode 100644
index 0000000..a8f6a47
--- /dev/null
+++ b/tests/res/layout/red_light.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              android:textColor="@android:color/holo_red_light"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/seekbar_0.xml b/tests/res/layout/seekbar_0.xml
new file mode 100644
index 0000000..bac53e2
--- /dev/null
+++ b/tests/res/layout/seekbar_0.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <SeekBar xmlns:android="http://schemas.android.com/apk/res/android"
+             android:id="@+id/seekBar1"
+             android:layout_width="match_parent"
+             android:layout_height="wrap_content"
+             android:max="100"
+             android:progress="0">
+    </SeekBar>
diff --git a/tests/res/layout/seekbar_100.xml b/tests/res/layout/seekbar_100.xml
new file mode 100644
index 0000000..9114ac0
--- /dev/null
+++ b/tests/res/layout/seekbar_100.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <SeekBar xmlns:android="http://schemas.android.com/apk/res/android"
+             android:id="@+id/seekBar1"
+             android:layout_width="match_parent"
+             android:layout_height="wrap_content"
+             android:max="100"
+             android:progress="100">
+    </SeekBar>
diff --git a/tests/res/layout/seekbar_50.xml b/tests/res/layout/seekbar_50.xml
new file mode 100644
index 0000000..f10d4ee
--- /dev/null
+++ b/tests/res/layout/seekbar_50.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <SeekBar xmlns:android="http://schemas.android.com/apk/res/android"
+             android:id="@+id/seekBar1"
+             android:layout_width="match_parent"
+             android:layout_height="wrap_content"
+             android:max="100"
+             android:progress="50">
+    </SeekBar>
diff --git a/tests/res/layout/spinner.xml b/tests/res/layout/spinner.xml
new file mode 100644
index 0000000..d0b453f
--- /dev/null
+++ b/tests/res/layout/spinner.xml
@@ -0,0 +1,23 @@
+<?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.
+ -->
+    <Spinner xmlns:android="http://schemas.android.com/apk/res/android"
+             android:id="@+id/spinner1"
+             android:prompt="@string/themes_prompt"
+             android:entries="@array/themes_array"
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content">
+    </Spinner>
diff --git a/tests/res/layout/textview.xml b/tests/res/layout/textview.xml
new file mode 100644
index 0000000..5bc7323
--- /dev/null
+++ b/tests/res/layout/textview.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+    <TextView android:id="@+id/textView1"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:text="@string/bacon_ipsum"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </TextView>
diff --git a/tests/res/layout/themetestlistactivity.xml b/tests/res/layout/themetestlistactivity.xml
new file mode 100644
index 0000000..beb7f8c
--- /dev/null
+++ b/tests/res/layout/themetestlistactivity.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+    <ListView android:id="@+id/tests_list"
+              android:layout_width="fill_parent"
+              android:layout_height="fill_parent"
+              xmlns:android="http://schemas.android.com/apk/res/android">
+    </ListView>
diff --git a/tests/res/layout/toggle_button.xml b/tests/res/layout/toggle_button.xml
new file mode 100644
index 0000000..87104f2
--- /dev/null
+++ b/tests/res/layout/toggle_button.xml
@@ -0,0 +1,21 @@
+<?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.
+ -->
+    <ToggleButton xmlns:android="http://schemas.android.com/apk/res/android"
+                  android:id="@+id/toggleButton1"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content">
+    </ToggleButton>
diff --git a/tests/res/layout/toggle_button_checked.xml b/tests/res/layout/toggle_button_checked.xml
new file mode 100644
index 0000000..5832f4c
--- /dev/null
+++ b/tests/res/layout/toggle_button_checked.xml
@@ -0,0 +1,22 @@
+<?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.
+ -->
+    <ToggleButton xmlns:android="http://schemas.android.com/apk/res/android"
+                  android:id="@+id/toggleButton1"
+                  android:checked="true"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content">
+    </ToggleButton>
diff --git a/tests/res/values/arrays.xml b/tests/res/values/arrays.xml
index 71e0133..af4c129 100644
--- a/tests/res/values/arrays.xml
+++ b/tests/res/values/arrays.xml
@@ -54,4 +54,16 @@
         <item>9</item>
         <item>10</item>
     </integer-array>
+
+    <string-array name="themes_array">
+        <item>holo</item>
+        <item>holo_light</item>
+        <item>holo_solidactionbar</item>
+        <item>holo_light_solidactionbar</item>
+        <item>holo_light_solidactionbar_inverse</item>
+        <item>holo_solidactionbar_splitactionbarwhennarrow</item>
+        <item>holo_light_solidactionbar_splitactionbarwhennarrow</item>
+        <item>holo_noactionbar</item>
+        <item>holo_light_noactionbar</item>
+    </string-array>
 </resources>
diff --git a/tests/res/values/strings.xml b/tests/res/values/strings.xml
index 27ef32f..50c3272 100644
--- a/tests/res/values/strings.xml
+++ b/tests/res/values/strings.xml
@@ -160,4 +160,7 @@
    <string name="holo_light_generator">Holo Light Generator</string>
    <string name="reference_image">Reference Image: </string>
    <string name="generated_image">Generated Image: </string>
+   <string name="themes_prompt">Select a Theme:</string>
+   <string name="bacon_ipsum">Bacon ipsum dolor sit amet pork chop strip steak
+spare ribs short ribs jerky.</string>
 </resources>
diff --git a/tests/src/android/theme/cts/HomeActivity.java b/tests/src/android/theme/cts/HomeActivity.java
index 04b75a1..a89f614 100644
--- a/tests/src/android/theme/cts/HomeActivity.java
+++ b/tests/src/android/theme/cts/HomeActivity.java
@@ -23,47 +23,38 @@
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ListView;
+import android.widget.AdapterView.OnItemClickListener;
 
 /**
  * This activity exists solely for debugging purposes.
  */
 public class HomeActivity extends Activity {
+    private ThemeInfo[] mThemes;
     /**
      * Called with the activity is first created.
      */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.home_activity);
+        setContentView(R.layout.themetestlistactivity);
+
+        ListView lv = (ListView) findViewById(R.id.tests_list);
+
+        mThemes = ThemeTests.getThemes();
+        lv.setAdapter(new ThemesAdapter(this, mThemes));
+
+        lv.setOnItemClickListener(mTestClickedListener);
     }
 
-    public void onHoloTestClick(View view) {
-        Intent intent = new Intent(this, ThemeTestRunnerActivity.class);
-        intent.putExtra(ThemeTests.EXTRA_THEME_ID, android.R.style.Theme_Holo);
-        intent.putExtra(ThemeTests.EXTRA_THEME_NAME, "holo");
-        intent.putExtra(ThemeTests.EXTRA_RUN_TESTS, true);
-        startActivity(intent);
-    }
-
-    public void onHoloGenClick(View view) {
-        Intent intent = new Intent(this, ThemeTestGeneratorActivity.class);
-        intent.putExtra(ThemeTests.EXTRA_THEME_ID, android.R.style.Theme_Holo);
-        intent.putExtra(ThemeTests.EXTRA_THEME_NAME, "holo");
-        startActivity(intent);
-    }
-
-    public void onHoloLightTestClick(View view) {
-        Intent intent = new Intent(this, ThemeTestRunnerActivity.class);
-        intent.putExtra(ThemeTests.EXTRA_THEME_ID, android.R.style.Theme_Holo_Light);
-        intent.putExtra(ThemeTests.EXTRA_THEME_NAME, "holo_light");
-        intent.putExtra(ThemeTests.EXTRA_RUN_TESTS, true);
-        startActivity(intent);
-    }
-
-    public void onHoloLightGenClick(View view) {
-        Intent intent = new Intent(this, ThemeTestGeneratorActivity.class);
-        intent.putExtra(ThemeTests.EXTRA_THEME_ID, android.R.style.Theme_Holo_Light);
-        intent.putExtra(ThemeTests.EXTRA_THEME_NAME, "holo_light");
-        startActivity(intent);
-    }
+    private OnItemClickListener mTestClickedListener = new OnItemClickListener() {
+        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+            Intent intent = new Intent(HomeActivity.this, TestListActivity.class);
+            ThemeInfo theme = mThemes[position];
+            intent.putExtra(ThemeTests.EXTRA_THEME_ID, theme.getResourceId());
+            intent.putExtra(ThemeTests.EXTRA_THEME_NAME, theme.getThemeName());
+            startActivity(intent);
+        }
+    };
 }
diff --git a/tests/src/android/theme/cts/TestListActivity.java b/tests/src/android/theme/cts/TestListActivity.java
new file mode 100644
index 0000000..e1085f5
--- /dev/null
+++ b/tests/src/android/theme/cts/TestListActivity.java
@@ -0,0 +1,70 @@
+/*
+ * 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 android.theme.cts;
+
+import com.android.cts.stub.R;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.database.Cursor;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ListView;
+import android.widget.AdapterView.OnItemClickListener;
+
+import junit.framework.Assert;
+
+public class TestListActivity extends Activity {
+    private int mThemeId;
+    private String mThemeName;
+
+    /**
+     * Called with the activity is first created.
+     */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        Intent intent = getIntent();
+        mThemeId = intent.getIntExtra(ThemeTests.EXTRA_THEME_ID, 0);
+
+        // test should fail if no theme is set
+        Assert.assertTrue("No Theme Resource ID set", mThemeId != 0);
+
+        mThemeName = intent.getStringExtra(ThemeTests.EXTRA_THEME_NAME);
+
+        setTheme(mThemeId);
+
+        setContentView(R.layout.themetestlistactivity);
+
+        ListView lv = (ListView) findViewById(R.id.tests_list);
+        lv.setAdapter(new ThemeTestAdapter(this, ThemeTests.getTests()));
+
+        lv.setOnItemClickListener(mTestClickedListener);
+    }
+
+    private OnItemClickListener mTestClickedListener = new OnItemClickListener() {
+        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+            Intent intent = new Intent(TestListActivity.this, ThemeTestRunnerActivity.class);
+            intent.putExtra(ThemeTests.EXTRA_THEME_ID, mThemeId);
+            intent.putExtra(ThemeTests.EXTRA_THEME_NAME, mThemeName);
+            intent.putExtra(ThemeTests.EXTRA_RUN_INDIVIDUAL_TEST, position);
+            startActivity(intent);
+        }
+    };
+}
diff --git a/tests/src/android/theme/cts/TesterViewGroup.java b/tests/src/android/theme/cts/TesterViewGroup.java
index f8f9b8f..aa42724 100644
--- a/tests/src/android/theme/cts/TesterViewGroup.java
+++ b/tests/src/android/theme/cts/TesterViewGroup.java
@@ -78,7 +78,7 @@
     }
 
     private int getMeasureSpec(int val, int referenceSize) {
-        if (val == LayoutParams.MATCH_PARENT || val == LayoutParams.FILL_PARENT) {
+        if (val == LayoutParams.MATCH_PARENT) {
             return MeasureSpec.makeMeasureSpec(referenceSize, MeasureSpec.EXACTLY);
         } else if (val == LayoutParams.WRAP_CONTENT) {
             return MeasureSpec.makeMeasureSpec(referenceSize, MeasureSpec.AT_MOST);
diff --git a/tests/src/android/theme/cts/ThemeInfo.java b/tests/src/android/theme/cts/ThemeInfo.java
new file mode 100644
index 0000000..a2556e0
--- /dev/null
+++ b/tests/src/android/theme/cts/ThemeInfo.java
@@ -0,0 +1,35 @@
+/*
+ * 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 android.theme.cts;
+
+public class ThemeInfo {
+    private int mResourceId;
+    private String mThemeName;
+
+    public ThemeInfo(int resourceId, String themeName) {
+        mResourceId = resourceId;
+        mThemeName = themeName;
+    }
+
+    public int getResourceId() {
+        return mResourceId;
+    }
+
+    public String getThemeName() {
+        return mThemeName;
+    }
+}
diff --git a/tests/src/android/theme/cts/ThemeTestAdapter.java b/tests/src/android/theme/cts/ThemeTestAdapter.java
new file mode 100644
index 0000000..2172d24
--- /dev/null
+++ b/tests/src/android/theme/cts/ThemeTestAdapter.java
@@ -0,0 +1,60 @@
+/*
+ * 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 android.theme.cts;
+
+import android.app.Activity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+public class ThemeTestAdapter extends BaseAdapter {
+    private LayoutInflater mInflater;
+    private ThemeTestInfo[] mTests;
+
+    public ThemeTestAdapter(Activity activity, ThemeTestInfo[] tests) {
+        mTests = tests;
+        mInflater = activity.getLayoutInflater();
+    }
+
+    @Override
+    public int getCount() {
+        return mTests.length;
+    }
+
+    @Override
+    public Object getItem(int position) {
+        return mTests[position];
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = mInflater.inflate(android.R.layout.simple_list_item_1, parent, false);
+        }
+
+        ((TextView) convertView).setText(mTests[position].getTestName());
+
+        return convertView;
+    }
+}
diff --git a/tests/src/android/theme/cts/ThemeTestGeneratorActivity.java b/tests/src/android/theme/cts/ThemeTestGeneratorActivity.java
index 37c8091..770eea1 100644
--- a/tests/src/android/theme/cts/ThemeTestGeneratorActivity.java
+++ b/tests/src/android/theme/cts/ThemeTestGeneratorActivity.java
@@ -25,6 +25,7 @@
 import junit.framework.Assert;
 
 public class ThemeTestGeneratorActivity extends Activity {
+    private ThemeTester mTester;
 
     /**
      * Called with the activity is first created.
@@ -44,7 +45,10 @@
         setTheme(themeId);
         setContentView(R.layout.testing_activity);
 
-        ThemeTester tester = new ThemeTester(this, themeName);
-        tester.generateTests();
+        mTester = new ThemeTester(this, themeName);
+    }
+
+    public void generateTests() {
+        mTester.generateTests();
     }
 }
diff --git a/tests/src/android/theme/cts/ThemeTestInfo.java b/tests/src/android/theme/cts/ThemeTestInfo.java
index c629f43..99f0402 100644
--- a/tests/src/android/theme/cts/ThemeTestInfo.java
+++ b/tests/src/android/theme/cts/ThemeTestInfo.java
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-
 package android.theme.cts;
 
 /**
diff --git a/tests/src/android/theme/cts/ThemeTestRunnerActivity.java b/tests/src/android/theme/cts/ThemeTestRunnerActivity.java
index 631c5bc..3a2a0fd 100644
--- a/tests/src/android/theme/cts/ThemeTestRunnerActivity.java
+++ b/tests/src/android/theme/cts/ThemeTestRunnerActivity.java
@@ -49,6 +49,12 @@
         if (intent.getBooleanExtra(ThemeTests.EXTRA_RUN_TESTS, false)) {
             mTester.runTests();
         }
+
+        int position = intent.getIntExtra(ThemeTests.EXTRA_RUN_INDIVIDUAL_TEST, -1);
+        if (position != -1) {
+            mTester.setShouldAssert(false);
+            mTester.runTest(position);
+        }
     }
 
     /**
diff --git a/tests/src/android/theme/cts/ThemeTester.java b/tests/src/android/theme/cts/ThemeTester.java
index c6be2d7..42c6b11 100644
--- a/tests/src/android/theme/cts/ThemeTester.java
+++ b/tests/src/android/theme/cts/ThemeTester.java
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-
 package android.theme.cts;
 
 import com.android.cts.stub.R;
@@ -22,6 +21,7 @@
 import android.app.Activity;
 import android.content.Context;
 import android.content.res.Resources;
+import android.content.res.Resources.NotFoundException;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.drawable.BitmapDrawable;
@@ -47,8 +47,8 @@
     private String mThemeName;
     private ImageView mReferenceImage;
     private ImageView mGeneratedImage;
-    private TextView mText;
     private TesterViewGroup mRoot;
+    private boolean mShouldAssert;
 
     /**
      * Creates a ThemeTester to run all of the tests.
@@ -59,11 +59,14 @@
         mActivity = activity;
         mThemeName = themeName;
         mRoot = (TesterViewGroup) mActivity.findViewById(R.id.test_group);
+        mShouldAssert = true;
 
-        // TODO - remove views that exist for debugging only
         mReferenceImage = (ImageView) mActivity.findViewById(R.id.reference_image);
         mGeneratedImage = (ImageView) mActivity.findViewById(R.id.generated_image);
-        mText = (TextView) mActivity.findViewById(R.id.text);
+    }
+
+    public void setShouldAssert(boolean shouldAssert) {
+        mShouldAssert = shouldAssert;
     }
 
     /**
@@ -72,23 +75,38 @@
     public void runTests() {
         ThemeTestInfo[] tests = ThemeTests.getTests();
         for (final ThemeTestInfo test : tests) {
-            mText.post(new Runnable() {
-                public void run() {
-                    testViewFromId(test);
-                }
-            });
+            runTest(test);
         }
     }
 
     /**
+     * Run an individual test based upon its position in the tests.
+     * @param position The position of the test that you wish to run.
+     */
+    public void runTest(int position) {
+        runTest(ThemeTests.getTests()[position]);
+    }
+
+    /**
+     * Run an individual test.
+     * @param test The {@link ThemeTestInfo} to use for this test.
+     */
+    private void runTest(final ThemeTestInfo test) {
+        mRoot.post(new Runnable() {
+            public void run() {
+                testViewFromId(test);
+            }
+        });
+    }
+
+    /**
      * Generate all of the tests, saving them to Bitmaps in the application's data folder.
      */
     public void generateTests() {
         ThemeTestInfo[] tests = ThemeTests.getTests();
         for (final ThemeTestInfo test : tests) {
-            mText.post(new Runnable() {
+            mRoot.post(new Runnable() {
                 public void run() {
-                    mText.setText("Bitmaps saved");
                     generateViewFromId(test);
                 }
             });
@@ -97,7 +115,7 @@
 
     private void testViewFromId(ThemeTestInfo test) {
         processBitmapFromViewId(test.getLayoutResourceId(), test.getThemeModifier(),
-                new BitmapComparer(mThemeName + "_" + test.getTestName()));
+                new BitmapComparer(mThemeName + "_" + test.getTestName(), mShouldAssert));
     }
 
     private void generateViewFromId(ThemeTestInfo test) {
@@ -118,11 +136,7 @@
                 view.draw(canvas);
                 mGeneratedImage.setImageBitmap(bitmap);
 
-                if (processor.processBitmap(bitmap)) {
-                    mText.setText(mText.getText() + "\nBitmaps identical");
-                } else {
-                    mText.setText(mText.getText() + "\nBitmaps differ");
-                }
+                processor.processBitmap(bitmap);
 
                 mRoot.removeView(view);
             }
@@ -141,7 +155,7 @@
         View view = inflater.inflate(resid, mRoot, false);
         mRoot.addView(view);
 
-        mRoot.measure(0, 0); // don't care about the first two values - we build our reference size
+        mRoot.measure(0, 0); // don't care about the input values - we build our reference size
         mRoot.layout(0, 0, mRoot.getMeasuredWidth(), mRoot.getMeasuredHeight());
 
         if (modifier != null) {
@@ -165,9 +179,11 @@
      */
     private class BitmapComparer implements BitmapProcessor {
         String mBitmapIdName;
+        boolean mShouldAssert;
 
-        public BitmapComparer(String filename) {
+        public BitmapComparer(String filename, boolean shouldAssert) {
             mBitmapIdName = filename;
+            mShouldAssert = shouldAssert;
         }
 
         @Override
@@ -175,11 +191,20 @@
             Resources r = mActivity.getResources();
             int resourceId = r.getIdentifier(mBitmapIdName, "drawable", mActivity.getPackageName());
 
-            BitmapDrawable drawable = (BitmapDrawable) r.getDrawable(resourceId);
+            BitmapDrawable drawable = null;
+
+            try {
+                drawable = (BitmapDrawable) r.getDrawable(resourceId);
+            } catch (NotFoundException e) {
+                Assert.fail("Test Failed: Resource not found - " + mBitmapIdName);
+            }
+
             Bitmap bmp2 = drawable.getBitmap();
             mReferenceImage.setImageBitmap(bmp2);
 
-            Assert.assertTrue("Test failed: " + mBitmapIdName, bmp2.sameAs(bitmap));
+            if (mShouldAssert) {
+                Assert.assertTrue("Test failed: " + mBitmapIdName, bmp2.sameAs(bitmap));
+            }
 
             return true;
         }
diff --git a/tests/src/android/theme/cts/ThemeTests.java b/tests/src/android/theme/cts/ThemeTests.java
index 19db730..20ee132 100644
--- a/tests/src/android/theme/cts/ThemeTests.java
+++ b/tests/src/android/theme/cts/ThemeTests.java
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-
 package android.theme.cts;
 
 import com.android.cts.stub.R;
@@ -30,39 +29,103 @@
      */
     public static final String EXTRA_THEME_ID = "android.intent.extra.THEME_ID";
 
+    public static final String EXTRA_RUN_INDIVIDUAL_TEST
+            = "android.intent.extra.RUN_INDIVIDUAL_TEST";
+
     /**
      * Use solely for debugging. The actual intent that runs the tests will not have this flag.
      */
     public static final String EXTRA_RUN_TESTS = "android.intent.extra.RUN_TESTS";
 
     /**
-     * The list of tests to run for each theme.<p>
-     *
+     * The list of tests to run for each theme.
      * In order to create a new test, follow these steps.<p>
-     * 1. Create a layout file for the test you wish to run.<p>
+     * 1. Create a layout file for the test you wish to run.<br>
      * 2. (Optional) Create a class that derives from ThemeTestModifier
      * that will modify the root view of your created layout. Set to null if you do not want
-     * to modify the view from the layout version.<p>
-     * 3. Create a unique String for the name of the test.<p>
+     * to modify the view from the layout version.<br>
+     * 3. Create a unique String for the name of the test.<br>
      * 4. Add all of the above to the list of tests. as a new {@link ThemeTestInfo}.
      */
     private static final ThemeTestInfo[] TESTS = new ThemeTestInfo[] {
             new ThemeTestInfo(R.layout.button, null, "button"),
-            new ThemeTestInfo(R.layout.button, new ViewPressedModifier(), "button_pressed")};
+            new ThemeTestInfo(R.layout.button, new ViewPressedModifier(), "button_pressed"),
+            new ThemeTestInfo(R.layout.toggle_button, null, "toggle_button"),
+            new ThemeTestInfo(R.layout.toggle_button_checked, null, "toggle_button_checked"),
+            new ThemeTestInfo(R.layout.checkbox, null, "checkbox"),
+            new ThemeTestInfo(R.layout.checkbox_checked, null, "checkbox_checked"),
+            new ThemeTestInfo(R.layout.radiobutton, null, "radiobutton"),
+            new ThemeTestInfo(R.layout.radiobutton_checked, null, "radiobutton_checked"),
+            new ThemeTestInfo(R.layout.spinner, null, "spinner"),
+            new ThemeTestInfo(R.layout.progressbar, null, "progressbar"),
+            new ThemeTestInfo(R.layout.progressbar_small, null, "progressbar_small"),
+            new ThemeTestInfo(R.layout.progressbar_large, null, "progressbar_large"),
+            new ThemeTestInfo(R.layout.progressbar_horizontal0, null, "progressbar_horizontal0"),
+            new ThemeTestInfo(R.layout.progressbar_horizontal50, null, "progressbar_horizontal50"),
+            new ThemeTestInfo(R.layout.progressbar_horizontal100,
+                    null, "progressbar_horizontal100"),
+            new ThemeTestInfo(R.layout.seekbar_0, null, "seekbar_0"),
+            new ThemeTestInfo(R.layout.seekbar_50, null, "seekbar_50"),
+            new ThemeTestInfo(R.layout.seekbar_100, null, "seekbar_100"),
+            new ThemeTestInfo(R.layout.radiogroup_vertical, null, "radiogroup_vertical"),
+            new ThemeTestInfo(R.layout.radiogroup_horizontal, null, "radiogroup_horizontal"),
+            new ThemeTestInfo(R.layout.ratingbar_0, null, "ratingbar_0"),
+            new ThemeTestInfo(R.layout.ratingbar_2point5, null, "ratingbar_2point5"),
+            new ThemeTestInfo(R.layout.ratingbar_5, null, "ratingbar_5"),
+            new ThemeTestInfo(R.layout.ratingbar_0,
+                    new ViewPressedModifier(), "ratingbar_0_pressed"),
+            new ThemeTestInfo(R.layout.ratingbar_2point5,
+                    new ViewPressedModifier(),"ratingbar_2point5_pressed"),
+            new ThemeTestInfo(R.layout.ratingbar_5,
+                    new ViewPressedModifier(), "ratingbar_5_pressed"),
+            new ThemeTestInfo(R.layout.textview, null, "textview"),
+            new ThemeTestInfo(R.layout.blue_light, null, "blue_light"),
+            new ThemeTestInfo(R.layout.green_light, null, "green_light"),
+            new ThemeTestInfo(R.layout.red_light, null, "red_light"),
+            new ThemeTestInfo(R.layout.blue_dark, null, "blue_dark"),
+            new ThemeTestInfo(R.layout.green_dark, null, "green_dark"),
+            new ThemeTestInfo(R.layout.red_dark, null, "red_dark"),
+            new ThemeTestInfo(R.layout.purple, null, "purple"),
+            new ThemeTestInfo(R.layout.orange_light, null, "orange_light"),
+            new ThemeTestInfo(R.layout.orange_dark, null, "orange_dark"),
+            new ThemeTestInfo(R.layout.blue_bright, null, "blue_bright")};
 
     /**
      * Returns the list of tests to run on a particular theme.
      *
      * In order to create a new test, follow these steps.<p>
-     * 1. Create a layout file for the test you wish to run.<p>
+     * 1. Create a layout file for the test you wish to run.<br>
      * 2. (Optional) Create a class that derives from ThemeTestModifier
      * that will modify the root view of your created layout. Set to null if you do not want
-     * to modify the view from the layout version.<p>
-     * 3. Create a unique String for the name of the test.<p>
+     * to modify the view from the layout version.<br>
+     * 3. Create a unique String for the name of the test.<br>
      * 4. Add all of the above to the list of tests. as a new {@link ThemeTestInfo}.
      * @return The list of tests.
      */
     public static ThemeTestInfo[] getTests() {
         return TESTS;
     }
+
+    /**
+     * The list of themes to test. In order to add a new theme, follow these steps.<p>
+     * 1. Add a new Theme to the array of Themes in
+     * cts/tests/src/android/theme/cts/ThemeTests.java.
+     * Make sure the "theme name" String is unique.<br>
+     * 2. There is no step 2. You're done. Congrats.
+     */
+    private static final ThemeInfo[] THEMES = new ThemeInfo[] {
+        new ThemeInfo(android.R.style.Theme_Holo, "holo"),
+        new ThemeInfo(android.R.style.Theme_Holo_Light, "holo_light")};
+
+    /**
+     * Returns the list of themes to test. In order to add a new theme, follow these steps.<p>
+     * 1. Add a new Theme to the array of Themes in
+     * cts/tests/src/android/theme/cts/ThemeTests.java.
+     * Make sure the "theme name" String is unique.<br>
+     * 2. There is no step 2. You're done. Congrats.
+     * @return The list of themes.
+     */
+    public static ThemeInfo[] getThemes() {
+        return THEMES;
+    }
 }
diff --git a/tests/src/android/theme/cts/ThemesAdapter.java b/tests/src/android/theme/cts/ThemesAdapter.java
new file mode 100644
index 0000000..15d535f
--- /dev/null
+++ b/tests/src/android/theme/cts/ThemesAdapter.java
@@ -0,0 +1,61 @@
+/*
+ * 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 android.theme.cts;
+
+import android.app.Activity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+public class ThemesAdapter extends BaseAdapter {
+    private LayoutInflater mInflater;
+    private ThemeInfo[] mThemes;
+
+    public ThemesAdapter(Activity activity, ThemeInfo[] themes) {
+        mThemes = themes;
+        mInflater = activity.getLayoutInflater();
+    }
+
+    @Override
+    public int getCount() {
+        return mThemes.length;
+    }
+
+    @Override
+    public Object getItem(int position) {
+        return mThemes[position];
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = mInflater.inflate(android.R.layout.simple_list_item_1, parent, false);
+        }
+
+        ((TextView) convertView).setText(mThemes[position].getThemeName());
+
+        return convertView;
+    }
+
+}
diff --git a/tests/src/android/theme/cts/ViewPressedModifier.java b/tests/src/android/theme/cts/ViewPressedModifier.java
index 8a97c7f..76b792f 100644
--- a/tests/src/android/theme/cts/ViewPressedModifier.java
+++ b/tests/src/android/theme/cts/ViewPressedModifier.java
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-
 package android.theme.cts;
 
 import android.view.View;
diff --git a/tests/tests/theme/src/android/theme/cts/ThemeGenerator.java b/tests/tests/theme/src/android/theme/cts/ThemeGenerator.java
new file mode 100644
index 0000000..c2a27b5
--- /dev/null
+++ b/tests/tests/theme/src/android/theme/cts/ThemeGenerator.java
@@ -0,0 +1,76 @@
+/*
+ * 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 android.theme.cts;
+
+import android.app.Instrumentation;
+import android.content.Intent;
+import android.test.ActivityInstrumentationTestCase2;
+
+public class ThemeGenerator extends ActivityInstrumentationTestCase2<ThemeTestGeneratorActivity> {
+    private Instrumentation mInstrumentation;
+
+    /**
+     * Creates an {@link ActivityInstrumentationTestCase2}
+     * for the {@link ThemeTestGeneratorActivity} activity.
+     */
+    public ThemeGenerator() {
+        super(ThemeTestGeneratorActivity.class);
+
+        mInstrumentation = getInstrumentation();
+    }
+
+    /**
+     * Generates the master bitmaps for all of the themes. Since it is not named "test something"
+     * it is not run by CTS by default. However, you can run it via am instrument by specifying
+     * the method name.
+     */
+    public void generateThemes() {
+        ThemeInfo[] themes = ThemeTests.getThemes();
+
+        for (ThemeInfo theme : themes) {
+            generateThemeTest(theme.getResourceId(), theme.getThemeName());
+        }
+    }
+
+    private void generateThemeTest(int resourceId, String themeName) {
+        if (mInstrumentation == null) {
+            mInstrumentation = getInstrumentation();
+        }
+
+        Intent intent = new Intent();
+        intent.putExtra(ThemeTests.EXTRA_THEME_ID, resourceId);
+        intent.putExtra(ThemeTests.EXTRA_THEME_NAME, themeName);
+        setActivityIntent(intent);
+
+        final ThemeTestGeneratorActivity activity = getActivity();
+
+        activity.runOnUiThread(new Runnable() {
+           public void run() {
+               activity.generateTests();
+           }
+        });
+
+        mInstrumentation.waitForIdleSync();
+
+        try {
+            tearDown();
+            setUp();
+        } catch (Exception e) {
+            fail("Failed at tearing down the activity so we can start a new one.");
+        }
+    }
+}
diff --git a/tests/tests/theme/src/android/theme/cts/ThemeTest.java b/tests/tests/theme/src/android/theme/cts/ThemeTest.java
index df00d7b..7197a5f4 100644
--- a/tests/tests/theme/src/android/theme/cts/ThemeTest.java
+++ b/tests/tests/theme/src/android/theme/cts/ThemeTest.java
@@ -37,12 +37,12 @@
         mInstrumentation = getInstrumentation();
     }
 
-    public void testHoloTheme() {
-        runThemeTest(android.R.style.Theme_Holo, "holo");
-    }
+    public void testThemes() {
+        ThemeInfo[] themes = ThemeTests.getThemes();
 
-    public void testHoloLightTheme() {
-        runThemeTest(android.R.style.Theme_Holo_Light, "holo_light");
+        for (ThemeInfo theme : themes) {
+            runThemeTest(theme.getResourceId(), theme.getThemeName());
+        }
     }
 
     /**
@@ -69,5 +69,12 @@
         });
 
         mInstrumentation.waitForIdleSync();
+
+        try {
+            tearDown();
+            setUp();
+        } catch (Exception e) {
+            fail("Failed at tearing down the activity so we can start a new one.");
+        }
     }
 }