diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png
new file mode 100644
index 0000000000000..d17aae65043e6
Binary files /dev/null and b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png
new file mode 100644
index 0000000000000..5a89d76e771d6
Binary files /dev/null and b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png differ
diff --git a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_normal.9.png
deleted file mode 100644
index b7ad39c5d1f6b..0000000000000
Binary files a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_normal.9.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png
deleted file mode 100644
index c93bd8cf32694..0000000000000
Binary files a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-hdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-hdpi/notify_panel_notify_bg.9.png
deleted file mode 100644
index 1680887d30b21..0000000000000
Binary files a/packages/SystemUI/res/drawable-hdpi/notify_panel_notify_bg.9.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png b/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png
index 772f77d034bb0..3b826a9af08a8 100644
Binary files a/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png and b/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png b/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png
deleted file mode 100644
index 90b4bafc5593f..0000000000000
Binary files a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png
deleted file mode 100644
index bc7034a231e89..0000000000000
Binary files a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_normal.9.png
new file mode 100644
index 0000000000000..002a663fd7603
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_normal.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_pressed.9.png
new file mode 100644
index 0000000000000..399d62ea6be0f
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_pressed.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-hdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_notify_bg.9.png
new file mode 100644
index 0000000000000..7385ecc93654d
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_notify_bg.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_normal.9.png
new file mode 100644
index 0000000000000..5a880e75037f3
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_normal.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_pressed.9.png
new file mode 100644
index 0000000000000..489163d817d38
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_pressed.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-mdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_notify_bg.9.png
new file mode 100644
index 0000000000000..78900a13da7a0
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_notify_bg.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_normal.9.png
new file mode 100644
index 0000000000000..37e7791f23e02
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_normal.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_pressed.9.png
new file mode 100644
index 0000000000000..66fa4a87d3270
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_pressed.9.png differ
diff --git a/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_notify_bg.9.png
new file mode 100644
index 0000000000000..11e36abf0760d
Binary files /dev/null and b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_notify_bg.9.png differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png
new file mode 100644
index 0000000000000..9490833b9a51c
Binary files /dev/null and b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png
new file mode 100644
index 0000000000000..0ff3efd057e9e
Binary files /dev/null and b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_normal.9.png
deleted file mode 100644
index 2dcb6592ec06e..0000000000000
Binary files a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_normal.9.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png
deleted file mode 100644
index e7ed68b156c96..0000000000000
Binary files a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png
deleted file mode 100644
index e346167e6939c..0000000000000
Binary files a/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png b/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png
index 0eb71d0d7923c..999959802b485 100644
Binary files a/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png and b/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png
deleted file mode 100644
index 90b4bafc5593f..0000000000000
Binary files a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png
deleted file mode 100644
index bc7034a231e89..0000000000000
Binary files a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png and /dev/null differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png
new file mode 100644
index 0000000000000..645542345d2b3
Binary files /dev/null and b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png
new file mode 100644
index 0000000000000..bfa8bb4f10dfa
Binary files /dev/null and b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/status_bar_ticker_tile.png b/packages/SystemUI/res/drawable-xhdpi/status_bar_ticker_tile.png
new file mode 100644
index 0000000000000..6585ad66f01ef
Binary files /dev/null and b/packages/SystemUI/res/drawable-xhdpi/status_bar_ticker_tile.png differ
diff --git a/packages/SystemUI/res/drawable/status_bar_veto.xml b/packages/SystemUI/res/drawable/ic_notify_clear.xml
similarity index 75%
rename from packages/SystemUI/res/drawable/status_bar_veto.xml
rename to packages/SystemUI/res/drawable/ic_notify_clear.xml
index 6e1b68155b49f..9c432b2998906 100644
--- a/packages/SystemUI/res/drawable/status_bar_veto.xml
+++ b/packages/SystemUI/res/drawable/ic_notify_clear.xml
@@ -1,5 +1,5 @@
-
-
-
+
+
-
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar.xml b/packages/SystemUI/res/layout-sw600dp/status_bar.xml
index a204f17bc6e0f..55e57ab42d4e1 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar.xml
@@ -35,6 +35,18 @@
android:clipChildren="false"
>
+
+
@@ -45,11 +44,11 @@
android:id="@+id/content_frame"
android:background="@drawable/notify_panel_notify_bg"
android:layout_height="wrap_content"
- android:layout_width="447dp"
+ android:layout_width="478dp"
android:orientation="vertical"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
- android:layout_marginTop="352dp"
+ android:layout_marginTop="178dp"
>
-
diff --git a/packages/SystemUI/res/layout/status_bar_notification_row.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml
index aff6a6e5afac8..ca584abac0520 100644
--- a/packages/SystemUI/res/layout/status_bar_notification_row.xml
+++ b/packages/SystemUI/res/layout/status_bar_notification_row.xml
@@ -3,15 +3,13 @@
android:layout_height="@dimen/notification_height"
>
- 0);
+ mBar.getClearButton().setVisibility(showX ? View.VISIBLE : View.INVISIBLE);
+ }
+ }
+
public void updatePanelModeButtons() {
final boolean settingsVisible = (mSettingsView != null);
mSettingsButton.setVisibility(!settingsVisible ? View.VISIBLE : View.INVISIBLE);
@@ -294,11 +311,11 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
AnimatorSet mContentAnim;
// should group this into a multi-property animation
- final static int OPEN_DURATION = 136;
- final static int CLOSE_DURATION = 250;
+ final static int OPEN_DURATION = 300;
+ final static int CLOSE_DURATION = 300;
// the panel will start to appear this many px from the end
- final int HYPERSPACE_OFFRAMP = 100;
+ final int HYPERSPACE_OFFRAMP = 200;
Choreographer() {
}
@@ -306,10 +323,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
void createAnimation(boolean appearing) {
// mVisible: previous state; appearing: new state
- View root = findViewById(R.id.panel_root);
- Animator bgAnim = ObjectAnimator.ofInt(root.getBackground(), "alpha",
- mVisible ? 255 : 0, appearing ? 255 : 0);
-
float start, end;
// 0: on-screen
@@ -347,7 +360,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
mContentAnim = new AnimatorSet();
mContentAnim
.play(fadeAnim)
- .with(bgAnim)
.with(posAnim)
;
mContentAnim.setDuration((DEBUG?10:1)*(appearing ? OPEN_DURATION : CLOSE_DURATION));
@@ -363,6 +375,9 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
mContentAnim.start();
mVisible = appearing;
+
+ // we want to start disappearing promptly
+ if (!mVisible) updateClearButton();
}
public void onAnimationCancel(Animator animation) {
@@ -376,6 +391,9 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
}
mContentParent.setLayerType(View.LAYER_TYPE_NONE, null);
mContentAnim = null;
+
+ // we want to show the X lazily
+ if (mVisible) updateClearButton();
}
public void onAnimationRepeat(Animator animation) {
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 c6e546e875b96..dc7e3137386ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -122,6 +122,7 @@ public class TabletStatusBar extends StatusBar implements
View mNotificationTrigger;
NotificationIconArea mNotificationIconArea;
ViewGroup mNavigationArea;
+ View mClearButton;
boolean mNotificationDNDMode;
NotificationData.Entry mNotificationDNDDummyEntry;
@@ -187,6 +188,7 @@ public class TabletStatusBar extends StatusBar implements
// Notification Panel
mNotificationPanel = (NotificationPanel)View.inflate(context,
R.layout.status_bar_notification_panel, null);
+ mNotificationPanel.setBar(this);
mNotificationPanel.show(false, false);
mNotificationPanel.setOnTouchListener(
new TouchOutsideListener(MSG_CLOSE_NOTIFICATION_PANEL, mNotificationPanel));
@@ -451,6 +453,10 @@ public class TabletStatusBar extends StatusBar implements
// the more notifications icon
mNotificationIconArea = (NotificationIconArea)sb.findViewById(R.id.notificationIcons);
+ // the "X" that appears in place of the clock when the panel is showing notifications
+ mClearButton = sb.findViewById(R.id.clear_all_button);
+ mClearButton.setOnClickListener(mClearButtonListener);
+
// where the icons go
mIconLayout = (NotificationIconArea.IconLayout) sb.findViewById(R.id.icons);
mIconLayout.setOnTouchListener(new NotificationIconTouchListener());
@@ -581,6 +587,21 @@ public class TabletStatusBar extends StatusBar implements
return sb;
}
+ private View.OnClickListener mClearButtonListener = new View.OnClickListener() {
+ public void onClick(View v) {
+ try {
+ mBarService.onClearAllNotifications();
+ } catch (RemoteException ex) {
+ // system process is dead if we're here.
+ }
+ animateCollapse();
+ }
+ };
+
+ public View getClearButton() {
+ return mClearButton;
+ }
+
public int getStatusBarHeight() {
return mHeightReceiver.getHeight();
}
@@ -1183,7 +1204,6 @@ public class TabletStatusBar extends StatusBar implements
}
private void setAreThereNotifications() {
- final boolean hasClearable = mNotificationData.hasClearableItems();
}
/**