summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2011-10-13 16:29:57 -0400
committerDaniel Sandler <dsandler@android.com>2011-10-14 12:53:42 -0400
commit645e0990552fc671ac3e5daa345ec11404962d28 (patch)
tree5cd85e7aa0ceb88994c0f8affc18dd38e954b338 /packages/SystemUI/src/com/android/systemui
parentdba935659024a9ca83cb6bd3f1a9970e277f7658 (diff)
downloadframeworks_base-645e0990552fc671ac3e5daa345ec11404962d28.zip
frameworks_base-645e0990552fc671ac3e5daa345ec11404962d28.tar.gz
frameworks_base-645e0990552fc671ac3e5daa345ec11404962d28.tar.bz2
Shrink the ticker's icon to match the status bar.
Bug: 5108533 Change-Id: Iff28aaefe068feb50a636fc1456c5a31d7bdb46e
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java
index e76fe51..f5ceed0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.phone;
import android.content.Context;
+import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.text.StaticLayout;
@@ -50,6 +51,7 @@ public abstract class Ticker {
private View mTickerView;
private ImageSwitcher mIconSwitcher;
private TextSwitcher mTextSwitcher;
+ private float mIconScale;
private final class Segment {
StatusBarNotification notification;
@@ -145,6 +147,11 @@ public abstract class Ticker {
public Ticker(Context context, View sb) {
mContext = context;
+ final Resources res = context.getResources();
+ final int outerBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_size);
+ final int imageBounds = res.getDimensionPixelSize(R.dimen.status_bar_icon_drawing_size);
+ mIconScale = (float)imageBounds / (float)outerBounds;
+
mTickerView = sb.findViewById(R.id.ticker);
mIconSwitcher = (ImageSwitcher)sb.findViewById(R.id.tickerIcon);
@@ -152,6 +159,8 @@ public abstract class Ticker {
AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_in));
mIconSwitcher.setOutAnimation(
AnimationUtils.loadAnimation(context, com.android.internal.R.anim.push_up_out));
+ mIconSwitcher.setScaleX(mIconScale);
+ mIconSwitcher.setScaleY(mIconScale);
mTextSwitcher = (TextSwitcher)sb.findViewById(R.id.tickerText);
mTextSwitcher.setInAnimation(