summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/drawable/notification_row_bg.xml22
-rw-r--r--packages/SystemUI/res/layout/status_bar_notification_row.xml5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java9
3 files changed, 25 insertions, 11 deletions
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 0000000..dc626d1
--- /dev/null
+++ b/packages/SystemUI/res/drawable/notification_row_bg.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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+
+ <item android:state_pressed="true" android:drawable="@android:color/holo_blue_light" />
+ <item android:state_pressed="false" android:drawable="@drawable/notification_item_background_color" />
+</selector>
diff --git a/packages/SystemUI/res/layout/status_bar_notification_row.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml
index ff86878..3220e62 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"
/>
<com.android.systemui.statusbar.LatestItemView android:id="@+id/content"
@@ -33,14 +34,14 @@
android:layout_alignParentRight="true"
android:focusable="true"
android:clickable="true"
- android:background="@drawable/notification_item_background_color"
+ android:background="@drawable/notification_row_bg"
/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/notification_divider_height"
android:layout_alignParentBottom="true"
- android:background="@drawable/status_bar_notification_row_background_color"
+ android:background="@drawable/notification_item_background_color"
/>
</RelativeLayout>
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 8fc8448..8b3a290 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;