diff options
author | Daniel Sandler <dsandler@google.com> | 2011-06-16 13:00:01 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2011-06-16 13:02:02 -0400 |
commit | 396263fc972b5be7cdb05161ed5b99f13665767e (patch) | |
tree | 1cf1e250e41f986d515b74993bf8e55aa62439c8 /tests/StatusBar | |
parent | 0a4d51d581ac1f3fad1f63ffea07f2560b2788e3 (diff) | |
download | frameworks_base-396263fc972b5be7cdb05161ed5b99f13665767e.zip frameworks_base-396263fc972b5be7cdb05161ed5b99f13665767e.tar.gz frameworks_base-396263fc972b5be7cdb05161ed5b99f13665767e.tar.bz2 |
Make the Notify Builder test usable on phones.
Change-Id: Ibaa3b2b99bde7dfd3d9fc6bc4c0068fc1d7b914d
Diffstat (limited to 'tests/StatusBar')
17 files changed, 279 insertions, 219 deletions
diff --git a/tests/StatusBar/res/drawable-hdpi/emo_im_kissing.png b/tests/StatusBar/res/drawable-hdpi/emo_im_kissing.png Binary files differnew file mode 100644 index 0000000..0a8f0d7 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/emo_im_kissing.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification0.png b/tests/StatusBar/res/drawable-hdpi/notification0.png Binary files differnew file mode 100644 index 0000000..6d2612e --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification0.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification1.png b/tests/StatusBar/res/drawable-hdpi/notification1.png Binary files differnew file mode 100644 index 0000000..ce9009c --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification1.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification2.png b/tests/StatusBar/res/drawable-hdpi/notification2.png Binary files differnew file mode 100644 index 0000000..772d70a --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification2.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification3.png b/tests/StatusBar/res/drawable-hdpi/notification3.png Binary files differnew file mode 100644 index 0000000..61127ee --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification3.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification4.png b/tests/StatusBar/res/drawable-hdpi/notification4.png Binary files differnew file mode 100644 index 0000000..40b7d55 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification4.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification5.png b/tests/StatusBar/res/drawable-hdpi/notification5.png Binary files differnew file mode 100644 index 0000000..e89903a --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification5.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification6.png b/tests/StatusBar/res/drawable-hdpi/notification6.png Binary files differnew file mode 100644 index 0000000..e0878f5 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification6.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification7.png b/tests/StatusBar/res/drawable-hdpi/notification7.png Binary files differnew file mode 100644 index 0000000..49397ca --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification7.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification8.png b/tests/StatusBar/res/drawable-hdpi/notification8.png Binary files differnew file mode 100644 index 0000000..763b048 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification8.png diff --git a/tests/StatusBar/res/drawable-hdpi/notification9.png b/tests/StatusBar/res/drawable-hdpi/notification9.png Binary files differnew file mode 100644 index 0000000..c3c3771 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notification9.png diff --git a/tests/StatusBar/res/drawable-hdpi/notificationx.png b/tests/StatusBar/res/drawable-hdpi/notificationx.png Binary files differnew file mode 100644 index 0000000..7267286 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/notificationx.png diff --git a/tests/StatusBar/res/drawable-hdpi/pineapple.png b/tests/StatusBar/res/drawable-hdpi/pineapple.png Binary files differnew file mode 100644 index 0000000..e62d3c8 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/pineapple.png diff --git a/tests/StatusBar/res/drawable-hdpi/pineapple2.png b/tests/StatusBar/res/drawable-hdpi/pineapple2.png Binary files differnew file mode 100644 index 0000000..54146a8 --- /dev/null +++ b/tests/StatusBar/res/drawable-hdpi/pineapple2.png diff --git a/tests/StatusBar/res/layout/notification_builder_test.xml b/tests/StatusBar/res/layout/notification_builder_test.xml index 3c37a73..e1199c7 100644 --- a/tests/StatusBar/res/layout/notification_builder_test.xml +++ b/tests/StatusBar/res/layout/notification_builder_test.xml @@ -1,224 +1,220 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="horizontal" - android:paddingLeft="40dp" - android:paddingTop="12dp" - android:paddingRight="24dp" - android:paddingBottom="12dp" + xmlns:android="http://schemas.android.com/apk/res/android" > - <LinearLayout - android:layout_width="220sp" + android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginRight="24dp" - android:orientation="vertical" + android:orientation="horizontal" > + <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_1" - /> - <TextView - style="@style/IdTitle" - android:text="1" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_1" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_2" - /> - <TextView - style="@style/IdTitle" - android:text="2" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_2" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_3" - /> - <TextView - style="@style/IdTitle" - android:text="3" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_3" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_4" - /> - <TextView - style="@style/IdTitle" - android:text="4" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_4" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_5" - /> - <TextView - style="@style/IdTitle" - android:text="5" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_5" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_6" - /> - <TextView - style="@style/IdTitle" - android:text="6" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_6" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_7" - /> - <TextView - style="@style/IdTitle" - android:text="7" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_7" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_8" - /> - <TextView - style="@style/IdTitle" - android:text="8" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_8" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_9" - /> - <TextView - style="@style/IdTitle" - android:text="9" - /> - <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_9" - /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" + android:layout_width="120dp" + android:layout_height="match_parent" + android:orientation="vertical" > + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_1" + /> + <TextView + style="@style/IdTitle" + android:text="1" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_1" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_2" + /> + <TextView + style="@style/IdTitle" + android:text="2" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_2" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_3" + /> + <TextView + style="@style/IdTitle" + android:text="3" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_3" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_4" + /> + <TextView + style="@style/IdTitle" + android:text="4" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_4" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_5" + /> + <TextView + style="@style/IdTitle" + android:text="5" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_5" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_6" + /> + <TextView + style="@style/IdTitle" + android:text="6" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_6" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_7" + /> + <TextView + style="@style/IdTitle" + android:text="7" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_7" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_8" + /> + <TextView + style="@style/IdTitle" + android:text="8" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_8" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_9" + /> + <TextView + style="@style/IdTitle" + android:text="9" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_9" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Button + style="@style/IdButton.Minus" + android:id="@+id/clear_10" + /> + <TextView + style="@style/IdTitle" + android:text="10" + /> + <Button + style="@style/IdButton.Plus" + android:id="@+id/notify_10" + /> + </LinearLayout> + <Button - style="@style/IdButton.Minus" - android:id="@+id/clear_10" - /> - <TextView - style="@style/IdTitle" - android:text="10" + android:id="@+id/clear_all" + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="12dp" + android:layout_marginBottom="12dp" + android:text="Clear All" /> <Button - style="@style/IdButton.Plus" - android:id="@+id/notify_10" + android:id="@+id/ten" + android:textAppearance="?android:attr/textAppearanceSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Ten notifications" /> + </LinearLayout> - <Button - android:id="@+id/clear_all" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="12dp" - android:layout_marginBottom="12dp" - android:text="Clear All" - /> - <Button - android:id="@+id/ten" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="Ten notifications" - /> - - </LinearLayout> - - <ScrollView - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_weight="1" - > <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -818,7 +814,6 @@ </LinearLayout> - </ScrollView> - + </LinearLayout> -</LinearLayout> +</ScrollView> diff --git a/tests/StatusBar/res/values-sw600dp/styles.xml b/tests/StatusBar/res/values-sw600dp/styles.xml new file mode 100644 index 0000000..f29847c --- /dev/null +++ b/tests/StatusBar/res/values-sw600dp/styles.xml @@ -0,0 +1,63 @@ +<?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. +--> +<resources> + <style name="IdTitle"> + <item name="android:textAppearance">?android:attr/textAppearanceLarge</item> + <item name="android:layout_width">30sp</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:gravity">center</item> + <item name="android:textStyle">bold</item> + </style> + + <style name="IdButton"> + <item name="android:textAppearance">?android:attr/textAppearanceLarge</item> + <item name="android:layout_width">0dp</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_weight">1</item> + <item name="android:layout_marginRight">8dp</item> + <item name="android:layout_marginLeft">8dp</item> + <item name="android:textStyle">bold</item> + </style> + + <style name="IdButton.Minus"> + <item name="android:text">-</item> + </style> + + <style name="IdButton.Plus"> + <item name="android:text">+</item> + </style> + + <style name="FieldTitle"> + <item name="android:textAppearance">?android:attr/textAppearanceLarge</item> + <item name="android:layout_width">208sp</item> + <item name="android:layout_height">wrap_content</item> + </style> + + <style name="FieldContents"> + <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_marginRight">20dp</item> + </style> + + <style name="FieldContents.Disabled"> + <item name="android:clickable">false</item> + <item name="android:visibility">gone</item> + </style> + +</resources> + + diff --git a/tests/StatusBar/res/values/styles.xml b/tests/StatusBar/res/values/styles.xml index e051efd..103a25a 100644 --- a/tests/StatusBar/res/values/styles.xml +++ b/tests/StatusBar/res/values/styles.xml @@ -16,21 +16,23 @@ <resources> <style name="IdTitle"> - <item name="android:textAppearance">?android:attr/textAppearanceLarge</item> - <item name="android:layout_width">30sp</item> + <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> + <item name="android:layout_width">20sp</item> <item name="android:layout_height">wrap_content</item> <item name="android:gravity">center</item> <item name="android:textStyle">bold</item> </style> <style name="IdButton"> - <item name="android:textAppearance">?android:attr/textAppearanceLarge</item> - <item name="android:layout_width">0dp</item> + <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> + <item name="android:layout_width">10dp</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_weight">1</item> - <item name="android:layout_marginRight">8dp</item> - <item name="android:layout_marginLeft">8dp</item> <item name="android:textStyle">bold</item> + <item name="android:layout_marginLeft">1dp</item> + <item name="android:layout_marginRight">1dp</item> + <item name="android:paddingLeft">6dp</item> + <item name="android:paddingRight">6dp</item> </style> <style name="IdButton.Minus"> @@ -42,16 +44,16 @@ </style> <style name="FieldTitle"> - <item name="android:textAppearance">?android:attr/textAppearanceLarge</item> - <item name="android:layout_width">208sp</item> + <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> + <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> </style> <style name="FieldContents"> - <item name="android:textAppearance">?android:attr/textAppearanceMedium</item> + <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> - <item name="android:layout_marginRight">20dp</item> + <item name="android:layout_marginRight">4dp</item> </style> <style name="FieldContents.Disabled"> |