From db8bd198e5ad875a4fe2df48652ff475150d9a14 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Thu, 22 Sep 2011 17:02:33 -0400 Subject: [PATCH] Put the correct background behind largeIcons. Also add touch feedback to notification items (finally!). Bug: 5213090 (largeIcon background) Bug: 3329721 (press states) Change-Id: I89a4211106698ebff867b5c8bad50cb8b9b33a0b --- .../res/drawable/notification_row_bg.xml | 22 +++++++++++++++++++ .../layout/status_bar_notification_row.xml | 5 +++-- .../statusbar/phone/PhoneStatusBar.java | 9 -------- 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 packages/SystemUI/res/drawable/notification_row_bg.xml diff --git a/packages/SystemUI/res/drawable/notification_row_bg.xml b/packages/SystemUI/res/drawable/notification_row_bg.xml new file mode 100644 index 0000000000000..dc626d18163c7 --- /dev/null +++ b/packages/SystemUI/res/drawable/notification_row_bg.xml @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/packages/SystemUI/res/layout/status_bar_notification_row.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml index ff8687838cf30..3220e62d3075f 100644 --- a/packages/SystemUI/res/layout/status_bar_notification_row.xml +++ b/packages/SystemUI/res/layout/status_bar_notification_row.xml @@ -23,6 +23,7 @@ android:layout_alignParentLeft="true" android:scaleType="center" android:clickable="true" + android:background="@*android:drawable/notify_panel_notification_icon_bg_tile" /> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 8fc844882334e..8b3a290a55d7f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -896,14 +896,6 @@ public class PhoneStatusBar extends StatusBar { } } - void workAroundBadLayerDrawableOpacity(View v) { - LayerDrawable d = (LayerDrawable)v.getBackground(); - if (d == null) return; - v.setBackgroundDrawable(null); - d.setOpacity(PixelFormat.TRANSLUCENT); - v.setBackgroundDrawable(d); - } - private boolean inflateViews(NotificationData.Entry entry, ViewGroup parent) { StatusBarNotification sbn = entry.notification; RemoteViews remoteViews = sbn.notification.contentView; @@ -915,7 +907,6 @@ public class PhoneStatusBar extends StatusBar { LayoutInflater inflater = (LayoutInflater)mContext.getSystemService( Context.LAYOUT_INFLATER_SERVICE); View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false); - workAroundBadLayerDrawableOpacity(row); View vetoButton = row.findViewById(R.id.veto); if (entry.notification.isClearable()) { final String _pkg = sbn.pkg;