summaryrefslogtreecommitdiff
path: root/tests/StatusBar
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2011-12-06 13:36:03 -0500
committerDaniel Sandler <dsandler@android.com>2011-12-07 15:53:00 -0500
commita3850b68399ab49032e1fc2a2eab129fe3a7e69e (patch)
tree2d7f5433154f0c6843a289d803dc22c589ebb0df /tests/StatusBar
parentf352491aad71b5c0a30238707bdb83c9dc34fd9e (diff)
Improve handling of small largeIcons in tablet ticker.
The tablet system bar is too short for a full notification row, but it will show the largeIcon of a new notification in its full frame, intruding into the main application content rectangle a bit. This is a good thing---the notifications really pop out at you---but it looks a little odd if the largeIcon is actually *small*: the icon is vertically centered in the larger (invisible) rectangle, making it look poorly centered on the system bar. This change will detect short largeIcons and center them in the system bar's height instead. Additionally, it applies the same ticker background all the way to the left underneath largeIcons that are not full-frame (and therefore have transparent regions). Bug: 5708907 Bug: 5560485 Change-Id: I32af45632df164c58fb960110063dbaa08b5536c
Diffstat (limited to 'tests/StatusBar')
-rw-r--r--tests/StatusBar/res/layout/notification_builder_test.xml5
-rw-r--r--tests/StatusBar/src/com/android/statusbartest/NotificationBuilderTest.java3
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/StatusBar/res/layout/notification_builder_test.xml b/tests/StatusBar/res/layout/notification_builder_test.xml
index e1199c75761e..6c384f70ff7e 100644
--- a/tests/StatusBar/res/layout/notification_builder_test.xml
+++ b/tests/StatusBar/res/layout/notification_builder_test.xml
@@ -605,6 +605,11 @@
style="@style/FieldContents"
android:text="pineapple2"
/>
+ <RadioButton
+ android:id="@+id/large_icon_small"
+ style="@style/FieldContents"
+ android:text="small"
+ />
</RadioGroup>
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationBuilderTest.java b/tests/StatusBar/src/com/android/statusbartest/NotificationBuilderTest.java
index 5a2ebacefa44..fefd89050ae9 100644
--- a/tests/StatusBar/src/com/android/statusbartest/NotificationBuilderTest.java
+++ b/tests/StatusBar/src/com/android/statusbartest/NotificationBuilderTest.java
@@ -287,6 +287,9 @@ public class NotificationBuilderTest extends Activity
case R.id.large_icon_pineapple2:
b.setLargeIcon(loadBitmap(R.drawable.pineapple2));
break;
+ case R.id.large_icon_small:
+ b.setLargeIcon(loadBitmap(R.drawable.icon2));
+ break;
}
// sound TODO