diff options
16 files changed, 64 insertions, 72 deletions
diff --git a/core/res/res/drawable-hdpi/notify_panel_notification_icon_bg.png b/core/res/res/drawable-hdpi/notify_panel_notification_icon_bg.png Binary files differnew file mode 100644 index 0000000..f5b762e --- /dev/null +++ b/core/res/res/drawable-hdpi/notify_panel_notification_icon_bg.png diff --git a/core/res/res/drawable-mdpi/notify_panel_notification_icon_bg.png b/core/res/res/drawable-mdpi/notify_panel_notification_icon_bg.png Binary files differnew file mode 100644 index 0000000..9ecb8af --- /dev/null +++ b/core/res/res/drawable-mdpi/notify_panel_notification_icon_bg.png diff --git a/core/res/res/layout-xlarge/status_bar_latest_event_content.xml b/core/res/res/layout-xlarge/status_bar_latest_event_content.xml index dca2c57..1a3ee82 100644 --- a/core/res/res/layout-xlarge/status_bar_latest_event_content.xml +++ b/core/res/res/layout-xlarge/status_bar_latest_event_content.xml @@ -3,9 +3,9 @@ android:layout_height="match_parent" > <ImageView android:id="@+id/icon" - android:layout_width="48dp" - android:layout_height="64dp" - android:layout_marginLeft="4dp" + android:layout_width="@dimen/notification_large_icon_width" + android:layout_height="@dimen/notification_large_icon_height" + android:background="@drawable/notify_panel_notification_icon_bg" android:scaleType="center" /> <LinearLayout @@ -14,7 +14,7 @@ android:layout_gravity="center_vertical" android:layout_weight="1" android:orientation="vertical" - android:paddingLeft="8dp" + android:paddingLeft="16dp" > <TextView android:id="@+id/title" android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title" @@ -23,6 +23,7 @@ android:singleLine="true" android:ellipsize="marquee" android:fadingEdge="horizontal" + android:layout_marginBottom="-4dp" /> <TextView android:id="@+id/text" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" diff --git a/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml b/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml index 144fa0d..e9b106d 100644 --- a/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml +++ b/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml @@ -8,6 +8,7 @@ android:layout_gravity="center_vertical" android:layout_weight="1" android:orientation="vertical" + android:paddingLeft="16dp" > <TextView android:id="@+id/title" android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title" @@ -16,6 +17,7 @@ android:singleLine="true" android:ellipsize="marquee" android:fadingEdge="horizontal" + android:layout_marginBottom="-4dp" /> <TextView android:id="@+id/text" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" @@ -28,20 +30,27 @@ android:fadingEdge="horizontal" /> </LinearLayout> - <TextView android:id="@+id/info" - android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info" + <RelativeLayout android:layout_width="wrap_content" android:layout_height="match_parent" - android:singleLine="true" - android:gravity="center_vertical" - android:paddingLeft="8dp" - /> - <ImageView android:id="@+id/icon" - android:layout_width="48dp" - android:layout_height="32dp" - android:layout_gravity="top" - android:layout_marginTop="8dp" - android:scaleType="center" - /> + > + <TextView android:id="@+id/info" + android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:singleLine="true" + android:gravity="center_vertical" + android:layout_alignParentLeft="true" + android:paddingLeft="8dp" + /> + <ImageView android:id="@+id/icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignRight="@id/info" + android:layout_marginBottom="8dip" + android:scaleType="center" + /> + </RelativeLayout> </LinearLayout> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index d094bad..8a590cd 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -70,9 +70,9 @@ <item type="dimen" name="dialog_min_width_minor">95%</item> <!-- The width of the big icons in notifications. --> - <dimen name="notification_large_icon_width">60dp</dimen> + <dimen name="notification_large_icon_width">64dp</dimen> <!-- The width of the big icons in notifications. --> - <dimen name="notification_large_icon_height">60dp</dimen> + <dimen name="notification_large_icon_height">64dp</dimen> <!-- Minimum width of the search view text entry area. --> <dimen name="search_view_text_min_width">160dip</dimen> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 25a43e0..811d870 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -224,7 +224,7 @@ <item name="android:textStyle">bold</item> </style> <style name="TextAppearance.StatusBar.EventContent"> - <item name="android:textAppearance">?android:attr/textAppearanceSmall</item> + <item name="android:textSize">10sp</item> <item name="android:textColor">?android:attr/textColorPrimaryInverse</item> </style> <style name="TextAppearance.StatusBar.EventContent.Title"> diff --git a/data/fonts/AndroidClock-Solid.ttf b/data/fonts/AndroidClock_Solid.ttf Binary files differindex 108839e..108839e 100644 --- a/data/fonts/AndroidClock-Solid.ttf +++ b/data/fonts/AndroidClock_Solid.ttf diff --git a/data/fonts/fonts.mk b/data/fonts/fonts.mk index b8a93e8..faecfee 100644 --- a/data/fonts/fonts.mk +++ b/data/fonts/fonts.mk @@ -28,4 +28,5 @@ PRODUCT_COPY_FILES := \ frameworks/base/data/fonts/Clockopia.ttf:system/fonts/Clockopia.ttf \ frameworks/base/data/fonts/DroidSansFallback.ttf:system/fonts/DroidSansFallback.ttf \ frameworks/base/data/fonts/AndroidClock.ttf:system/fonts/AndroidClock.ttf \ - frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Highlight.ttf + frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Highlight.ttf \ + frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Solid.ttf diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml index faae62c..2ee2ac4 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_area.xml @@ -68,20 +68,16 @@ android:id="@+id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginBottom="4dp" + android:layout_marginBottom="2dip" + android:layout_marginLeft="4dip" + android:layout_marginRight="4dip" > - <TextView android:id="@+id/time_bg" + <TextView android:id="@+id/time_solid" android:layout_width="wrap_content" - android:layout_height="match_parent" - android:singleLine="true" - android:textSize="40sp" - android:textColor="#1f1f1f" /> - <TextView android:id="@+id/time_fg" - android:layout_width="wrap_content" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:singleLine="true" android:textSize="40sp" - android:textColor="#2e2e2e" /> + android:textColor="#8cffffff" /> </com.android.systemui.statusbar.tablet.HoloClock> <TextView diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml index 821cf6a..ef57228 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml @@ -57,7 +57,7 @@ android:layout_width="match_parent" android:layout_weight="1" > - <com.android.systemui.statusbar.tablet.NotificationLinearLayout + <LinearLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -66,21 +66,9 @@ android:clickable="true" android:focusable="true" android:descendantFocusability="afterDescendants" - > - </com.android.systemui.statusbar.tablet.NotificationLinearLayout> + /> </ScrollView> </LinearLayout> </RelativeLayout> - <View - android:id="@+id/glow" - android:background="@drawable/notify_glow_back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignTop="@id/content_parent" - android:layout_alignLeft="@id/content_parent" - android:layout_marginLeft="100dip" - android:layout_marginTop="50dip" - /> - </com.android.systemui.statusbar.tablet.NotificationPanel> diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml index 233cb46..0f3f5f0 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml @@ -1,7 +1,6 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="65dp" - android:background="@drawable/status_bar_item_background" > <ImageButton @@ -12,8 +11,9 @@ android:layout_alignParentRight="true" android:src="@drawable/status_bar_veto" android:scaleType="center" - android:background="#ff000000" + android:background="@null" android:paddingRight="8dp" + android:paddingLeft="8dp" /> <ImageView @@ -24,7 +24,6 @@ android:layout_alignParentLeft="true" android:scaleType="center" /> - <!-- TODO: scaleType should be top-left but ImageView doesn't support that. --> <com.android.systemui.statusbar.LatestItemView android:id="@+id/content" android:layout_width="match_parent" diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HoloClock.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HoloClock.java index 3b76434..0121211 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HoloClock.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HoloClock.java @@ -52,8 +52,13 @@ public class HoloClock extends FrameLayout { private String mClockFormatString; private SimpleDateFormat mClockFormat; - private static Typeface sBackgroundType, sForegroundType; - private TextView mBgText, mFgText; + private static final String FONT_DIR = "/system/fonts/"; + private static final String CLOCK_FONT = FONT_DIR + "AndroidClock_Solid.ttf"; + private static final String CLOCK_FG_FONT = FONT_DIR + "AndroidClock.ttf"; + private static final String CLOCK_BG_FONT = FONT_DIR + "AndroidClock_Highlight.ttf"; + + private static Typeface sBackgroundType, sForegroundType, sSolidType; + private TextView mSolidText, mBgText, mFgText; public HoloClock(Context context) { this(context, null); @@ -71,13 +76,10 @@ public class HoloClock extends FrameLayout { protected void onFinishInflate() { super.onFinishInflate(); - if (sBackgroundType == null) { - AssetManager assets = getContext().getAssets(); - - sBackgroundType = Typeface.createFromAsset(assets, - "fonts/AndroidClock.ttf"); - sForegroundType = Typeface.createFromAsset(assets, - "fonts/AndroidClock2.ttf"); + if (sSolidType == null) { + sSolidType = Typeface.createFromFile(CLOCK_FONT); + sBackgroundType = Typeface.createFromFile(CLOCK_BG_FONT); + sForegroundType = Typeface.createFromFile(CLOCK_FG_FONT); } mBgText = (TextView) findViewById(R.id.time_bg); if (mBgText != null) { @@ -87,6 +89,10 @@ public class HoloClock extends FrameLayout { if (mFgText != null) { mFgText.setTypeface(sForegroundType); } + mSolidText = (TextView) findViewById(R.id.time_solid); + if (mSolidText != null) { + mSolidText.setTypeface(sSolidType); + } } @Override @@ -142,8 +148,9 @@ public class HoloClock extends FrameLayout { final void updateClock() { mCalendar.setTimeInMillis(System.currentTimeMillis()); CharSequence txt = getTimeText(); - mBgText.setText(txt); - mFgText.setText(txt); + if (mBgText != null) mBgText.setText(txt); + if (mFgText != null) mFgText.setText(txt); + if (mSolidText != null) mSolidText.setText(txt); } private final CharSequence getTimeText() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java index 092f0b8..1004e18 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java @@ -58,7 +58,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, ViewGroup mContentFrame; Rect mContentArea = new Rect(); View mSettingsView; - View mGlow; ViewGroup mContentParent; Choreographer mChoreo = new Choreographer(); @@ -83,8 +82,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, mModeToggle = findViewById(R.id.mode_toggle); mModeToggle.setOnClickListener(this); - mGlow = findViewById(R.id.glow); - mSettingsButton = (ImageView)findViewById(R.id.settings_button); mNotificationButton = (ImageView)findViewById(R.id.notification_button); @@ -306,18 +303,15 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, ? new android.view.animation.DecelerateInterpolator(1.0f) : new android.view.animation.AccelerateInterpolator(1.0f)); - Animator glowAnim = ObjectAnimator.ofInt(mGlow.getBackground(), "alpha", - mVisible ? 255 : 0, appearing ? 255 : 0); - glowAnim.setInterpolator(appearing - ? new android.view.animation.AccelerateInterpolator(1.0f) - : new android.view.animation.DecelerateInterpolator(1.0f)); + if (mContentAnim != null && mContentAnim.isRunning()) { + mContentAnim.cancel(); + } mContentAnim = new AnimatorSet(); mContentAnim .play(ObjectAnimator.ofFloat(mContentParent, "alpha", mContentParent.getAlpha(), appearing ? 1.0f : 0.0f)) .with(bgAnim) - .with(glowAnim) .with(posAnim) ; mContentAnim.setDuration((DEBUG?10:1)*(appearing ? OPEN_DURATION : CLOSE_DURATION)); @@ -330,7 +324,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, createAnimation(appearing); mContentParent.setLayerType(View.LAYER_TYPE_HARDWARE, null); - mGlow.setLayerType(View.LAYER_TYPE_HARDWARE, null); mContentAnim.start(); mVisible = appearing; @@ -338,8 +331,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, public void onAnimationCancel(Animator animation) { if (DEBUG) Slog.d(TAG, "onAnimationCancel"); - // force this to zero so we close the window - mVisible = false; } public void onAnimationEnd(Animator animation) { @@ -348,7 +339,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, setVisibility(View.GONE); } mContentParent.setLayerType(View.LAYER_TYPE_NONE, null); - mGlow.setLayerType(View.LAYER_TYPE_NONE, null); mContentAnim = null; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index 9549930..d46de15 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -1222,6 +1222,7 @@ public class TabletStatusBar extends StatusBar implements void workAroundBadLayerDrawableOpacity(View v) { LayerDrawable d = (LayerDrawable)v.getBackground(); + if (d == null) return; v.setBackgroundDrawable(null); d.setOpacity(PixelFormat.TRANSLUCENT); v.setBackgroundDrawable(d); diff --git a/tests/StatusBar/res/drawable-mdpi/pineapple.png b/tests/StatusBar/res/drawable-mdpi/pineapple.png Binary files differindex 7377b96..a903723 100644 --- a/tests/StatusBar/res/drawable-mdpi/pineapple.png +++ b/tests/StatusBar/res/drawable-mdpi/pineapple.png diff --git a/tests/StatusBar/res/drawable-mdpi/pineapple2.png b/tests/StatusBar/res/drawable-mdpi/pineapple2.png Binary files differindex ddc1038..8e5009b 100644 --- a/tests/StatusBar/res/drawable-mdpi/pineapple2.png +++ b/tests/StatusBar/res/drawable-mdpi/pineapple2.png |