summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2011-07-27 06:17:33 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-27 06:17:33 -0700
commit73fc6d521a6ab9516793e1ecd3cef110aa4257f4 (patch)
treeafd1de4530679ca85237d3f035c965a9ce618cc2
parent132b21899b96208dbae42d76628aa0d019705412 (diff)
parent26c84b139f0bfd2d3906f2ac163df8f1f15155d8 (diff)
downloadframeworks_base-73fc6d521a6ab9516793e1ecd3cef110aa4257f4.zip
frameworks_base-73fc6d521a6ab9516793e1ecd3cef110aa4257f4.tar.gz
frameworks_base-73fc6d521a6ab9516793e1ecd3cef110aa4257f4.tar.bz2
Merge "Smaller, darker notification icons."
-rw-r--r--core/res/res/values/dimens.xml2
-rw-r--r--packages/SystemUI/res/values-sw600dp/dimens.xml3
-rw-r--r--packages/SystemUI/res/values/dimens.xml10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java9
4 files changed, 22 insertions, 2 deletions
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 0ed8076..b3e50ea 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -35,7 +35,7 @@
<!-- Height of the system bar -->
<dimen name="system_bar_height">48dip</dimen>
<!-- Height of notification icons in the status bar -->
- <dimen name="status_bar_icon_size">25dip</dimen>
+ <dimen name="status_bar_icon_size">24dip</dimen>
<!-- Size of the giant number (unread count) in the notifications -->
<dimen name="status_bar_content_number_size">48sp</dimen>
<!-- Height of notification icons in the system bar -->
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index b4fd8ab..adf9664 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -64,4 +64,7 @@
<!-- Where to place the app icon over the thumbnail -->
<dimen name="status_bar_recents_app_icon_left_margin">13dp</dimen>
<dimen name="status_bar_recents_app_icon_top_margin">13dp</dimen>
+
+ <!-- size at which Notification icons will be drawn in the status bar -->
+ <dimen name="status_bar_icon_drawing_size">24dip</dimen>
</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index da28e1e..b02015d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -48,5 +48,13 @@
<!-- thickness (height) of each notification row, including any separators or padding -->
<dimen name="notification_height">65dp</dimen>
-</resources>
+ <!-- Height of notification icons in the status bar -->
+ <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen>
+
+ <!-- size at which Notification icons will be drawn in the status bar -->
+ <dimen name="status_bar_icon_drawing_size">18dip</dimen>
+
+ <!-- opacity at which Notification icons will be drawn in the status bar -->
+ <item type="dimen" name="status_bar_icon_drawing_alpha">40%</item>
+</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
index be4b395..1e27233 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -58,6 +58,14 @@ public class StatusBarIconView extends AnimatedImageView {
mNumberPain.setAntiAlias(true);
mNotification = notification;
setContentDescription(notification);
+
+ final int outerBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_size);
+ final int imageBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_drawing_size);
+ final float scale = (float)imageBounds / (float)outerBounds;
+ setScaleX(scale);
+ setScaleY(scale);
+ final float alpha = res.getFraction(R.dimen.status_bar_icon_drawing_alpha, 1, 1);
+ setAlpha(alpha);
}
private static boolean streq(String a, String b) {
@@ -99,6 +107,7 @@ public class StatusBarIconView extends AnimatedImageView {
if (!levelEquals) {
setImageLevel(icon.iconLevel);
}
+
if (!numberEquals) {
if (icon.number > 0 && mContext.getResources().getBoolean(
R.bool.config_statusBarShowNumber)) {