diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-08-29 03:47:31 +0200 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2014-09-01 17:26:51 +0200 |
commit | 17ee3ec0b85f1ca29920bc3bf26e613b82a0ecf8 (patch) | |
tree | c18fb4ebce10af627336e901257c24cb23f98b42 /packages/SystemUI | |
parent | 6531ae2fcd24c9b9aa2821bb9fd0957666fa4b4f (diff) | |
download | frameworks_base-17ee3ec0b85f1ca29920bc3bf26e613b82a0ecf8.zip frameworks_base-17ee3ec0b85f1ca29920bc3bf26e613b82a0ecf8.tar.gz frameworks_base-17ee3ec0b85f1ca29920bc3bf26e613b82a0ecf8.tar.bz2 |
Media notification updates
- Make text white.
- Adjust padding & metrics to redlines.
- Use different narrow layout when 3 or less notifications with big
picture.
- Update action ripples.
- Fix progress bar size & fix color for indeterminate progress bar.
- Apply default background in SystemUI when no color is set, so we
don't end up with white text on white background.
Bug: 15437369
Bug: 16625746
Bug: 15147533
Change-Id: Ie8bd5ad0bbca972685adb50034fff88ea97456bd
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/res/values/colors.xml | 4 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 75ed81e..103d8b9 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -85,6 +85,10 @@ <!-- The color of the material notification background when low priority --> <color name="notification_material_background_low_priority_color">#ffe0e0e0</color> + <!-- The color of the material notification background for media notifications when no custom + color is specified --> + <color name="notification_material_background_media_default_color">#ff424242</color> + <!-- The color of the ripples on the untinted notifications --> <color name="notification_ripple_untinted_color">#20000000</color> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index f04c8c8..d1eb83b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -677,7 +677,10 @@ public abstract class BaseStatusBar extends SystemUI implements // Using platform templates final int color = sbn.getNotification().color; if (isMediaNotification(entry)) { - entry.row.setTintColor(color); + entry.row.setTintColor(color == Notification.COLOR_DEFAULT + ? mContext.getResources().getColor( + R.color.notification_material_background_media_default_color) + : color); } } @@ -693,7 +696,7 @@ public abstract class BaseStatusBar extends SystemUI implements public boolean isMediaNotification(NotificationData.Entry entry) { // TODO: confirm that there's a valid media key return entry.expandedBig != null && - entry.expandedBig.findViewById(com.android.internal.R.id.media_action_area) != null; + entry.expandedBig.findViewById(com.android.internal.R.id.media_actions) != null; } private void startAppNotificationSettingsActivity(String packageName, final int appUid) { |